Converting PPK/PEM keys to JKS

Converting PPK/PEM keys to JKS

book

Article ID: KB0071629

calendar_today

Updated On:

Products Versions
TIBCO Managed File Transfer Command Center All

Description

MFT allows system keys to be imported as a Java KeyStore(JKS). When keys are obtained as PPK or PEM files, they need to be converted to a JKS file. 

Issue/Introduction

Step-by-step instructions for obtaining a JKS from a PPK/PEM.

Environment

All Supported Environments

Resolution

Utilities required:

1. putty-tools
2. openssl
3. keytool

For .ppk to .pem:

1. Install putty-tools (command to install would depend on the Linux distribution)

2. To generate .pem file
puttygen server.ppk -O private-openssh -o server.pem

For .pem to .jks:

1. generate certificate from private key
openssl req -config openssl.cnf -key personal/private/server.pem -new -x509 -days 3650 -sha256 -extensions v3_ca -out personal/certs/server.cert.pem

2. generate pkcs12 keystore with private key and certificate.
openssl pkcs12 -export -out server.pfx -inkey ../private/server.key.pem -in server.cert.pem

3. convert pkcs12 to jks
keytool -importkeystore -srckeystore server.pfx -destkeystore server.jks -srcstorepass xxxxxx -srcstoretype pkcs12

Additional Information

https://docs.oracle.com/cd/E35976_01/server.740/es_admin/src/tadm_ssl_convert_pem_to_jks.html