axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Cohan, Sean" <SCo...@goSPS.com>
Subject RE: Can't find Trusted Cert.
Date Fri, 12 Jul 2002 17:58:06 GMT
in the client code, I also mistyped the trustStore location property (at
least as presented in the book "AXIS Next Generation Java SOAP".)  

Although I'm not really sure how this property is being accessed (e.g., as a
URI) and how the front of it is resolved (e.g., classpath, off of webapps,
etc), instead of:

// Set the truststore for authentication
System.setProperty("javax.net.ssl.trustStore",
	   "gov.doc.bis.snap.clienttruststore");

I should have had:

// Set the truststore for authentication
System.setProperty("javax.net.ssl.trustStore",
	   "gov/doc/bis/snap/clienttruststore");


But this doesn't help.  It still doesn't find the trustStore.

Can anyone explain the keyStore is empty?  I don't set this anywhere in the
code, just in tomcats server.xml.  Thanks.

-----Original Message-----
From: Cohan, Sean [mailto:SCohan@goSPS.com]
Sent: Friday, July 12, 2002 11:01 AM
To: 'axis-user@xml.apache.org'
Subject: RE: Can't find Trusted Cert.


Thanks you, Geza.  In my client code, I did mistype javax.net.ssl.trustStore
as javax.net.ssl.truststore

After I changed it to 

// Set the truststore for authentication
System.setProperty("javax.net.ssl.trustStore",
"gov.doc.bis.snap.clienttruststore");

and recompiled (and restarted tomcat) I get:

C:\bis-axis\gov\doc\bis\snap>java -Djavax.net.debug=ssl
gov.doc.bis.snap.SSLMain


Testing getting SnapWorkItem with key parameter.
>> Querying SnapWorkItemApi for '1'
keyStore is :
keyStore type is : jks
init keystore
init keymanager of type SunX509
trustStore is: No File Available, using empty keystore.
trustStore type is : jks
init truststore
init context
trigger seeding of SecureRandom
done seeding SecureRandom
%% No cached client session
*** ClientHello, v3.1

-----Original Message-----
From: Geza.Szocs@nokia.com [mailto:Geza.Szocs@nokia.com]
Sent: Friday, July 12, 2002 10:22 AM
To: axis-user@xml.apache.org
Subject: RE: Can't find Trusted Cert.


I struggled with the same thing the whole day. 
My problem turned otu to be the bloody system property.
Watch out because it is case sensitive. It has to be

javax.net.ssl.keyStore, with capital "S"

So you have to set keystore and truststore too (if it's the case).



> I tried that.  I'm really a fish out of water here, but it looks my
> clienttruststore is not recognized (based on the 'keyStore is : ' line
> below.)  Any help sorting this out is greatly appreciated since I'm
> stumbling around in the dark (but learning which is good.)  
> Here's the top
> portion of the output.  Thanks.
> 
> C:\bis-axis\gov\doc\bis\snap>java -Djavax.net.debug=ssl
> gov.doc.bis.snap.SSLMain
> 
> 
> Testing getting SnapworkItem with key parameter.
> >> Querying SnapWorkItemApi for '1'
> keyStore is :
> keyStore type is : jks
> init keystore
> init keymanager of type SunX509
> trustStore is: c:\j2sdk1.4.0_01\jre\lib\security\cacerts
> trustStore type is : jks
> init truststore
> adding as trusted cert: [
> [
>   Version: V3
>   Subject: EMAILADDRESS=personal-freemail@thawte.com, 
> CN=Thawte Personal
> Freemail CA, OU=Certification Services Division
> , O=Thawte Consulting, L=Cape Town, ST=Western Cape, C=ZA
>   Signature Algorithm: MD5withRSA, OID = 1.2.840.113549.1.1.4
> 
>   Key:  com.sun.net.ssl.internal.ssl.JSA_RSAPublicKey@6dadf9
>   Validity: [From: Sun Dec 31 19:00:00 EST 1995,
>                To: Thu Dec 31 18:59:59 EST 2020]
>   Issuer: EMAILADDRESS=personal-freemail@thawte.com, 
> CN=Thawte Personal
> Freemail CA, OU=Certification Services Division,
>  O=Thawte Consulting, L=Cape Town, ST=Western Cape, C=ZA
>   SerialNumber: [  0  ]
> 
> Certificate Extensions: 1
> [1]: ObjectId: 2.5.29.19 Criticality=true
> BasicConstraints:[
> CA:true
> PathLen:2147483647
> ]
> 
> -----Original Message-----
> From: Geza.Szocs@nokia.com [mailto:Geza.Szocs@nokia.com]
> Sent: Friday, July 12, 2002 3:37 AM
> To: axis-user@xml.apache.org
> Subject: RE: Can't find Trusted Cert.
> 
> 
> 
> Hi,
> 
>   Try running your client and server with SSL debug ON. 
> (java -Djavax.net.debug=ssl ...) This way you can see what's really
> happening. You can find out whether the system finds your 
> trusstore file.
> Or maybe the problem is exactly what the exception says: there is
> no proper certificate in your truststore. In this case you should
> import one into your truststore. Or the other side is sending 
> the wrong
> certificate ?
> Good luck, Geza
> 
> > -----Original Message-----
> > From: ext Cohan, Sean [mailto:SCohan@goSPS.com]
> > Sent: 11. July 2002 23:21
> > To: 'axis-user@xml.apache.org'
> > Subject: RE: Can't find Trusted Cert.
> > 
> > 
> > Perhaps a little more info should have been provided on my 
> > part.  Here is my
> > relevant client code:
> > 
> > 	// Set the protocol for handling SSL based connecting
> > 	System.setProperty("java.protocol.handler.pkgs",
> > 		   "com.sun.net.ssl.internal.www.protocol");
> > 	// Add the provider implementation class for handling SSL
> > connections
> > 	java.security.Security.addProvider(new 
> > 		    com.sun.net.ssl.internal.ssl.Provider());
> > 	// Set the truststore for authentication
> > 	System.setProperty("javax.net.ssl.truststore",
> > 		   "gov.doc.bis.snap.clienttruststore");
> > 	System.setProperty("javax.net.ssl.trustStorePassword", 
> > "changeit");
> > 
> > And here is a little more of the error:
> > 
> > C:\bis-axis\gov\doc\bis\snap>java gov.doc.bis.snap.SSLMain
> > 
> > 
> > Testing getting SnapworkItem with key parameter.
> > >> Querying SnapWorkItemApi for '1'
> > - Mapping Exception to AxisFault
> > AxisFault
> >  faultCode: {http://xml.apache.org/axis/}Server.userException
> >  faultString: javax.net.ssl.SSLHandshakeException: Couldn't 
> > find trusted
> > certificate
> >  faultActor: null
> >  faultDetail:
> >         stackTrace: javax.net.ssl.SSLHandshakeException: 
> Couldn't find
> > trusted certificate
> >         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.b(DashoA6275)
> >         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275)
> >         at 
> > com.sun.net.ssl.internal.ssl.ClientHandshaker.a(DashoA6275) 
> > 		.
> > 		.
> > 		.
> > 
> > What should I do?  Thanks.
> > 
> > 
> > -----Original Message-----
> > From: Cohan, Sean [mailto:SCohan@goSPS.com]
> > Sent: Thursday, July 11, 2002 4:25 PM
> > To: axis-user@xml.apache.org
> > Subject: Can't find Trusted Cert.
> > 
> > 
> > What's happening if I get this message when running my 
> client and more
> > importantly, how do I go about correcting it?
> > 
> > SSLHandshakeException: Couldn't find trusted certificate
> > 
> > I've checked that the clienttrustedstore is in my classpath 
> > and restarted
> > tomcat.
> > 
> > I'm almost there, I can feel it.
> > 
> > Thanks.
> > 
> > 
> > Sean Cohan
> > Software Performance Systems
> > 
> 

Mime
View raw message