From baafa4a653b095f5dd96e9050494e635bd7d8f26 Mon Sep 17 00:00:00 2001 From: Martin Kreichgauer Date: Tue, 9 Aug 2016 10:18:40 -0700 Subject: [PATCH] Undo rename of tlsext_tick_lifetime_hint. It was renamed to ticket_liftetime_hint in 1e6f11a7ff72bea394e6651b512e435fbc95d323, which breaks Qt. Change-Id: I9c6d3097fe96e669f06a4e0880bd4d7d82b03ba8 Reviewed-on: https://boringssl-review.googlesource.com/10181 Reviewed-by: Adam Langley Commit-Queue: Adam Langley CQ-Verified: CQ bot account: commit-bot@chromium.org --- include/openssl/ssl.h | 2 +- ssl/handshake_client.c | 6 +++--- ssl/ssl_asn1.c | 6 +++--- ssl/ssl_session.c | 2 +- ssl/tls13_client.c | 2 +- ssl/tls13_server.c | 4 ++-- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/include/openssl/ssl.h b/include/openssl/ssl.h index ea339996..af77f991 100644 --- a/include/openssl/ssl.h +++ b/include/openssl/ssl.h @@ -3697,7 +3697,7 @@ struct ssl_session_st { uint8_t original_handshake_hash[EVP_MAX_MD_SIZE]; unsigned original_handshake_hash_len; - uint32_t ticket_lifetime_hint; /* Session lifetime hint in seconds */ + uint32_t tlsext_tick_lifetime_hint; /* Session lifetime hint in seconds */ uint32_t ticket_flags; uint32_t ticket_age_add; diff --git a/ssl/handshake_client.c b/ssl/handshake_client.c index 0b50505c..d760d106 100644 --- a/ssl/handshake_client.c +++ b/ssl/handshake_client.c @@ -1912,9 +1912,9 @@ static int ssl3_get_new_session_ticket(SSL *ssl) { } CBS new_session_ticket, ticket; - uint32_t ticket_lifetime_hint; + uint32_t tlsext_tick_lifetime_hint; CBS_init(&new_session_ticket, ssl->init_msg, ssl->init_num); - if (!CBS_get_u32(&new_session_ticket, &ticket_lifetime_hint) || + if (!CBS_get_u32(&new_session_ticket, &tlsext_tick_lifetime_hint) || !CBS_get_u16_length_prefixed(&new_session_ticket, &ticket) || CBS_len(&new_session_ticket) != 0) { ssl3_send_alert(ssl, SSL3_AL_FATAL, SSL_AD_DECODE_ERROR); @@ -1950,7 +1950,7 @@ static int ssl3_get_new_session_ticket(SSL *ssl) { OPENSSL_PUT_ERROR(SSL, ERR_R_MALLOC_FAILURE); goto err; } - session->ticket_lifetime_hint = ticket_lifetime_hint; + session->tlsext_tick_lifetime_hint = tlsext_tick_lifetime_hint; /* Generate a session ID for this session based on the session ticket. We use * the session ID mechanism for detecting ticket resumption. This also fits in diff --git a/ssl/ssl_asn1.c b/ssl/ssl_asn1.c index b1c6a093..6d37054e 100644 --- a/ssl/ssl_asn1.c +++ b/ssl/ssl_asn1.c @@ -261,9 +261,9 @@ static int SSL_SESSION_to_bytes_full(const SSL_SESSION *in, uint8_t **out_data, } } - if (in->ticket_lifetime_hint > 0) { + if (in->tlsext_tick_lifetime_hint > 0) { if (!CBB_add_asn1(&session, &child, kTicketLifetimeHintTag) || - !CBB_add_asn1_uint64(&child, in->ticket_lifetime_hint)) { + !CBB_add_asn1_uint64(&child, in->tlsext_tick_lifetime_hint)) { OPENSSL_PUT_ERROR(SSL, ERR_R_MALLOC_FAILURE); goto err; } @@ -596,7 +596,7 @@ static SSL_SESSION *SSL_SESSION_parse(CBS *cbs) { kHostNameTag) || !SSL_SESSION_parse_string(&session, &ret->psk_identity, kPSKIdentityTag) || - !SSL_SESSION_parse_u32(&session, &ret->ticket_lifetime_hint, + !SSL_SESSION_parse_u32(&session, &ret->tlsext_tick_lifetime_hint, kTicketLifetimeHintTag, 0) || !SSL_SESSION_parse_octet_string(&session, &ret->tlsext_tick, &ret->tlsext_ticklen, kTicketTag)) { diff --git a/ssl/ssl_session.c b/ssl/ssl_session.c index c3a48999..4680a408 100644 --- a/ssl/ssl_session.c +++ b/ssl/ssl_session.c @@ -252,7 +252,7 @@ SSL_SESSION *SSL_SESSION_dup(SSL_SESSION *session, int include_ticket) { session->original_handshake_hash_len); new_session->original_handshake_hash_len = session->original_handshake_hash_len; - new_session->ticket_lifetime_hint = session->ticket_lifetime_hint; + new_session->tlsext_tick_lifetime_hint = session->tlsext_tick_lifetime_hint; new_session->ticket_flags = session->ticket_flags; new_session->ticket_age_add = session->ticket_age_add; new_session->extended_master_secret = session->extended_master_secret; diff --git a/ssl/tls13_client.c b/ssl/tls13_client.c index 9dc49232..61e1414c 100644 --- a/ssl/tls13_client.c +++ b/ssl/tls13_client.c @@ -576,7 +576,7 @@ int tls13_process_new_session_ticket(SSL *ssl) { CBS cbs, extensions, ticket; CBS_init(&cbs, ssl->init_msg, ssl->init_num); - if (!CBS_get_u32(&cbs, &session->ticket_lifetime_hint) || + if (!CBS_get_u32(&cbs, &session->tlsext_tick_lifetime_hint) || !CBS_get_u32(&cbs, &session->ticket_flags) || !CBS_get_u32(&cbs, &session->ticket_age_add) || !CBS_get_u16_length_prefixed(&cbs, &extensions) || diff --git a/ssl/tls13_server.c b/ssl/tls13_server.c index 71c716d3..1ece1048 100644 --- a/ssl/tls13_server.c +++ b/ssl/tls13_server.c @@ -515,7 +515,7 @@ static enum ssl_hs_wait_t do_process_client_finished(SSL *ssl, static enum ssl_hs_wait_t do_send_new_session_ticket(SSL *ssl, SSL_HANDSHAKE *hs) { SSL_SESSION *session = ssl->s3->new_session; - session->ticket_lifetime_hint = session->timeout; + session->tlsext_tick_lifetime_hint = session->timeout; session->ticket_flags = SSL_TICKET_ALLOW_DHE_RESUMPTION; if (!RAND_bytes((uint8_t *)&session->ticket_age_add, sizeof(session->ticket_age_add))) { @@ -526,7 +526,7 @@ static enum ssl_hs_wait_t do_send_new_session_ticket(SSL *ssl, CBB cbb, body, ticket; if (!ssl->method->init_message(ssl, &cbb, &body, SSL3_MT_NEW_SESSION_TICKET) || - !CBB_add_u32(&body, session->ticket_lifetime_hint) || + !CBB_add_u32(&body, session->tlsext_tick_lifetime_hint) || !CBB_add_u32(&body, session->ticket_flags) || !CBB_add_u32(&body, session->ticket_age_add) || !CBB_add_u16(&body, 0 /* no ticket extensions */) ||