From c0125ef8f3cee41f49a2d938f5c087fc22c57ce4 Mon Sep 17 00:00:00 2001 From: David Benjamin Date: Wed, 9 Sep 2015 09:11:07 -0400 Subject: Fix SSL_CIPHER_is_AESGCM. It was checking algorithm_mac rather than algorithm_enc. (Coincidentally, it gave the right answer if you compiled out the ChaCha20 ciphers since SSL_AES128GCM and SSL_AEAD shared a value.) Change-Id: I17047425ef7fabb98969144965d8db9528ef8497 Reviewed-on: https://boringssl-review.googlesource.com/5850 Reviewed-by: Adam Langley --- ssl/ssl_cipher.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ssl/ssl_cipher.c') diff --git a/ssl/ssl_cipher.c b/ssl/ssl_cipher.c index 976c6025..1b8673e9 100644 --- a/ssl/ssl_cipher.c +++ b/ssl/ssl_cipher.c @@ -1358,7 +1358,7 @@ int SSL_CIPHER_has_MD5_HMAC(const SSL_CIPHER *cipher) { } int SSL_CIPHER_is_AESGCM(const SSL_CIPHER *cipher) { - return (cipher->algorithm_mac & (SSL_AES128GCM | SSL_AES256GCM)) != 0; + return (cipher->algorithm_enc & (SSL_AES128GCM | SSL_AES256GCM)) != 0; } int SSL_CIPHER_is_CHACHA20POLY1305(const SSL_CIPHER *cipher) { -- cgit v1.2.3