I converted the pkcs8 file to pem and b64 and I updated the header and the footer. When I launch the commands as below, I got this error :
Commands :
openssl pkcs12 -export -inkey ./xx.pem -in ./xx.cer -out ./xx.p12
openssl pkcs12 -export -inkey ./xx.b64 -in ./xx.cer -out ./xx.p12
Results :
unable to load private key
58163:error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong tag:/SourceCache/OpenSSL098/OpenSSL098-50/src/crypto/asn1/tasn_dec.c:1315:
58163:error:0D06C03A:asn1 encoding routines:ASN1_D2I_EX_PRIMITIVE:nested asn1 error:/SourceCache/OpenSSL098/OpenSSL098-50/src/crypto/asn1/tasn_dec.c:827:
58163:error:0D08303A:asn1 encoding routines:ASN1_TEMPLATE_NOEXP_D2I:nested asn1 error:/SourceCache/OpenSSL098/OpenSSL098-50/src/crypto/asn1/tasn_dec.c:747:Field=version, Type=RSA
58163:error:0D09A00D:asn1 encoding routines:d2i_PrivateKey:ASN1 lib:/SourceCache/OpenSSL098/OpenSSL098-50/src/crypto/asn1/d2i_pr.c:99:
58163:error:0907B00D:PEM routines:PEM_READ_BIO_PRIVATEKEY:ASN1 lib:/SourceCache/OpenSSL098/OpenSSL098-50/src/crypto/pem/pem_pkey.c:125: