tags:

views:

52

answers:

3

In JSSE docs, it just says the sslsocket can be created by the SSLSocketFactory through a call of createSocket. But it does not describe how the ssl handshake is call, how the key material is passed in and how and which credential is chosen to authenticate the server or the client.

Anybody knows the detailed procedure of the creation of sslsocket?

thanks

A: 

An algorithm like Diffie-Hellman can be used to establish secure communications between two parties across an unsecure network.

http://en.wikipedia.org/wiki/Diffie%E2%80%93Hellman_key_exchange

btreat
+1  A: 

There's a pretty thorough overview at http://download.oracle.com/docs/cd/E17409_01/javase/6/docs/technotes/guides/security/jsse/JSSERefGuide.html

nos
yes, it is a good docs. But do you know how the certificates is chosen to authenticate your self. Like, in mutual authentication scenario, the server will require client's certificate, but in client's KeyStore, there maybe multiple key-certificates, which one is chosen?
Guoqin
+1  A: 

All JSSE does is implement what it says in RFC 2246. No need to say it all again in the Javadoc.

EJP
In the mutal authentication, if you the client has multiple certificates, which one is chosen?
Guoqin
A certificate that matches the trusted CAs sent by the server. This also is in the RFC.
EJP
The certificate request has two lists of certificate_types and certificate_authorities, which one higher preference? for example, if the certificate request is something like: { certificate_types = (rsa_sign, dss_sign) certificate_authorities = ("verisign", "CyberTrust") } However, the client has two certificates like: certificate1 = (rsa_sign, "CyberTrust") ; certificate2 = (dss_sign, "verisign") which one shall the client take? Thanks!
Guoqin
The chosen certificate has to comply with both. Probably the first certain that dowse so is chosen, but I'm not aware of any specification that says anything about it.
EJP