mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-01 03:34:39 +02:00
add null check for ssl before use in wc_DhGenerateKeyPair
This commit is contained in:
@@ -6468,6 +6468,10 @@ int DhGenKeyPair(WOLFSSL* ssl, DhKey* dhKey,
|
||||
|
||||
WOLFSSL_ENTER("DhGenKeyPair");
|
||||
|
||||
if (ssl == NULL || dhKey == NULL) {
|
||||
return BAD_FUNC_ARG;
|
||||
}
|
||||
|
||||
#ifdef WOLFSSL_ASYNC_CRYPT
|
||||
/* initialize event */
|
||||
ret = wolfSSL_AsyncInit(ssl, &dhKey->asyncDev, WC_ASYNC_FLAG_NONE);
|
||||
|
Reference in New Issue
Block a user