summaryrefslogtreecommitdiff
path: root/ext/openssl/openssl.c
diff options
context:
space:
mode:
authorJakub Zelenka <bukka@php.net>2019-06-02 19:13:18 +0100
committerJakub Zelenka <bukka@php.net>2019-06-02 19:13:18 +0100
commit8f69ca8dcd926aab855a36019e7a325e74239a0b (patch)
treebd3dc8328fb272e5d3b717d0e19eff7df2720eb0 /ext/openssl/openssl.c
parent793fd6bce9da7feab56ab96da9c5bb055aa0ca60 (diff)
parent2e025794745e09f7d0c72822ad0238bf6d67b2e8 (diff)
downloadphp-git-8f69ca8dcd926aab855a36019e7a325e74239a0b.tar.gz
Merge branch 'PHP-7.2' into PHP-7.3
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 13c997741f..08cb01fba1 100644
--- a/ext/openssl/openssl.c
+++ b/ext/openssl/openssl.c
@@ -6496,7 +6496,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");