From 5624ec824e8a495c1fce5fe8a49907ef0852cbc1 Mon Sep 17 00:00:00 2001 From: Simon Butcher Date: Tue, 29 Sep 2015 01:06:06 +0100 Subject: [PATCH] Reordered TLS extension fields in client Session ticket placed at end --- ChangeLog | 2 +- library/ssl_cli.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4eb8dd883..d4d859813 100644 --- a/ChangeLog +++ b/ChangeLog @@ -10,7 +10,7 @@ Changes * Added checking of hostname length in mbedtls_ssl_set_hostname() to ensure domain names are compliant with RFC 1035. -= mbe TLS 2.1.1 released 2015-09-17 += mbed TLS 2.1.1 released 2015-09-17 Security * Add countermeasure against Lenstra's RSA-CRT attack for PKCS#1 v1.5 diff --git a/library/ssl_cli.c b/library/ssl_cli.c index 1ba8648c9..32eae0f2a 100644 --- a/library/ssl_cli.c +++ b/library/ssl_cli.c @@ -909,13 +909,13 @@ static int ssl_write_client_hello( mbedtls_ssl_context *ssl ) ext_len += olen; #endif -#if defined(MBEDTLS_SSL_SESSION_TICKETS) - ssl_write_session_ticket_ext( ssl, p + 2 + ext_len, &olen ); +#if defined(MBEDTLS_SSL_ALPN) + ssl_write_alpn_ext( ssl, p + 2 + ext_len, &olen ); ext_len += olen; #endif -#if defined(MBEDTLS_SSL_ALPN) - ssl_write_alpn_ext( ssl, p + 2 + ext_len, &olen ); +#if defined(MBEDTLS_SSL_SESSION_TICKETS) + ssl_write_session_ticket_ext( ssl, p + 2 + ext_len, &olen ); ext_len += olen; #endif