Troubleshooting
Problem
|
Package |
Description |
|
PKCS # 1 |
The RSA encryption standard using RSA public key system. |
|
PKCS # 3 |
The Diffie-Hellman key-agreement standard. |
|
PKCS # 5 |
The password-based encryption standard (PBE). |
|
PKCS # 6 |
The extended-certificate standard (replaced by x509 v3 extension). |
|
PKCS # 7 |
The cryptographic message syntax standards. |
|
PKCS # 8 |
Private-key information syntax. |
|
PKCS # 9 |
This defines attributes. |
|
PKCS # 10 |
The certification request syntax standard. |
|
PKCS # 11 |
The cryptographic token interface standard such as smart cards. |
|
PKCS # 12 |
The personal information exchange syntax standard. |
|
PKCS # 13 |
The elliptic curve cryptography. |
|
PKCS # 14 |
This is currently under active development. |
|
PKCS # 15 |
The cryptographic token information. |
Environment
Resolving The Problem
openssl pkcs12 -in yourP12File.pfx -clcerts -nokeys -out cert.pem
openssl pkcs12 -in yourP12File.pfx -cacerts -nokeys -out public.pem
openssl pkcs12 -in yourP12File.pfx -nocerts -out key.pem
openssl rsa -in key.pem -out dkey.pem
openssl pkcs12 -export -out newpkcs.p12 -keypbe PBE-SHA1-3DES -certpbe PBE-SHA1-3DES -certfile public.pem -inkey dkey.pem -in cert.pem
Note: PASE OpenSSL default current private key encryption is PBE-SHA1-3DES. To adjust this you could include -keypbe AES-256-CBC -certpbe AES-256-CBC options.
-keypbe <------ Encryption algorithm for private key
-certpbe <------ Encryption algorithm for certificate files
-
PBE-MD2-DES PBE-MD5-DES PBE-SHA1-RC2-64 PBE-MD2-RC2-64 PBE-MD5-RC2-64 PBE-SHA1-DES PBE-SHA1-RC4-128 PBE-SHA1-RC4-40 PBE-SHA1-3DES PBE-SHA1-2DES PBE-SHA1-RC2-128 PBE-SHA1-RC2-40 AES-256-CBC hmacWithSHA256 - For a list of PBE (password based) encryption algorithms:
-
openssl enc -list -ciphers - 3. To verify we can view contents of the PKCS12 file:
-
openssl pkcs12 -info -in newpkcs.p12
You will see PKCS7 data twice. The first instance is the certificate and the second will be the private key both enshrouded a PBE of choice.
Document Location
Worldwide
Was this topic helpful?
Document Information
Modified date:
27 October 2022
UID
ibm16621261