mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2026-07-05 17:00:49 +02:00
Fix DH encoding check in wolfSSL_CTX_set_tmp_dh: && to || and < to <= to catch single-param failure and zero-length, matching wolfSSL_set_tmp_dh.
This commit is contained in:
+1
-1
@@ -5864,7 +5864,7 @@ long wolfSSL_CTX_set_tmp_dh(WOLFSSL_CTX* ctx, WOLFSSL_DH* dh)
|
||||
pSz = wolfSSL_BN_bn2bin(dh->p, p);
|
||||
gSz = wolfSSL_BN_bn2bin(dh->g, g);
|
||||
/* Check encoding worked. */
|
||||
if ((pSz < 0) && (gSz < 0)) {
|
||||
if ((pSz <= 0) || (gSz <= 0)) {
|
||||
ret = WOLFSSL_FATAL_ERROR;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user