Remove AES-GCM cipher indices.

Those ciphers go through EVP_AEAD now.

Change-Id: Ia97af9960223724f041dc2c249def9e626fd03f8
Reviewed-on: https://boringssl-review.googlesource.com/1520
Reviewed-by: Adam Langley <agl@google.com>
This commit is contained in:
David Benjamin 2014-08-14 17:07:45 -04:00 committed by Adam Langley
parent b00eee1935
commit d4178fd9d8
2 changed files with 3 additions and 16 deletions

View File

@ -92,10 +92,10 @@ extern "C" {
/* AEAD algorithms. */
/* EVP_aes_128_gcm is AES-128 in Galois Counter Mode. */
/* EVP_aead_aes_128_gcm is AES-128 in Galois Counter Mode. */
OPENSSL_EXPORT const EVP_AEAD *EVP_aead_aes_128_gcm(void);
/* EVP_aes_256_gcm is AES-256 in Galois Counter Mode. */
/* EVP_aead_aes_256_gcm is AES-256 in Galois Counter Mode. */
OPENSSL_EXPORT const EVP_AEAD *EVP_aead_aes_256_gcm(void);
/* EVP_aead_chacha20_poly1305 is an AEAD built from ChaCha20 and Poly1305. */

View File

@ -152,9 +152,7 @@
#define SSL_ENC_RC4_IDX 2
#define SSL_ENC_AES128_IDX 3
#define SSL_ENC_AES256_IDX 4
#define SSL_ENC_AES128GCM_IDX 5
#define SSL_ENC_AES256GCM_IDX 6
#define SSL_ENC_NUM_IDX 7
#define SSL_ENC_NUM_IDX 5
static const EVP_CIPHER *ssl_cipher_methods[SSL_ENC_NUM_IDX]= { 0 };
@ -298,9 +296,6 @@ void ssl_load_ciphers(void)
ssl_cipher_methods[SSL_ENC_AES128_IDX]= EVP_aes_128_cbc();
ssl_cipher_methods[SSL_ENC_AES256_IDX]= EVP_aes_256_cbc();
ssl_cipher_methods[SSL_ENC_AES128GCM_IDX]= EVP_aes_128_gcm();
ssl_cipher_methods[SSL_ENC_AES256GCM_IDX]= EVP_aes_256_gcm();
ssl_digest_methods[SSL_MD_MD5_IDX]= EVP_md5();
ssl_mac_secret_size[SSL_MD_MD5_IDX]= EVP_MD_size(EVP_md5());
assert(ssl_mac_secret_size[SSL_MD_MD5_IDX] >= 0);
@ -385,12 +380,6 @@ int ssl_cipher_get_evp(const SSL_SESSION *s, const EVP_CIPHER **enc,
case SSL_AES256:
i=SSL_ENC_AES256_IDX;
break;
case SSL_AES128GCM:
i=SSL_ENC_AES128GCM_IDX;
break;
case SSL_AES256GCM:
i=SSL_ENC_AES256GCM_IDX;
break;
default:
i= -1;
break;
@ -558,8 +547,6 @@ static void ssl_cipher_get_disabled(unsigned long *mkey, unsigned long *auth, un
*enc |= (ssl_cipher_methods[SSL_ENC_RC4_IDX ] == NULL) ? SSL_RC4 :0;
*enc |= (ssl_cipher_methods[SSL_ENC_AES128_IDX] == NULL) ? SSL_AES128:0;
*enc |= (ssl_cipher_methods[SSL_ENC_AES256_IDX] == NULL) ? SSL_AES256:0;
*enc |= (ssl_cipher_methods[SSL_ENC_AES128GCM_IDX] == NULL) ? SSL_AES128GCM:0;
*enc |= (ssl_cipher_methods[SSL_ENC_AES256GCM_IDX] == NULL) ? SSL_AES256GCM:0;
*mac |= (ssl_digest_methods[SSL_MD_MD5_IDX ] == NULL) ? SSL_MD5 :0;
*mac |= (ssl_digest_methods[SSL_MD_SHA1_IDX] == NULL) ? SSL_SHA1:0;