Remove TODOs around TLS 1.3 draft version.

pull/1768/head
Sean Parkinson 2018-08-21 08:41:50 +10:00
parent 3cdeccc36e
commit 20950ffde8
4 changed files with 0 additions and 31 deletions

View File

@ -16812,17 +16812,12 @@ exit_dpk:
*/
int CheckVersion(WOLFSSL *ssl, ProtocolVersion pv)
{
#ifdef WOLFSSL_TLS13
#ifdef WOLFSSL_TLS13_DRAFT
/* TODO: [TLS13] Remove this.
* Translate the draft TLS v1.3 version to final version.
*/
if (pv.major == TLS_DRAFT_MAJOR) {
pv.major = SSLv3_MAJOR;
pv.minor = TLSv1_3_MINOR;
}
#endif
#endif
#ifdef OPENSSL_EXTRA
if (ssl->CBIS != NULL) {

View File

@ -15519,7 +15519,6 @@ const char* wolfSSL_get_version(WOLFSSL* ssl)
return "TLSv1.2";
#ifdef WOLFSSL_TLS13
case TLSv1_3_MINOR :
/* TODO: [TLS13] Remove draft versions. */
#ifdef WOLFSSL_TLS13_DRAFT
#ifdef WOLFSSL_TLS13_DRAFT_18
return "TLSv1.3 (Draft 18)";

View File

@ -5232,7 +5232,6 @@ static int TLSX_SupportedVersions_Write(void* data, byte* output,
*(output++) = (byte)(cnt * OPAQUE16_LEN);
for (i = 0; i < cnt; i++) {
#ifdef WOLFSSL_TLS13_DRAFT
/* TODO: [TLS13] Remove code when TLS v1.3 becomes an RFC. */
if (pv.minor - i == TLSv1_3_MINOR) {
/* The TLS draft major number. */
*(output++) = TLS_DRAFT_MAJOR;
@ -5308,7 +5307,6 @@ static int TLSX_SupportedVersions_Parse(WOLFSSL* ssl, byte* input,
minor = input[i + OPAQUE8_LEN];
#ifdef WOLFSSL_TLS13_DRAFT
/* TODO: [TLS13] Remove code when TLS v1.3 becomes an RFC. */
if (major == TLS_DRAFT_MAJOR && minor == TLS_DRAFT_MINOR) {
major = SSLv3_MAJOR;
minor = TLSv1_3_MINOR;
@ -5363,7 +5361,6 @@ static int TLSX_SupportedVersions_Parse(WOLFSSL* ssl, byte* input,
minor = input[OPAQUE8_LEN];
#ifdef WOLFSSL_TLS13_DRAFT
/* TODO: [TLS13] Remove code when TLS v1.3 becomes an RFC. */
if (major == TLS_DRAFT_MAJOR && minor == TLS_DRAFT_MINOR) {
major = SSLv3_MAJOR;
minor = TLSv1_3_MINOR;

View File

@ -3639,13 +3639,6 @@ static int RestartHandshakeHashWithCookie(WOLFSSL* ssl, Cookie* cookie)
idx += hashSz;
hrrIdx = HANDSHAKE_HEADER_SZ;
/* TODO: [TLS13] Replace existing code with code in comment.
* Use the TLS v1.3 draft version for now.
*
* Change to:
* hrr[hrrIdx++] = ssl->version.major;
* hrr[hrrIdx++] = ssl->version.minor;
*/
/* The negotiated protocol version. */
hrr[hrrIdx++] = TLS_DRAFT_MAJOR;
hrr[hrrIdx++] = TLS_DRAFT_MINOR;
@ -3704,7 +3697,6 @@ static int RestartHandshakeHashWithCookie(WOLFSSL* ssl, Cookie* cookie)
hrrIdx += 2;
c16toa(OPAQUE16_LEN, hrr + hrrIdx);
hrrIdx += 2;
/* TODO: [TLS13] Change to ssl->version.major and minor once final. */
#ifdef WOLFSSL_TLS13_DRAFT
hrr[hrrIdx++] = TLS_DRAFT_MAJOR;
hrr[hrrIdx++] = TLS_DRAFT_MINOR;
@ -4048,13 +4040,6 @@ int SendTls13HelloRetryRequest(WOLFSSL* ssl)
/* Add record and hanshake headers. */
AddTls13Headers(output, length, hello_retry_request, ssl);
/* TODO: [TLS13] Replace existing code with code in comment.
* Use the TLS v1.3 draft version for now.
*
* Change to:
* output[idx++] = ssl->version.major;
* output[idx++] = ssl->version.minor;
*/
/* The negotiated protocol version. */
output[idx++] = TLS_DRAFT_MAJOR;
output[idx++] = TLS_DRAFT_MINOR;
@ -4145,13 +4130,6 @@ int SendTls13ServerHello(WOLFSSL* ssl, byte extMsgType)
AddTls13Headers(output, length, server_hello, ssl);
#ifdef WOLFSSL_TLS13_DRAFT_18
/* TODO: [TLS13] Replace existing code with code in comment.
* Use the TLS v1.3 draft version for now.
*
* Change to:
* output[idx++] = ssl->version.major;
* output[idx++] = ssl->version.minor;
*/
/* The negotiated protocol version. */
output[idx++] = TLS_DRAFT_MAJOR;
output[idx++] = TLS_DRAFT_MINOR;