Client and server do not share public certificates, hence client auth fails.
Client and server do not share public certificates, hence client auth fails.
Setup
Generate the Client and Server Keystores
-
keytool -genkeypair -alias serverkey -keyalg RSA -dname "CN=localhost,OU=Organization Unit,O=Organization,L=City,S=State,C=IN" -keypass password -keystore serverkeystore.jks -storepass password
-
keytool -genkeypair -alias clientkey -keyalg RSA -dname "CN=localhost,OU=Organization Unit,O=Organization,L=City,S=State,C=IN" -keypass password -storepass password -keystore clientkeystore.jks
Check keystore contents
-
keytool -list -keystore serverkeystore.jks -storepass password
-
keytool -list -v -keystore serverkeystore.jks -storepass password -alias serverkey1
-
keytool -list -v -keystore clientkeystore.jks -storepass password -alias clientkey