mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-31 03:07:29 +02:00
Fixed dereference after null check.
This commit is contained in:
@ -13575,6 +13575,8 @@ static int EncodeCertReq(Cert* cert, DerCert* der, RsaKey* rsaKey,
|
|||||||
|
|
||||||
#ifdef HAVE_ECC
|
#ifdef HAVE_ECC
|
||||||
if (cert->keyType == ECC_KEY) {
|
if (cert->keyType == ECC_KEY) {
|
||||||
|
if (eccKey == NULL)
|
||||||
|
return PUBLIC_KEY_E;
|
||||||
der->publicKeySz = SetEccPublicKey(der->publicKey, eccKey, 1);
|
der->publicKeySz = SetEccPublicKey(der->publicKey, eccKey, 1);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user