SSL

Extracting public and private keys from a Java Key Store

Step 1: Creating the “public-private” key-pair.    

keytool -genkey -alias client -validity 365 -keystore keystore.jks 

Step 2: Validate the “public-private” key pair.
keytool -list -v -keystore keystore.jks

Step 3: Extract the “public key” from the “public-private”