Fortinet white logo
Fortinet white logo
7.2.0

SSL File Conversion Tool Chart

SSL File Conversion Tool Chart

The following commands are in Linux. Use these commands to convert files either on a separate Linux machine or on the FortiNAC appliance.

Function

Linux Syntax

Convert DER/Binary to PEM Format

openssl x509 -inform der -in <filename> -out <newfilename>
 

Example converting certificate.cer:

openssl x509 -inform der -in certificate.cer -out certificate.pem

Convert P7B/PKCS#7 to PEM Format

openssl pkcs7 -print_certs -in <filename> -out <newfilename>

Example converting certificate.p7b:

openssl pkcs7 -print_certs -in certificate.p7b -out certificate.cer

Convert PFX/PKCS#12 to PEM Format (requires PFX file password)

openssl pkcs12 -in <filename> -out <newfilename> –nodes

Example converting certificate.pfx:

openssl pkcs12 -in certificate.pfx -out certificate.cer –nodes

Convert PKCS8 Private Key to RSA Format

openssl rsa –in <filename> -out <newfilename>

Example converting to RSA Private key:

openssl rsa –in server.key.norsa -out server.key

Decrypt Private Key (requires Private Key file password)

openssl rsa -in <filename> -out <newfilename>

Example decrypting Private Key:

openssl rsa –in serer.key.encrypted -out server.key

SSL File Conversion Tool Chart

SSL File Conversion Tool Chart

The following commands are in Linux. Use these commands to convert files either on a separate Linux machine or on the FortiNAC appliance.

Function

Linux Syntax

Convert DER/Binary to PEM Format

openssl x509 -inform der -in <filename> -out <newfilename>
 

Example converting certificate.cer:

openssl x509 -inform der -in certificate.cer -out certificate.pem

Convert P7B/PKCS#7 to PEM Format

openssl pkcs7 -print_certs -in <filename> -out <newfilename>

Example converting certificate.p7b:

openssl pkcs7 -print_certs -in certificate.p7b -out certificate.cer

Convert PFX/PKCS#12 to PEM Format (requires PFX file password)

openssl pkcs12 -in <filename> -out <newfilename> –nodes

Example converting certificate.pfx:

openssl pkcs12 -in certificate.pfx -out certificate.cer –nodes

Convert PKCS8 Private Key to RSA Format

openssl rsa –in <filename> -out <newfilename>

Example converting to RSA Private key:

openssl rsa –in server.key.norsa -out server.key

Decrypt Private Key (requires Private Key file password)

openssl rsa -in <filename> -out <newfilename>

Example decrypting Private Key:

openssl rsa –in serer.key.encrypted -out server.key