익명 16:47

OpenSSL pkcs12 -export command fails on Windows

OpenSSL pkcs12 -export command fails on Windows

I need to create a pcks12 file on Windows. Using openssl results in error "unable to load private key 5712:error:0906D06C:PEM routines".

Any help greatly appreciated!

openssl pkcs12 -export -in c:\opensslkeys\server.crt -inkey c:\opensslkeys\rsakpubcert.key -keysig -out C:\opensslkeys\mypublicencryptionkey.p12

Usage: pkcs12 [options] where options are -export output PKCS12 file -chain add certificate chain -inkey file private key if not infile -certfile f add all certs in f -CApath arg - PEM format directory of CA's -CAfile arg - PEM format file of CA's -name "name" use name as friendly name -caname "nm" use nm as CA friendly name (can be used more than once). -in infile input filename -out outfile output filename -noout don't output anything, just verify. -nomacver don't verify MAC. -nocerts don't output certificates. -clcerts only output client certificates. -cacerts only output CA certificates. -nokeys don't output private keys. -info give info about PKCS#12 structure. -des encrypt private keys with DES -des3 encrypt private keys with triple DES (default) -idea encrypt private keys with idea -seed encrypt private keys with seed



Top Answer/Comment:

OK, got it! I mixed up the keys and -keysig is no longer required. Correct command was:

openssl pkcs12 -export -in c:\opensslkeys\server.crt -inkey c:\opensslkeys\rsakprivnopassword.key -out c:\opensslkeys\mypublicencryptionkey.p12

상단 광고의 [X] 버튼을 누르면 내용이 보입니다