From 886ca031d0b9f7b9c1fb3c91a87aae9064c87caa Mon Sep 17 00:00:00 2001 From: Zackery Backman Date: Tue, 7 Apr 2026 12:40:32 -0600 Subject: [PATCH] Fix == vs = in wolfSSL_add1_chain_cert so ret captures up_ref result instead of comparing against it, matching wolfSSL_CTX_add1_chain_cert --- src/ssl_load.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ssl_load.c b/src/ssl_load.c index 2ba4523435..33c490b7c7 100644 --- a/src/ssl_load.c +++ b/src/ssl_load.c @@ -5202,7 +5202,7 @@ int wolfSSL_add1_chain_cert(WOLFSSL* ssl, WOLFSSL_X509* x509) } /* Increase reference count on X509 object before adding. */ - if ((ret == 1) && ((ret == wolfSSL_X509_up_ref(x509)) == 1)) { + if ((ret == 1) && ((ret = wolfSSL_X509_up_ref(x509)) == 1)) { /* Add this to the chain. */ if ((ret = wolfSSL_add0_chain_cert(ssl, x509)) != 1) { /* Decrease reference count on error as not stored. */