com php-src: Store main errors in openssl_x509_parse : ext/openssl/openssl.c
| From: | Jakub Zelenka | Date: | Fri, 22 Jan 2016 16:43:23 +0000 |
| Subject: | com php-src: Store main errors in openssl_x509_parse : ext/openssl/openssl.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-92462@lists.php.net to get a copy of this message | ||
Commit: 0e2a5cdc1a0904da0f62b205d03124c1762b5881
Author: Jakub Zelenka <bukka@php.net> Fri, 22 Jan 2016 16:43:23 +0000
Parents: 116d64ff58e744c3ffab4ac3fe78c3fc4637383c
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=0e2a5cdc1a0904da0f62b205d03124c1762b5881
Log:
Store main errors in openssl_x509_parse
Changed paths:
M ext/openssl/openssl.c
Diff:
diff --git a/ext/openssl/openssl.c b/ext/openssl/openssl.c
index edadb6a..0396231 100644
--- a/ext/openssl/openssl.c
+++ b/ext/openssl/openssl.c
@@ -2034,6 +2034,7 @@ static int openssl_x509v3_subjectAltName(BIO *bio, X509_EXTENSION *extension)
names = (GENERAL_NAMES*) (method->d2i(NULL, &p, length));
}
if (names == NULL) {
+ php_openssl_store_errors();
return -1;
}
@@ -2180,6 +2181,10 @@ PHP_FUNCTION(openssl_x509_parse)
extname = buf;
}
bio_out = BIO_new(BIO_s_mem());
+ if (bio_out == NULL) {
+ php_openssl_store_errors();
+ RETURN_FALSE;
+ }
if (nid == NID_subject_alt_name) {
if (openssl_x509v3_subjectAltName(bio_out, extension) == 0) {
BIO_get_mem_ptr(bio_out, &bio_buf);