com php-src: Do not use X509_EXTENSION data directl y as it is opaque: ext/openssl/openssl.c
| From: | Jakub Zelenka | Date: | Sun, 17 Jul 2016 16:33:42 +0000 |
| Subject: | com php-src: Do not use X509_EXTENSION data directl y as it is opaque: ext/openssl/openssl.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-93262@lists.php.net to get a copy of this message | ||
Commit: e138b51dad1fa9ba845c4669722545cb05aa7207
Author: Jakub Zelenka <bukka@php.net> Tue, 1 Mar 2016 20:08:47 +0000
Parents: 84a291d4dac1a666dd961f68f87554ab37824c7e
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=e138b51dad1fa9ba845c4669722545cb05aa7207
Log:
Do not use X509_EXTENSION data directly as it is opaque
Changed paths:
M ext/openssl/openssl.c
Diff:
diff --git a/ext/openssl/openssl.c b/ext/openssl/openssl.c
index e794908..fa63fb4 100644
--- a/ext/openssl/openssl.c
+++ b/ext/openssl/openssl.c
@@ -2053,6 +2053,7 @@ static int openssl_x509v3_subjectAltName(BIO *bio, X509_EXTENSION *extension)
{
GENERAL_NAMES *names;
const X509V3_EXT_METHOD *method = NULL;
+ ASN1_OCTET_STRING *extension_data;
long i, length, num;
const unsigned char *p;
@@ -2061,8 +2062,9 @@ static int openssl_x509v3_subjectAltName(BIO *bio, X509_EXTENSION *extension)
return -1;
}
- p = extension->value->data;
- length = extension->value->length;
+ extension_data = X509_EXTENSION_get_data(extension);
+ p = extension_data->data;
+ length = extension_data->length;
if (method->it) {
names = (GENERAL_NAMES*) (ASN1_item_d2i(NULL, &p, length,
ASN1_ITEM_ptr(method->it)));