OpenSSL - Neither PUB key nor PRIV key:: nested asn1 error

前端 未结 4 555
名媛妹妹
名媛妹妹 2021-01-05 08:48

I am trying to initialize OpenSSL::PKey::RSA using a public key, and it is not working.

Following is the key pair:

-----BEGIN RSA PRIVATE KEY-----
MI         


        
4条回答
  •  旧时难觅i
    2021-01-05 09:24

    I was facing the same issue and I tried lot of different solutions given across internet. But the actual problem was with the key that I was providing. The formatting of the key should be proper. There should not be any extra character or \n , \t.

    I hope this might help you. So, please check your key once again.

提交回复
热议问题