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:
parent
b00eee1935
commit
d4178fd9d8
@ -92,10 +92,10 @@ extern "C" {
|
|||||||
|
|
||||||
/* AEAD algorithms. */
|
/* 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);
|
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);
|
OPENSSL_EXPORT const EVP_AEAD *EVP_aead_aes_256_gcm(void);
|
||||||
|
|
||||||
/* EVP_aead_chacha20_poly1305 is an AEAD built from ChaCha20 and Poly1305. */
|
/* EVP_aead_chacha20_poly1305 is an AEAD built from ChaCha20 and Poly1305. */
|
||||||
|
@ -152,9 +152,7 @@
|
|||||||
#define SSL_ENC_RC4_IDX 2
|
#define SSL_ENC_RC4_IDX 2
|
||||||
#define SSL_ENC_AES128_IDX 3
|
#define SSL_ENC_AES128_IDX 3
|
||||||
#define SSL_ENC_AES256_IDX 4
|
#define SSL_ENC_AES256_IDX 4
|
||||||
#define SSL_ENC_AES128GCM_IDX 5
|
#define SSL_ENC_NUM_IDX 5
|
||||||
#define SSL_ENC_AES256GCM_IDX 6
|
|
||||||
#define SSL_ENC_NUM_IDX 7
|
|
||||||
|
|
||||||
|
|
||||||
static const EVP_CIPHER *ssl_cipher_methods[SSL_ENC_NUM_IDX]= { 0 };
|
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_AES128_IDX]= EVP_aes_128_cbc();
|
||||||
ssl_cipher_methods[SSL_ENC_AES256_IDX]= EVP_aes_256_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_digest_methods[SSL_MD_MD5_IDX]= EVP_md5();
|
||||||
ssl_mac_secret_size[SSL_MD_MD5_IDX]= EVP_MD_size(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);
|
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:
|
case SSL_AES256:
|
||||||
i=SSL_ENC_AES256_IDX;
|
i=SSL_ENC_AES256_IDX;
|
||||||
break;
|
break;
|
||||||
case SSL_AES128GCM:
|
|
||||||
i=SSL_ENC_AES128GCM_IDX;
|
|
||||||
break;
|
|
||||||
case SSL_AES256GCM:
|
|
||||||
i=SSL_ENC_AES256GCM_IDX;
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
i= -1;
|
i= -1;
|
||||||
break;
|
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_RC4_IDX ] == NULL) ? SSL_RC4 :0;
|
||||||
*enc |= (ssl_cipher_methods[SSL_ENC_AES128_IDX] == NULL) ? SSL_AES128: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_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_MD5_IDX ] == NULL) ? SSL_MD5 :0;
|
||||||
*mac |= (ssl_digest_methods[SSL_MD_SHA1_IDX] == NULL) ? SSL_SHA1:0;
|
*mac |= (ssl_digest_methods[SSL_MD_SHA1_IDX] == NULL) ? SSL_SHA1:0;
|
||||||
|
Loading…
Reference in New Issue
Block a user