I have a .key file, when I do
openssl rsa -text -in file.key
I get
unable to load Private Key
140000419358368:error:0906D06C:PEM
On my execution of openssl pkcs12 -export -out cacert.pkcs12 -in testca/cacert.pem, I received the following message:
unable to load private key 140707250050712:error:0906D06C:PEM routines:PEM_read_bio:no start line:pem_lib.c:701:Expecting: ANY PRIVATE KEY`
Got this solved by providing the key file along with the command. The switch is -inkey inkeyfile.pem