[openssl-users] An error occurred while using the d2i_RSAPublicKey function.

Viktor Dukhovni openssl-users at dukhovni.org
Sun Jun 10 01:04:35 UTC 2018



> On Jun 9, 2018, at 8:38 PM, Sangsub <i_chacha at naver.com> wrote:
> 
> I have written the following test code, and an error has occurred in the
> d2i_RSAPublicKey function.
> A null pointer is returned as the result of the d2i_RSAPublicKey function.

Your input data is not a PKCS#1 RSA public key as understood by
d2i_RSAPublicKey().  Rather, it is an X.509 SPKI public key,
as understood by d2i_RSA_PUBKEY(), or, more generally, d2i_PUBKEY().

-- 
	Viktor.



More information about the openssl-users mailing list