Skip to Content

Imagine that you purchased a SSL certificate from a given CA. This certificate was imported into a SSL PSE and used for HTTPS access. In certain landscapes, the same certificate should be imported in a different server or device (e.g. a reverse proxy). In order to import the certificate into the other server/device, you also need the private key from the PSE. How to export the private key from the SSL PSE?

First of all, SAPCRYPTOLIB 5.5.5 patch level 16 or higher is required. Then you can export your PSE file to a PKCS#12 file.

The command line is: sapgenpse export_p12 –p <YOUR_PSE> <P12_FILE>

Please note that you must provide a password for the PKCS#12 file!


Example:

PrivateKey1.png


The next step makes use of a third party tool, openssl. With this tool we can extract both keys (private and public one).

The openssl command line is: openssl pkcs12 -in <P12_FILE> -out <OUTPUT.txt> -nodes:

PrivateKey2.png


The same password must be provided above.

The Private Key is now available in the block BEGIN/END RSA PRIVATE KEY, as you can see below:


PrivateKey3.png


Of course, I have removed my private key… 😉

To report this post you need to login first.

1 Comment

You must be Logged on to comment or reply to a post.

Leave a Reply