summaryrefslogtreecommitdiff
path: root/ext/openssl/openssl.c
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2019-02-28 12:48:47 +0100
committerAnatol Belski <ab@php.net>2019-02-28 12:48:47 +0100
commit19a44ffb7be91344550fa700830b8e62a73031ba (patch)
tree2f317efe2e15d502cb4c8dbdfd85bd7bfc1d3af4 /ext/openssl/openssl.c
parent9ad9cc71ff3bb45532b22b4145ea3af90692b364 (diff)
downloadphp-git-19a44ffb7be91344550fa700830b8e62a73031ba.tar.gz
Sync with behavior change in OpenSSL 1.1.1b
A behavior change in revealed by some openssl_decrypt() based test, where an encrypt API is used with a decrypt context. The EVP_Cipher* functions will automatically choose the right operation depending on the context passed.
Diffstat (limited to 'ext/openssl/openssl.c')
-rw-r--r--ext/openssl/openssl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/openssl/openssl.c b/ext/openssl/openssl.c
index 871a30c82a..7df50720eb 100644
--- a/ext/openssl/openssl.c
+++ b/ext/openssl/openssl.c
@@ -6494,7 +6494,7 @@ static int php_openssl_cipher_update(const EVP_CIPHER *cipher_type,
{
int i = 0;
- if (mode->is_single_run_aead && !EVP_EncryptUpdate(cipher_ctx, NULL, &i, NULL, (int)data_len)) {
+ if (mode->is_single_run_aead && !EVP_CipherUpdate(cipher_ctx, NULL, &i, NULL, (int)data_len)) {
php_openssl_store_errors();
php_error_docref(NULL, E_WARNING, "Setting of data length failed");
return FAILURE;