19 lines
540 B
Plaintext
19 lines
540 B
Plaintext
|
|
***** Create keystore from cert/key *****
|
|
|
|
1) Concatenate certificate and private key into same file
|
|
|
|
$ cat mycert.pem mykey.pem > bundle.pem
|
|
|
|
2) Generate PKCS#12 bundle
|
|
|
|
$ openssl pkcs12 -export -in bundle.pem -out bundle.p12 \
|
|
-password pass:<"password"> -name <alias> -noiter -nomaciter
|
|
|
|
3) Convert .p12 to .jks
|
|
|
|
$ keytool -importkeystore -srckeystore bundle.p12 -srcstoretype pkcs12 \
|
|
-srcalias <alias> -srcstorepass <pass> -destkeystore keystore.jks \
|
|
-deststoretype pkcs12 -deststorepass <pass> -destalias <alias>
|
|
|