Can't get private key with openssl (no start line:pem_lib.c:703:Expecting: ANY PRIVATE KEY)

后端 未结 4 1223
天命终不由人
天命终不由人 2020-12-05 23:18

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         


        
4条回答
  •  生来不讨喜
    2020-12-05 23:58

    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

提交回复
热议问题