SSLSocket 2005-07-05 - By Jacky Cheung
Back Dear Taco,
Did you find a file c:\temp\mykeystore.jks? Try to do a -list to this keystore file and you should be able to find your testing cert. If you can find it in this keystore, you can copy this file to "c:\j2sdk1.4.2_05\jre\lib\security". For the code your posted in other e-mails, it seems that you use a keystore file in "c:\j2sdk1.4.2_05\jre\lib\security" which is not exists or did not contain your cert (as you imported the cert to the file in c:\temp only). Good Luck.
Best regards, Jacky
Taco wrote:
> Now when I tried to run the same command line on the key they send me > I get the following: > > C:\Temp>keytool -import -trustcacerts -file > C:\j2sdk1.4.2_05\jre\lib\security\sh > > elco.key -alias EISCA -keystore mykeystore.jks > > Enter keystore password: xxxxx > > Owner: CN=Graham Chapman test 200 serial, OU=eBusiness Development CA, > O=ASIC, L > > =Sydney, ST=NSW, C=AU > > Issuer: OU=eBusiness Development CA, O=ASIC, L=SYDNEY, ST=NSW, C=AU > > Serial number: > ed128008ec110fd416d961bd42ea0cabbd42ff0caced128008ec110fd416d961b > > d42ea0cabbd42ff0caced128008ec110fd416d961bd42ea0cabbd42ff0caced128008ec110fd416 d > > 961bd42ea0cabbd42ff0caced128008ec110fd416d961bd42ea0cab > > Valid from: Thu Aug 19 09:29:11 EST 2004 until: Fri Aug 19 09:29:11 > EST 2005 > > Certificate fingerprints: > > MD5: E0:05:34:7C:9C:A2:E9:9E:E6:0E:A8:66:4D:60:3A:F2 > > SHA1: 70:ED:59:6E:02:B8:9B:C3:0D:9B:3D:0E:92:0C:7B:DB:73:BE:26:0E > > Trust this certificate? [no]: y > > Certificate was added to keystore > > I am not sure what this all means, but I will now try and implement > your second suggestion. > > -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- > > *From:* A mailing list for Java(tm) 2 Platform, Enterprise Edition > [mailto:J2EE-INTEREST@(protected)] *On Behalf Of *Duc Vo > *Sent:* Tuesday, 5 July 2005 10:13 AM > *To:* J2EE-INTEREST@(protected) > *Subject:* Re: SSLSocket > > Normally I?ll import it to a custom keystore file, e.g. (import to > file mykeystore.jks with keytool) > > keytool -import -trustcacerts -file EIS_CAcert.pem -alias EISCA > -keystore mykeystore.jks > > When prompted for a password just enter some password (will be used > for updating this keystore later if needed). > > When prompted if you trust the certificate, say yes. > > Then set the System property ?javax.net.ssl.trustStore? with that > custom keystore before making any connection, e.g. (Java code) > > System.setProperty("javax.net.ssl.trustStore", "mykeystore.jks"); > > NOTE: I?ve assumed that all files are on the same path (e.g. safe to > use just the file name) > > -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- > > *From:* A mailing list for Java(tm) 2 Platform, Enterprise Edition > [mailto:J2EE-INTEREST@(protected)] *On Behalf Of *Taco Fleur > *Sent:* Tuesday, 5 July 2005 9:32 AM > *To:* J2EE-INTEREST@(protected) > *Subject:* SSLSocket > > I am trying to implement the SSLSocket class, when running the class I > got the following error: > > Error sun.security.validator.ValidatorException: No trusted > certificate found > > The people I am trying to communicate with only sent me a .key file, > and they send me a link to their certificate > http://edge1.asic.gov.au/edge/test/EIS_CAcert.pem > > I am a complete newbie to Java, I used the keytool to import the key, > just gave it an arbitrary name, not sure if I need to give it a > specific name? > > Also not sure whether I need to import the certificate EIS_CAcert.pem, > and if so, how would I go about doing that? > > __ ____ ____ ____ ____ ____ ____ > > Taco Fleur - /E-commerce Development Manager/ > > Shelco Searches & Services > > An Authorised ASIC Information Broker > > www.shelco.com.au > > Ph: + 61 7 3236 2605 > > =========================================================================== > To unsubscribe, send email to listserv@(protected) and include in the > body of the message "signoff J2EE-INTEREST". For general help, send > email to listserv@(protected) and include in the body of the message > "help". > > =========================================================================== > To unsubscribe, send email to listserv@(protected) and include in the > body of the message "signoff J2EE-INTEREST". For general help, send > email to listserv@(protected) and include in the body of the message > "help". > > =========================================================================== > To unsubscribe, send email to listserv@(protected) and include in the > body of the message "signoff J2EE-INTEREST". For general help, send > email to listserv@(protected) and include in the body of the message > "help". >
=========================================================================== To unsubscribe, send email to listserv@(protected) and include in the body of the message "signoff J2EE-INTEREST". For general help, send email to listserv@(protected) and include in the body of the message "help".
|
|