How to generate test JKS keystore and cert

1. keysize 2048 for sha1 sigalg fails, sha256 sigalg not avaiable  -->

so use below command to generate the JKS keystore "clientkeystore"

keytool -genkey -alias client -keysize 1024 -validity 3650 -keypass password -keystore clientkeystore -storepass password -storetype jks -dname "CN=yawu, OU=pactera, O=cdc, L=beijing, ST=beijing, C=cn" -v

2.  export the cert out of the keystore to be "clientcert"

keytool -export -alias client -keystore clientkeystore -file clientcert -storepass password -v

3.  just change params if you need other keystores

keytool -genkey -alias server -keysize 1024 -validity 3650 -keypass password -keystore serverkeystore -storepass password -storetype jks -dname "CN=yawu_server, OU=pactera, O=cdc, L=beijing, ST=beijing, C=cn" -v

4. BW 只能识别storepass和keypass一样的JKS keystore, 所以改密码的话,需要一起改:

keytool -keystore clientkeystore -storepasswd

keytool -keypasswd -keypass password -keystore clientkeystore -alias client

5. above is saved in folder G:\SRAll\QuickProjects\SSL\HttpSingleSSL9699BothStarterEMSCert_JKS\JKSNew
 and new password is password1.

你可能感兴趣的:(How to generate test JKS keystore and cert)