Add gate on having DH

This commit is contained in:
Anthony Hu
2025-06-24 10:37:26 -04:00
parent 8c1298a1d8
commit 43df11c9c1

View File

@@ -6929,7 +6929,7 @@ int SetSSL_CTX(WOLFSSL* ssl, WOLFSSL_CTX* ctx, int writeDup)
ssl->options.minDowngrade = ctx->minDowngrade;
ssl->options.haveRSA = ctx->haveRSA;
ssl->options.haveDH = ctx->haveDH;
#ifndef NO_CERTS
#if !defined(NO_CERTS) && !defined(NO_DH)
/* Its possible that DH algorithm parameters were set in the ctx, recalc
* cipher suites. */
if (ssl->options.haveDH && ctx->serverDH_P.buffer != NULL &&
@@ -6951,7 +6951,7 @@ int SetSSL_CTX(WOLFSSL* ssl, WOLFSSL_CTX* ctx, int writeDup)
ssl->options.haveStaticECC, ssl->options.useAnon,
TRUE, TRUE, TRUE, TRUE, ssl->options.side);
}
#endif /* ! NO_CERTS */
#endif /* !NO_CERTS && !NO_DH */
ssl->options.haveECDSAsig = ctx->haveECDSAsig;
ssl->options.haveECC = ctx->haveECC;
ssl->options.haveStaticECC = ctx->haveStaticECC;