summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Zelenka <bukka@php.net>2017-04-30 19:46:27 +0100
committerJakub Zelenka <bukka@php.net>2017-04-30 19:46:27 +0100
commit6028fe511efd7e7f8444af9e53c4bbd7368233b1 (patch)
tree0b1a4983e3a8293c405d675d73043505d445df76
parent9891b9ede225b58c358372c2b7b8603c2c91ac12 (diff)
downloadphp-git-6028fe511efd7e7f8444af9e53c4bbd7368233b1.tar.gz
Fix bug #73808 (iv length warning too restrictive for aes-128-ccm)
-rw-r--r--NEWS2
-rw-r--r--ext/openssl/openssl.c4
-rw-r--r--ext/openssl/tests/openssl_decrypt_ccm.phpt2
-rw-r--r--ext/openssl/tests/openssl_decrypt_gcm.phpt2
-rw-r--r--ext/openssl/tests/openssl_encrypt_ccm.phpt2
-rw-r--r--ext/openssl/tests/openssl_encrypt_gcm.phpt2
6 files changed, 7 insertions, 7 deletions
diff --git a/NEWS b/NEWS
index 17face6801..891c444494 100644
--- a/NEWS
+++ b/NEWS
@@ -66,6 +66,8 @@ PHP NEWS
key). (Jakub Zelenka)
. Fixed bug #74341 (openssl_x509_parse fails to parse ASN.1 UTCTime without
seconds). (Moritz Fain)
+ . Fixed bug #73808 (iv length warning too restrictive for aes-128-ccm).
+ (Jakub Zelenka)
- phar:
. Fixed bug #74383 (phar method parameters reflection correction).
diff --git a/ext/openssl/openssl.c b/ext/openssl/openssl.c
index 43603a5fc5..766178b8f7 100644
--- a/ext/openssl/openssl.c
+++ b/ext/openssl/openssl.c
@@ -6214,9 +6214,7 @@ static int php_openssl_validate_iv(char **piv, size_t *piv_len, size_t iv_requir
if (mode->is_aead) {
if (EVP_CIPHER_CTX_ctrl(cipher_ctx, mode->aead_ivlen_flag, *piv_len, NULL) != 1) {
- php_error_docref(NULL, E_WARNING,
- "Setting of IV length for AEAD mode failed, the expected length is %zd bytes",
- iv_required_len);
+ php_error_docref(NULL, E_WARNING, "Setting of IV length for AEAD mode failed");
return FAILURE;
}
return SUCCESS;
diff --git a/ext/openssl/tests/openssl_decrypt_ccm.phpt b/ext/openssl/tests/openssl_decrypt_ccm.phpt
index 2107fea1fb..beb3074938 100644
--- a/ext/openssl/tests/openssl_decrypt_ccm.phpt
+++ b/ext/openssl/tests/openssl_decrypt_ccm.phpt
@@ -35,7 +35,7 @@ var_dump(openssl_decrypt($test['ct'], $method, $test['key'], OPENSSL_RAW_DATA,
TEST 0
bool(true)
-Warning: openssl_decrypt(): Setting of IV length for AEAD mode failed, the expected length is 12 bytes in %s on line %d
+Warning: openssl_decrypt(): Setting of IV length for AEAD mode failed in %s on line %d
bool(false)
bool(false)
bool(false)
diff --git a/ext/openssl/tests/openssl_decrypt_gcm.phpt b/ext/openssl/tests/openssl_decrypt_gcm.phpt
index d8c464346a..11802e9d8e 100644
--- a/ext/openssl/tests/openssl_decrypt_gcm.phpt
+++ b/ext/openssl/tests/openssl_decrypt_gcm.phpt
@@ -45,7 +45,7 @@ bool(true)
TEST 5
bool(true)
-Warning: openssl_decrypt(): Setting of IV length for AEAD mode failed, the expected length is 12 bytes in %s on line %d
+Warning: openssl_decrypt(): Setting of IV length for AEAD mode failed in %s on line %d
bool(false)
bool(false)
bool(false)
diff --git a/ext/openssl/tests/openssl_encrypt_ccm.phpt b/ext/openssl/tests/openssl_encrypt_ccm.phpt
index 1606044997..945e81dfd7 100644
--- a/ext/openssl/tests/openssl_encrypt_ccm.phpt
+++ b/ext/openssl/tests/openssl_encrypt_ccm.phpt
@@ -33,7 +33,7 @@ TEST 0
bool(true)
bool(true)
-Warning: openssl_encrypt(): Setting of IV length for AEAD mode failed, the expected length is 12 bytes in %s on line %d
+Warning: openssl_encrypt(): Setting of IV length for AEAD mode failed in %s on line %d
bool(false)
string(8) "p/lvgA=="
int(1024)
diff --git a/ext/openssl/tests/openssl_encrypt_gcm.phpt b/ext/openssl/tests/openssl_encrypt_gcm.phpt
index 91fe23a637..60b48cd091 100644
--- a/ext/openssl/tests/openssl_encrypt_gcm.phpt
+++ b/ext/openssl/tests/openssl_encrypt_gcm.phpt
@@ -50,7 +50,7 @@ TEST 5
bool(true)
bool(true)
-Warning: openssl_encrypt(): Setting of IV length for AEAD mode failed, the expected length is 12 bytes in %s on line %d
+Warning: openssl_encrypt(): Setting of IV length for AEAD mode failed in %s on line %d
bool(false)
Warning: openssl_encrypt(): Retrieving verification tag failed in %s on line %d