For Programmers: Free Programming Magazines  


Home > Archive > Java Security > June 2005 > Expired certificates being ignored









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Expired certificates being ignored
acalcium@gmail.com

2005-06-09, 8:58 am

Hi there all,
I have a client application that talks to a server application via AXIS
SOAP.

We use a 2 way authentication SSL certificate exchange, ie. using a
trustStore
and a keyStore.

Anyway, the truststore of the client uses a server certificate that has
expired.
(keytool says it expired in 2004).

However, I do not get any exception regarding this when connecting to
the server.
The application proceeds as normal (ie. like certificate not expired).

I did look around and saw similar sufferers but alas no pointers.
http://forum.java.sun.com/thread.js...560690&tstart=0

I do set the trustStore and keyStore programmatically.
ie.
System.setProperty( "javax.net.ssl.trustStore", trustStore );
System.setProperty( "javax.net.ssl.keyStore", keyStore );
System.setProperty( "javax.net.ssl.keyStorePassword",
keyStorePassword );
System.setProperty( "javax.net.ssl.trustStorePassword",
trustStorePassword );

but I dont use any custom trustManager or anything like that or specify
any security policies. Am just using whatever the default is.

Also, I am using the java class URL to connect, so the https/ssl
exchange
protocol is hidden from me.
ie.
URL url = new URL( "https://www.someurlxyz.com.kk/webservice" );
MyIFService service = new MyIFServiceLocator( );
MyIF pp = service.getPinger( url );

int response = pp.ping( "acalcium" );

ie. the above code succeeds when I am expecting a
"javax.net.ssl.SSLHandshakeException: certificate expired".
Or is it supposed to be working like this by default?

Would anyone have any ideas to try?

Would the use of Axis have affected this?
All ideas are most appreciated.

This guy has the opposite problem :-)
http://mail-archives.apache.org/mod...il.yahoo.com%3E

Many thanks in advance,
Chai

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com