com php-src: Add AES CCM ciphers when linked with OpenSSL 1.0.1: ext/openssl/openssl.c
| From: | Jakub Zelenka | Date: | Sun, 27 Dec 2015 18:03:36 +0000 |
| Subject: | com php-src: Add AES CCM ciphers when linked with OpenSSL 1.0.1: ext/openssl/openssl.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-92503@lists.php.net to get a copy of this message | ||
Commit: 5e9540f77dc5fba67ee69e5a38b79ced28f42368
Author: Jakub Zelenka <bukka@php.net> Sun, 27 Dec 2015 18:03:36 +0000
Parents: 213844de497086e512da2d2d94b1705abd985c5a
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=5e9540f77dc5fba67ee69e5a38b79ced28f42368
Log:
Add AES CCM ciphers when linked with OpenSSL 1.0.1
These ciphers are not added by OpenSSL_add_all_algorithms in 1.0.1
Changed paths:
M ext/openssl/openssl.c
Diff:
diff --git a/ext/openssl/openssl.c b/ext/openssl/openssl.c
index 5877b9f..c2ea6e2 100644
--- a/ext/openssl/openssl.c
+++ b/ext/openssl/openssl.c
@@ -1172,6 +1172,12 @@ PHP_MINIT_FUNCTION(openssl)
OpenSSL_add_all_digests();
OpenSSL_add_all_algorithms();
+#if !defined(OPENSSL_NO_AES) && defined(EVP_CIPH_CCM_MODE) &&
OPENSSL_VERSION_NUMBER < 0x100020000
+ EVP_add_cipher(EVP_aes_128_ccm());
+ EVP_add_cipher(EVP_aes_192_ccm());
+ EVP_add_cipher(EVP_aes_256_ccm());
+#endif
+
SSL_load_error_strings();
/* register a resource id number with OpenSSL so that we can map SSL -> stream structures in