comparison src/event/ngx_event_openssl.h @ 6854:75e7d55214bd

SSL: support AES256 encryption of tickets. This implies ticket key size of 80 bytes instead of previously used 48, as both HMAC and AES keys are 32 bytes now. When an old 48-byte ticket key is provided, we fall back to using backward-compatible AES128 encryption. OpenSSL switched to using AES256 in 1.1.0, and we are providing equivalent security. While here, order of HMAC and AES keys was reverted to make the implementation compatible with keys used by OpenSSL with SSL_CTX_set_tlsext_ticket_keys(). Prodded by Christian Klinger.
author Maxim Dounin <mdounin@mdounin.ru>
date Fri, 23 Dec 2016 17:28:20 +0300
parents e75e854657ba
children 08dc60979133
comparison
equal deleted inserted replaced
6853:c85dfd99a2dd 6854:75e7d55214bd
115 115
116 116
117 #ifdef SSL_CTRL_SET_TLSEXT_TICKET_KEY_CB 117 #ifdef SSL_CTRL_SET_TLSEXT_TICKET_KEY_CB
118 118
119 typedef struct { 119 typedef struct {
120 size_t size;
120 u_char name[16]; 121 u_char name[16];
121 u_char aes_key[16]; 122 u_char hmac_key[32];
122 u_char hmac_key[16]; 123 u_char aes_key[32];
123 } ngx_ssl_session_ticket_key_t; 124 } ngx_ssl_session_ticket_key_t;
124 125
125 #endif 126 #endif
126 127
127 128