diff options
author | Ander Juaristi <a@juaristi.eus> | 2018-02-28 19:08:37 +0100 |
---|---|---|
committer | Ander Juaristi <a@juaristi.eus> | 2018-02-28 19:09:51 +0100 |
commit | 629a4e7b030bdd317605a1ce76c98d0d7eaf980e (patch) | |
tree | 3cb8dc9fef01070afac64231b37061aecde91ff7 /lib/ext/session_ticket.h | |
parent | cf4291befab566ecd34bac98c09d29dbce71f349 (diff) | |
download | gnutls-tmp-draft-ietf-tls-tls13-21-ajuaristi-session-resumption-2.tar.gz |
TLS 1.3: Session resumptiontmp-draft-ietf-tls-tls13-21-ajuaristi-session-resumption-2
Signed-off-by: Ander Juaristi <a@juaristi.eus>
Diffstat (limited to 'lib/ext/session_ticket.h')
-rw-r--r-- | lib/ext/session_ticket.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/ext/session_ticket.h b/lib/ext/session_ticket.h index c00c3f6b7e..e744dd687b 100644 --- a/lib/ext/session_ticket.h +++ b/lib/ext/session_ticket.h @@ -25,9 +25,26 @@ #include <hello_ext.h> +#define KEY_NAME_SIZE 16 +#define IV_SIZE 16 +#define MAC_SIZE 20 /* HMAC-SHA1 */ + +struct ticket_st { + uint8_t key_name[KEY_NAME_SIZE]; + uint8_t IV[IV_SIZE]; + uint8_t *encrypted_state; + uint16_t encrypted_state_len; + uint8_t mac[MAC_SIZE]; +}; + extern const hello_ext_entry_st ext_mod_session_ticket; int _gnutls_send_new_session_ticket(gnutls_session_t session, int again); int _gnutls_recv_new_session_ticket(gnutls_session_t session); +int _gnutls_encrypt_session_ticket(gnutls_session_t session, + struct ticket_st *ticket); +int _gnutls_decrypt_session_ticket(gnutls_session_t session, + struct ticket_st *ticket); + #endif |