Skip to content

Commit 939f978

Browse files
committed
Fix == vs = in wolfSSL_add1_chain_cert so ret captures up_ref result instead of comparing against it, matching wolfSSL_CTX_add1_chain_cert
1 parent cf5da7b commit 939f978

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/ssl_load.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5202,7 +5202,7 @@ int wolfSSL_add1_chain_cert(WOLFSSL* ssl, WOLFSSL_X509* x509)
52025202
}
52035203

52045204
/* Increase reference count on X509 object before adding. */
5205-
if ((ret == 1) && ((ret == wolfSSL_X509_up_ref(x509)) == 1)) {
5205+
if ((ret == 1) && ((ret = wolfSSL_X509_up_ref(x509)) == 1)) {
52065206
/* Add this to the chain. */
52075207
if ((ret = wolfSSL_add0_chain_cert(ssl, x509)) != 1) {
52085208
/* Decrease reference count on error as not stored. */

0 commit comments

Comments
 (0)