Fixed dereference after null check.

This commit is contained in:
Stanislav Klima
2020-04-16 09:52:02 +02:00
parent 83044d7560
commit eab451339c

View File

@ -13575,6 +13575,8 @@ static int EncodeCertReq(Cert* cert, DerCert* der, RsaKey* rsaKey,
#ifdef HAVE_ECC
if (cert->keyType == ECC_KEY) {
if (eccKey == NULL)
return PUBLIC_KEY_E;
der->publicKeySz = SetEccPublicKey(der->publicKey, eccKey, 1);
}
#endif