diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ext/pre_shared_key.c | 4 | ||||
-rw-r--r-- | lib/gnutls_int.h | 6 | ||||
-rw-r--r-- | lib/session_pack.c | 4 | ||||
-rw-r--r-- | lib/tls13/session_ticket.c | 18 | ||||
-rw-r--r-- | lib/tls13/session_ticket.h | 6 |
5 files changed, 19 insertions, 19 deletions
diff --git a/lib/ext/pre_shared_key.c b/lib/ext/pre_shared_key.c index 7e61d45cb7..445abe4a8d 100644 --- a/lib/ext/pre_shared_key.c +++ b/lib/ext/pre_shared_key.c @@ -33,7 +33,7 @@ #include <assert.h> static int -compute_psk_from_ticket(const tls13_ticket_t *ticket, gnutls_datum_t *key) +compute_psk_from_ticket(const tls13_ticket_st *ticket, gnutls_datum_t *key) { int ret; char label[] = "resumption"; @@ -476,7 +476,7 @@ static int server_recv_params(gnutls_session_t session, psk_ext_iter_st psk_iter; struct psk_st psk; psk_auth_info_t info; - tls13_ticket_t ticket_data; + tls13_ticket_st ticket_data; uint32_t ticket_age; bool resuming; diff --git a/lib/gnutls_int.h b/lib/gnutls_int.h index f32eba181d..debd858432 100644 --- a/lib/gnutls_int.h +++ b/lib/gnutls_int.h @@ -1016,7 +1016,7 @@ typedef struct gnutls_dh_params_int { /* TLS 1.3 session ticket */ -typedef struct tls13_ticket { +typedef struct { time_t timestamp; uint32_t lifetime; uint32_t age_add; @@ -1025,7 +1025,7 @@ typedef struct tls13_ticket { const mac_entry_st *prf; uint8_t resumption_master_secret[MAX_HASH_SIZE]; gnutls_datum_t ticket; -} tls13_ticket_t; +} tls13_ticket_st; /* DTLS session state */ @@ -1447,7 +1447,7 @@ typedef struct { /* this is only used under TLS1.2 or earlier */ int session_ticket_renew; - tls13_ticket_t tls13_ticket; + tls13_ticket_st tls13_ticket; /* the amount of early data received so far */ uint32_t early_data_received; diff --git a/lib/session_pack.c b/lib/session_pack.c index 8d8abd9f3a..82ec51c0db 100644 --- a/lib/session_pack.c +++ b/lib/session_pack.c @@ -323,7 +323,7 @@ tls13_pack_security_parameters(gnutls_session_t session, gnutls_buffer_st *ps) int ret = 0; uint32_t length = 0; size_t length_pos; - tls13_ticket_t *ticket = &session->internals.tls13_ticket; + tls13_ticket_st *ticket = &session->internals.tls13_ticket; length_pos = ps->length; BUFFER_APPEND_NUM(ps, 0); @@ -359,7 +359,7 @@ static int tls13_unpack_security_parameters(gnutls_session_t session, gnutls_buffer_st *ps) { uint32_t ttl_len; - tls13_ticket_t *ticket = &session->internals.tls13_ticket; + tls13_ticket_st *ticket = &session->internals.tls13_ticket; gnutls_datum_t t; int ret = 0; diff --git a/lib/tls13/session_ticket.c b/lib/tls13/session_ticket.c index 36d5dc5260..a28c847c17 100644 --- a/lib/tls13/session_ticket.c +++ b/lib/tls13/session_ticket.c @@ -34,7 +34,7 @@ #include "db.h" static int -pack_ticket(gnutls_session_t session, tls13_ticket_t *ticket, gnutls_datum_t *packed) +pack_ticket(gnutls_session_t session, tls13_ticket_st *ticket, gnutls_datum_t *packed) { uint8_t *p; gnutls_datum_t state; @@ -85,7 +85,7 @@ pack_ticket(gnutls_session_t session, tls13_ticket_t *ticket, gnutls_datum_t *pa } static int -unpack_ticket(gnutls_session_t session, gnutls_datum_t *packed, tls13_ticket_t *data) +unpack_ticket(gnutls_session_t session, gnutls_datum_t *packed, tls13_ticket_st *data) { uint32_t age_add, lifetime; uint8_t resumption_master_secret[MAX_HASH_SIZE]; @@ -174,11 +174,11 @@ unpack_ticket(gnutls_session_t session, gnutls_datum_t *packed, tls13_ticket_t * } static int -generate_session_ticket(gnutls_session_t session, tls13_ticket_t *ticket) +generate_session_ticket(gnutls_session_t session, tls13_ticket_st *ticket) { int ret; gnutls_datum_t packed = { NULL, 0 }; - tls13_ticket_t ticket_data; + tls13_ticket_st ticket_data; time_t now = gnutls_time(0); if (session->internals.resumed != RESUME_FALSE) { @@ -234,7 +234,7 @@ int _gnutls13_send_session_ticket(gnutls_session_t session, unsigned nr, unsigne int ret = 0; mbuffer_st *bufel = NULL; gnutls_buffer_st buf; - tls13_ticket_t ticket; + tls13_ticket_st ticket; unsigned i; /* Client does not send a NewSessionTicket */ @@ -253,7 +253,7 @@ int _gnutls13_send_session_ticket(gnutls_session_t session, unsigned nr, unsigne if (again == 0) { for (i=0;i<nr;i++) { - memset(&ticket, 0, sizeof(tls13_ticket_t)); + memset(&ticket, 0, sizeof(tls13_ticket_st)); bufel = NULL; ret = _gnutls_buffer_init_handshake_mbuffer(&buf); @@ -346,7 +346,7 @@ int _gnutls13_recv_session_ticket(gnutls_session_t session, gnutls_buffer_st *bu { int ret; uint8_t value; - tls13_ticket_t *ticket = &session->internals.tls13_ticket; + tls13_ticket_st *ticket = &session->internals.tls13_ticket; gnutls_datum_t t; size_t val; @@ -354,7 +354,7 @@ int _gnutls13_recv_session_ticket(gnutls_session_t session, gnutls_buffer_st *bu return gnutls_assert_val(GNUTLS_E_INTERNAL_ERROR); _gnutls_free_datum(&ticket->ticket); - memset(ticket, 0, sizeof(tls13_ticket_t)); + memset(ticket, 0, sizeof(tls13_ticket_st)); _gnutls_handshake_log("HSK[%p]: parsing session ticket message\n", session); @@ -407,7 +407,7 @@ int _gnutls13_recv_session_ticket(gnutls_session_t session, gnutls_buffer_st *bu */ int _gnutls13_unpack_session_ticket(gnutls_session_t session, gnutls_datum_t *data, - tls13_ticket_t *ticket_data) + tls13_ticket_st *ticket_data) { int ret; gnutls_datum_t decrypted = { NULL, 0 }; diff --git a/lib/tls13/session_ticket.h b/lib/tls13/session_ticket.h index d2f637c209..feab3e2379 100644 --- a/lib/tls13/session_ticket.h +++ b/lib/tls13/session_ticket.h @@ -27,17 +27,17 @@ int _gnutls13_send_session_ticket(gnutls_session_t session, unsigned nr, unsigne int _gnutls13_unpack_session_ticket(gnutls_session_t session, gnutls_datum_t *data, - tls13_ticket_t *ticket_data); + tls13_ticket_st *ticket_data); inline static -void tls13_ticket_deinit(tls13_ticket_t *ticket) +void tls13_ticket_deinit(tls13_ticket_st *ticket) { if (ticket) { zeroize_temp_key(&ticket->resumption_master_secret, sizeof(ticket->resumption_master_secret)); _gnutls_free_datum(&ticket->ticket); - memset(ticket, 0, sizeof(tls13_ticket_t)); + memset(ticket, 0, sizeof(tls13_ticket_st)); } } |