LinuxCommandLibrary

pkcs8.1s

Convert to PKCS#8

TLDR

Convert to PKCS#8

$ openssl pkcs8 -topk8 -in [key.pem] -out [key-pkcs8.pem]
copy
Convert with encryption
$ openssl pkcs8 -topk8 -in [key.pem] -out [key.p8] -v2 aes256
copy
Convert to unencrypted
$ openssl pkcs8 -topk8 -in [key.pem] -out [key.p8] -nocrypt
copy
Convert from PKCS#8
$ openssl pkcs8 -in [key.p8] -out [key.pem]
copy

SYNOPSIS

openssl pkcs8 [options]

DESCRIPTION

openssl pkcs8 converts private key formats. PKCS#8 key format.
The tool handles key format conversion. Standard key container.
openssl pkcs8 converts keys.

PARAMETERS

-topk8

Convert to PKCS#8.
-in FILE
Input key file.
-out FILE
Output file.
-nocrypt
No encryption.
-v2 CIPHER
Encryption cipher.
-inform FORMAT
Input format.

CAVEATS

Part of OpenSSL. Key format conversion. Encryption optional.

HISTORY

PKCS#8 support in OpenSSL enables private key format conversion.

SEE ALSO

Copied to clipboard