csrをOpenSSLから発行して、そのあとkeystoreが欲しくなった際のやりかた

# openssl pkcs12 -export -in crtファイル -inkey 秘密鍵ファイル -out keystore.pkcs12 -name "hogehoge"
で、パスワード"fugafuga"入力

# keytool -importkeystore -srckeystore さっき作成したkeystore.pkcs12 -destkeystore 出力するkeystore -srcstoretype pkcs12 -deststoretype jks -deststoretype jks -destalias "hogehoge" -destkeypass "fugafuga"

 

ひとまず、OpenSSLをどこかにインスコしておきましょう。