Implemented your second suggestion
System.setProperty("javax.net.ssl.trustStore",
"C:\\j2sdk1.4.2_05\\jre\\lib\\security\\mykeystore.jks");
and got the error I normally get..
Error
Connection has been shutdown: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException:
No trusted certificate found
From: A mailing list
for Java(tm) 2 Platform, Enterprise Edition [mailto:J2EE-INTEREST@JAVA.SUN.COM]
On Behalf Of Duc Vo
Sent: Tuesday, 5 July 2005 10:13
AM
To: J2EE-INTEREST@JAVA.SUN.COM
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@JAVA.SUN.COM]
On Behalf Of Taco Fleur
Sent: Tuesday, 5 July 2005 9:32 AM
To: J2EE-INTEREST@JAVA.SUN.COM
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
Ph: + 61 7 3236 2605
=========================================================================== To unsubscribe, send email to listserv@java.sun.com and include in the body of the message "signoff J2EE-INTEREST". For general help, send email to listserv@java.sun.com and include in the body of the message "help".
=========================================================================== To unsubscribe, send email to listserv@java.sun.com and include in the body of the message "signoff J2EE-INTEREST". For general help, send email to listserv@java.sun.com and include in the body of the message "help".