summaryrefslogtreecommitdiff
path: root/ext/openssl/openssl.c
diff options
context:
space:
mode:
authorJakub Zelenka <bukka@php.net>2019-06-02 19:15:00 +0100
committerJakub Zelenka <bukka@php.net>2019-06-02 19:15:00 +0100
commit29d79dc2e55844cb42f975ef2f0c21aedbfef183 (patch)
treee7bc1c251d021201ff6b5b2cf882c16e6af6de31 /ext/openssl/openssl.c
parent09ac6eb36d54aedd19466ca739f99c97a9fd21ad (diff)
parent4feddd59dcd8aefa7738576a5a457ebd8e9fabf0 (diff)
downloadphp-git-29d79dc2e55844cb42f975ef2f0c21aedbfef183.tar.gz
Merge branch 'PHP-7.4'
Diffstat (limited to 'ext/openssl/openssl.c')
-rw-r--r--ext/openssl/openssl.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/ext/openssl/openssl.c b/ext/openssl/openssl.c
index 30d984c300..8cf294b361 100644
--- a/ext/openssl/openssl.c
+++ b/ext/openssl/openssl.c
@@ -6546,7 +6546,10 @@ static int php_openssl_cipher_init(const EVP_CIPHER *cipher_type,
return FAILURE;
}
if (mode->is_single_run_aead && enc) {
- EVP_CIPHER_CTX_ctrl(cipher_ctx, mode->aead_set_tag_flag, tag_len, NULL);
+ if (!EVP_CIPHER_CTX_ctrl(cipher_ctx, mode->aead_set_tag_flag, tag_len, NULL)) {
+ php_error_docref(NULL, E_WARNING, "Setting tag length for AEAD cipher failed");
+ return FAILURE;
+ }
} else if (!enc && tag && tag_len > 0) {
if (!mode->is_aead) {
php_error_docref(NULL, E_WARNING, "The tag cannot be used because the cipher method does not support AEAD");