summaryrefslogtreecommitdiffstats
path: root/ssl/t1_enc.c
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2017-02-03 02:44:15 +0000
committerDr. Stephen Henson <steve@openssl.org>2017-02-08 02:16:27 +0000
commitec07b1d872300f347c436ff5e549b94f79c0fa63 (patch)
tree891a0305c6b29e792200fc73e6646c1bf964358d /ssl/t1_enc.c
parentaa24c47c834015dd34d00bcf9373113f0c57e1f0 (diff)
Add CCM mode support for TLS 1.3
Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2550)
Diffstat (limited to 'ssl/t1_enc.c')
-rw-r--r--ssl/t1_enc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ssl/t1_enc.c b/ssl/t1_enc.c
index d97b9a8ea9..ebdc0fbd52 100644
--- a/ssl/t1_enc.c
+++ b/ssl/t1_enc.c
@@ -281,9 +281,9 @@ int tls1_change_cipher_state(SSL *s, int which)
int taglen;
if (s->s3->tmp.
new_cipher->algorithm_enc & (SSL_AES128CCM8 | SSL_AES256CCM8))
- taglen = 8;
+ taglen = EVP_CCM8_TLS_TAG_LEN;
else
- taglen = 16;
+ taglen = EVP_CCM_TLS_TAG_LEN;
if (!EVP_CipherInit_ex(dd, c, NULL, NULL, NULL, (which & SSL3_CC_WRITE))
|| !EVP_CIPHER_CTX_ctrl(dd, EVP_CTRL_AEAD_SET_IVLEN, 12, NULL)
|| !EVP_CIPHER_CTX_ctrl(dd, EVP_CTRL_AEAD_SET_TAG, taglen, NULL)