diff --git a/examples/server/server.c b/examples/server/server.c index 99827cde5..de3da45a7 100644 --- a/examples/server/server.c +++ b/examples/server/server.c @@ -474,7 +474,7 @@ THREAD_RETURN CYASSL_THREAD server_test(void* args) #ifdef WOLFSSL_EARLY_DATA int earlyData = 0; #endif -#ifdef WOLFSSL_HRR_COOKIE +#ifdef WOLFSSL_SEND_HRR_COOKIE int hrrCookie = 0; #endif @@ -751,7 +751,7 @@ THREAD_RETURN CYASSL_THREAD server_test(void* args) break; case 'J' : - #ifdef WOLFSSL_HRR_COOKIE + #ifdef WOLFSSL_SEND_HRR_COOKIE hrrCookie = 1; #endif break; @@ -1093,7 +1093,7 @@ THREAD_RETURN CYASSL_THREAD server_test(void* args) wolfSSL_KeepArrays(ssl); #endif -#ifdef WOLFSSL_HRR_COOKIE +#ifdef WOLFSSL_SEND_HRR_COOKIE if (hrrCookie && wolfSSL_send_hrr_cookie(ssl, NULL, 0) != SSL_SUCCESS) { err_sys("unable to set use of cookie with HRR msg"); } diff --git a/src/internal.c b/src/internal.c index 8078144f5..c215465f8 100755 --- a/src/internal.c +++ b/src/internal.c @@ -4550,7 +4550,7 @@ void SSL_ResourceFree(WOLFSSL* ssl) ShrinkInputBuffer(ssl, FORCED_FREE); if (ssl->buffers.outputBuffer.dynamicFlag) ShrinkOutputBuffer(ssl); -#if defined(WOLFSSL_HRR_COOKIE) && !defined(NO_WOLFSSL_SERVER) +#if defined(WOLFSSL_SEND_HRR_COOKIE) && !defined(NO_WOLFSSL_SERVER) XFREE(ssl->buffers.tls13CookieSecret.buffer, ssl->heap, DYNAMIC_TYPE_COOKIE_PWD); #endif diff --git a/src/tls13.c b/src/tls13.c index 4bf455e27..a13722f85 100644 --- a/src/tls13.c +++ b/src/tls13.c @@ -2376,7 +2376,7 @@ int SendTls13ClientHello(WOLFSSL* ssl) } #ifndef WOLFSSL_TLS13_DRAFT_18 -#ifdef WOLFSSL_HRR_COOKIE +#ifdef WOLFSSL_SEND_HRR_COOKIE /* Create Cookie extension using the hash of the first ClientHello. * * ssl SSL/TLS object. @@ -2455,7 +2455,7 @@ static int RestartHandshakeHash(WOLFSSL* ssl) WOLFSSL_MSG("Restart Hash"); WOLFSSL_BUFFER(hash, hashSz); -#ifdef WOLFSSL_HRR_COOKIE +#ifdef WOLFSSL_SEND_HRR_COOKIE if (ssl->options.sendCookie) { byte cookie[OPAQUE8_LEN + MAX_DIGEST_SIZE + OPAQUE16_LEN * 2]; TLSX* ext; @@ -3116,7 +3116,7 @@ static int DoPreSharedKeys(WOLFSSL* ssl, const byte* input, word32 helloSz, } #endif -#if !defined(WOLFSSL_TLS13_DRAFT_18) && defined(WOLFSSL_HRR_COOKIE) +#if !defined(WOLFSSL_TLS13_DRAFT_18) && defined(WOLFSSL_SEND_HRR_COOKIE) /* Check that the Cookie data's integrity. * * ssl SSL/TLS object. @@ -3387,7 +3387,7 @@ static int DoTls13ClientHello(WOLFSSL* ssl, const byte* input, word32* inOutIdx, if (TLSX_Find(ssl->extensions, TLSX_SUPPORTED_VERSIONS) == NULL) ssl->version.minor = pv.minor; -#ifdef WOLFSSL_HRR_COOKIE +#ifdef WOLFSSL_SEND_HRR_COOKIE if (ssl->options.sendCookie && ssl->options.serverState == SERVER_HELLO_RETRY_REQUEST) { TLSX* ext; @@ -6674,7 +6674,7 @@ int wolfSSL_connect_TLSv13(WOLFSSL* ssl) } } -#if defined(WOLFSSL_HRR_COOKIE) && !defined(NO_WOLFSSL_SERVER) +#if defined(WOLFSSL_SEND_HRR_COOKIE) && !defined(NO_WOLFSSL_SERVER) /* Send a cookie with the HelloRetryRequest to avoid storing state. * * ssl SSL/TLS object. diff --git a/wolfssl/internal.h b/wolfssl/internal.h index befc50d59..50ae73dd4 100755 --- a/wolfssl/internal.h +++ b/wolfssl/internal.h @@ -2691,7 +2691,7 @@ typedef struct Buffers { int certChainCnt; #endif #endif -#ifdef WOLFSSL_HRR_COOKIE +#ifdef WOLFSSL_SEND_HRR_COOKIE buffer tls13CookieSecret; /* HRR cookie secret */ #endif #ifdef WOLFSSL_DTLS