Change define name for sending HRR Cookie

This commit is contained in:
Sean Parkinson
2017-06-27 08:37:55 +10:00
parent 8bd6a1e727
commit 9ca1903ac5
4 changed files with 10 additions and 10 deletions

View File

@@ -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");
}

View File

@@ -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

View File

@@ -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.

View File

@@ -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