0

Am trying to generate a pcks12 file on Windows. I don't see what is wrong with my command run as administrator on Windows 7 64-bits. All input files exist. Alternately I get a usage or error "unable to load private key 5712:error:0906D06C:PEM routines".

Any help greatly appreciated! Bert

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
1
  • 1
    -keysig does not appear to be a valid option for the pkcs12 sub-command.
    – EEAA
    Apr 22, 2015 at 16:49

1 Answer 1

0

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .