>       From: [email protected] On Behalf Of Jayaraman,
Krishna
>       Sent: Monday, 18 April, 2011 07:31

> We are using openssl to retrive the server certificate to store that 
> in the truststore to do a connect to the server.

Assuming OpenSSL client(s) this only works if server cert is selfsigned.
If not, OpenSSL needs the *root* in its truststore, plus any intermediate 
cert(s) IF not sent by server (but servers often do), not the entity.

#include usual caveats about selfsigned

<snip: s_client and select to file>

>       This works in most of the cases except one where  the above 
> command hangs. In this specific case it works if I remove all 
> the applications (This is a J2EE application server which 
> we are trying to get the certs for). For all other channels 
> (browser, application server command line) the server presents 
> the certificate and we are able to use it. Only with Open SSL it hangs.

<snip: explain log attachments>

s_client apparently isn't receiving the last two messages 
of the handshake sequence (ChangeCipherSpec and Finished).
Possibly this server doesn't flush these until it has an 
application response to send, which presumably happens after 
the client sends a request. This is somewhat odd behavior, 
but I believe legal because CCS and Finished are officially 
independent per side. It might be intended as an optimization, 
or it might be an accident or side-effect of something else.

In my experience vanilla Java SSLServerSocket/SSLSocket does 
finish handshake immediately. Do you know if this server is 
using something else, maybe SSL engine and NIO channels?

You say removing the apps on the server makes it work, 
so clearly the server can finish the handshake. Possibly 
it's any app(s) or possibly it's something about your 
specific app(s), maybe even something intentional.

If you get the cert in IE and/or Firefox, you can export 
from either of those to a file and put that into OpenSSL.
Or you could just get a cert file from the server people.



______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [email protected]
Automated List Manager                           [email protected]

Reply via email to