Samples JDK
Classes
Package com.freemindcafe.socket.ssl.sample4

Server has clients public certificate but it also has additional serverkey1. This keys public certificate is not imported in clients store. Hence client auth fails as server sends the certficate for serverkey1. Since the key selection is based upon the hashcodes of the keys, the keys will not be predictably picked. More...

Classes

class  EchoClientTest
 
class  EchoServerTest
 

Detailed Description

Server has clients public certificate but it also has additional serverkey1. This keys public certificate is not imported in clients store. Hence client auth fails as server sends the certficate for serverkey1. Since the key selection is based upon the hashcodes of the keys, the keys will not be predictably picked.

Setup

Generate the Client and Server Keystores

Install the client's public certificate in to the server's keystore

Export the Server's Public Certificate and Import it in to the client's Keystore

Generate a new alias serverkey1

Check keystore contents