com php-src: Store errors in openssl_(public|private) _(en|de)crypt: ext/openssl/openssl.c
| From: | Jakub Zelenka | Date: | Mon, 01 Feb 2016 18:42:42 +0000 |
| Subject: | com php-src: Store errors in openssl_(public|private) _(en|de)crypt: ext/openssl/openssl.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-92460@lists.php.net to get a copy of this message | ||
Commit: ceddf003a716a2d2f6a518cff4de5bb59e5cff54
Author: Jakub Zelenka <bukka@php.net> Mon, 1 Feb 2016 18:42:42 +0000
Parents: 32d8cea8407471286afd6c970bae772aca53da60
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=ceddf003a716a2d2f6a518cff4de5bb59e5cff54
Log:
Store errors in openssl_(public|private)_(en|de)crypt
Changed paths:
M ext/openssl/openssl.c
Diff:
diff --git a/ext/openssl/openssl.c b/ext/openssl/openssl.c
index ec1690f..0a83fa5 100644
--- a/ext/openssl/openssl.c
+++ b/ext/openssl/openssl.c
@@ -4828,6 +4828,8 @@ PHP_FUNCTION(openssl_private_encrypt)
ZVAL_NEW_STR(crypted, cryptedbuf);
cryptedbuf = NULL;
RETVAL_TRUE;
+ } else {
+ php_openssl_store_errors();
}
if (cryptedbuf) {
zend_string_release(cryptedbuf);
@@ -4895,6 +4897,8 @@ PHP_FUNCTION(openssl_private_decrypt)
ZVAL_NEW_STR(crypted, cryptedbuf);
cryptedbuf = NULL;
RETVAL_TRUE;
+ } else {
+ php_openssl_store_errors();
}
if (keyresource == NULL) {
@@ -4955,6 +4959,8 @@ PHP_FUNCTION(openssl_public_encrypt)
ZVAL_NEW_STR(crypted, cryptedbuf);
cryptedbuf = NULL;
RETVAL_TRUE;
+ } else {
+ php_openssl_store_errors();
}
if (keyresource == NULL) {
EVP_PKEY_free(pkey);
@@ -5024,6 +5030,8 @@ PHP_FUNCTION(openssl_public_decrypt)
ZVAL_NEW_STR(crypted, cryptedbuf);
cryptedbuf = NULL;
RETVAL_TRUE;
+ } else {
+ php_openssl_store_errors();
}
if (cryptedbuf) {