Skip to content

Commit 6f37b17

Browse files
committed
Address Copilot suggestions
1 parent 373b45c commit 6f37b17

2 files changed

Lines changed: 9 additions & 8 deletions

File tree

src/internal.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8953,10 +8953,10 @@ void wolfSSL_ResourceFree(WOLFSSL* ssl)
89538953
#if !defined(NO_TLS)
89548954
TLSX_FreeAll(ssl->extensions, ssl->heap);
89558955
ssl->extensions = NULL;
8956-
#if defined(HAVE_SECURE_RENEGOTIATION) \
8957-
|| defined(HAVE_SERVER_RENEGOTIATION_INFO)
8956+
#if defined(HAVE_SECURE_RENEGOTIATION) \
8957+
|| defined(HAVE_SERVER_RENEGOTIATION_INFO)
89588958
ssl->secure_renegotiation = NULL;
8959-
#endif
8959+
#endif
89608960
#endif /* !NO_TLS */
89618961
#ifdef HAVE_ALPN
89628962
if (ssl->alpn_peer_requested != NULL) {
@@ -9320,10 +9320,10 @@ void FreeHandshakeResources(WOLFSSL* ssl)
93209320
/* Some extensions need to be kept for post-handshake querying. */
93219321
TLSX_FreeAll(ssl->extensions, ssl->heap);
93229322
ssl->extensions = NULL;
9323-
#if defined(HAVE_SECURE_RENEGOTIATION) \
9324-
|| defined(HAVE_SERVER_RENEGOTIATION_INFO)
9323+
#if defined(HAVE_SECURE_RENEGOTIATION) \
9324+
|| defined(HAVE_SERVER_RENEGOTIATION_INFO)
93259325
ssl->secure_renegotiation = NULL;
9326-
#endif
9326+
#endif
93279327
#else
93289328
#if !defined(NO_CERTS) && !defined(WOLFSSL_NO_SIGALG)
93299329
TLSX_Remove(&ssl->extensions, TLSX_SIGNATURE_ALGORITHMS, ssl->heap);

tests/api.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10215,6 +10215,7 @@ static int test_wolfSSL_clear_secure_renegotiation(void)
1021510215
!defined(NO_WOLFSSL_CLIENT) && !defined(NO_TLS)
1021610216
WOLFSSL_CTX *ctx = wolfSSL_CTX_new(wolfSSLv23_client_method());
1021710217
WOLFSSL *ssl = wolfSSL_new(ctx);
10218+
int support;
1021810219

1021910220
ExpectNotNull(ctx);
1022010221
ExpectNotNull(ssl);
@@ -10225,9 +10226,9 @@ static int test_wolfSSL_clear_secure_renegotiation(void)
1022510226
ssl->secure_renegotiation->enabled = 1;
1022610227

1022710228
ExpectIntEQ(WOLFSSL_SUCCESS, wolfSSL_clear(ssl));
10229+
support = wolfSSL_SSL_get_secure_renegotiation_support(ssl);
1022810230
ExpectNull(ssl->secure_renegotiation);
10229-
ExpectIntEQ(WOLFSSL_FAILURE,
10230-
wolfSSL_SSL_get_secure_renegotiation_support(ssl));
10231+
ExpectIntEQ(WOLFSSL_FAILURE, support);
1023110232

1023210233
wolfSSL_free(ssl);
1023310234
wolfSSL_CTX_free(ctx);

0 commit comments

Comments
 (0)