@@ -77500,9 +77500,18 @@ static int test_wolfSSL_set_SSL_CTX(void)
7750077500#ifdef WOLFSSL_SESSION_ID_CTX
7750177501 ExpectIntEQ(XMEMCMP(ssl->sessionCtx, session_id2, 4), 0);
7750277502#endif
77503+ #ifdef WOLFSSL_COPY_CERT
77504+ if (ctx2 != NULL && ctx2->certificate != NULL) {
77505+ ExpectFalse(ssl->buffers.certificate == ctx2->certificate);
77506+ }
77507+ if (ctx2 != NULL && ctx2->certChain != NULL) {
77508+ ExpectFalse(ssl->buffers.certChain == ctx2->certChain);
77509+ }
77510+ #else
7750377511 ExpectTrue(ssl->buffers.certificate == ctx2->certificate);
7750477512 ExpectTrue(ssl->buffers.certChain == ctx2->certChain);
7750577513#endif
77514+ #endif
7750677515
7750777516#ifdef HAVE_SESSION_TICKET
7750877517 ExpectIntNE((wolfSSL_get_options(ssl) & SSL_OP_NO_TICKET), 0);
@@ -77519,8 +77528,17 @@ static int test_wolfSSL_set_SSL_CTX(void)
7751977528#endif
7752077529 /* MUST change */
7752177530#ifdef WOLFSSL_INT_H
77531+ #ifdef WOLFSSL_COPY_CERT
77532+ if (ctx1 != NULL && ctx1->certificate != NULL) {
77533+ ExpectFalse(ssl->buffers.certificate == ctx1->certificate);
77534+ }
77535+ if (ctx1 != NULL && ctx1->certChain != NULL) {
77536+ ExpectFalse(ssl->buffers.certChain == ctx1->certChain);
77537+ }
77538+ #else
7752277539 ExpectTrue(ssl->buffers.certificate == ctx1->certificate);
7752377540 ExpectTrue(ssl->buffers.certChain == ctx1->certChain);
77541+ #endif
7752477542#ifdef WOLFSSL_SESSION_ID_CTX
7752577543 ExpectIntEQ(XMEMCMP(ssl->sessionCtx, session_id1, 4), 0);
7752677544#endif
0 commit comments