diff options
author | Bernd Edlinger <bernd.edlinger@hotmail.de> | 2017-02-13 18:36:13 +0100 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2017-02-14 14:45:08 -0500 |
commit | 177b4225baac56336e04fd97d0c993fd45d3e45e (patch) | |
tree | 28724fcb400df4597aba0d0864e00c6b898f358b | |
parent | be31d57686a551261cfd5deb95c9553402942a43 (diff) |
Use TLSEXT_KEYNAME_LENGTH in tls_decrypt_ticket.
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2618)
(cherry picked from commit 57b0d651f052ed86528da916397acbcce035fb21)
-rw-r--r-- | ssl/t1_lib.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ssl/t1_lib.c b/ssl/t1_lib.c index f1e4d29f7b..b51d60a7cc 100644 --- a/ssl/t1_lib.c +++ b/ssl/t1_lib.c @@ -3151,8 +3151,8 @@ static int tls_decrypt_ticket(SSL *s, const unsigned char *etick, } /* Attempt to decrypt session data */ /* Move p after IV to start of encrypted ticket, update length */ - p = etick + 16 + EVP_CIPHER_CTX_iv_length(ctx); - eticklen -= 16 + EVP_CIPHER_CTX_iv_length(ctx); + p = etick + TLSEXT_KEYNAME_LENGTH + EVP_CIPHER_CTX_iv_length(ctx); + eticklen -= TLSEXT_KEYNAME_LENGTH + EVP_CIPHER_CTX_iv_length(ctx); sdec = OPENSSL_malloc(eticklen); if (sdec == NULL || EVP_DecryptUpdate(ctx, sdec, &slen, p, eticklen) <= 0) { EVP_CIPHER_CTX_free(ctx); |