diff options
author | Andy Polyakov <appro@openssl.org> | 2014-02-02 00:05:02 +0100 |
---|---|---|
committer | Andy Polyakov <appro@openssl.org> | 2014-02-02 00:05:02 +0100 |
commit | 9071b36d9a6fdb855304653e3a857c035eb05760 (patch) | |
tree | 1404dcc82c149fdffc34e12d872be1f1b7d29f1b /ssl | |
parent | eb6af20d2e8e3219876a1eb290dc6f1d5d25b436 (diff) |
Add AES-NI+SHA256 stitch registrations (from master).
Diffstat (limited to 'ssl')
-rw-r--r-- | ssl/ssl_algs.c | 4 | ||||
-rw-r--r-- | ssl/ssl_ciph.c | 8 |
2 files changed, 12 insertions, 0 deletions
diff --git a/ssl/ssl_algs.c b/ssl/ssl_algs.c index 9c34d19725..63f4f4b240 100644 --- a/ssl/ssl_algs.c +++ b/ssl/ssl_algs.c @@ -94,6 +94,10 @@ int SSL_library_init(void) EVP_add_cipher(EVP_aes_128_cbc_hmac_sha1()); EVP_add_cipher(EVP_aes_256_cbc_hmac_sha1()); #endif +#if !defined(OPENSSL_NO_SHA) && !defined(OPENSSL_NO_SHA256) + EVP_add_cipher(EVP_aes_128_cbc_hmac_sha256()); + EVP_add_cipher(EVP_aes_256_cbc_hmac_sha256()); +#endif #endif #ifndef OPENSSL_NO_CAMELLIA diff --git a/ssl/ssl_ciph.c b/ssl/ssl_ciph.c index 33bbfa2810..839b210081 100644 --- a/ssl/ssl_ciph.c +++ b/ssl/ssl_ciph.c @@ -638,6 +638,14 @@ int ssl_cipher_get_evp(const SSL_SESSION *s, const EVP_CIPHER **enc, c->algorithm_mac == SSL_SHA1 && (evp=EVP_get_cipherbyname("AES-256-CBC-HMAC-SHA1"))) *enc = evp, *md = NULL; + else if (c->algorithm_enc == SSL_AES128 && + c->algorithm_mac == SSL_SHA256 && + (evp=EVP_get_cipherbyname("AES-128-CBC-HMAC-SHA256"))) + *enc = evp, *md = NULL; + else if (c->algorithm_enc == SSL_AES256 && + c->algorithm_mac == SSL_SHA256 && + (evp=EVP_get_cipherbyname("AES-256-CBC-HMAC-SHA256"))) + *enc = evp, *md = NULL; return(1); } else |