mirror of
https://github.com/php/php-src.git
synced 2025-08-17 14:38:49 +02:00
Do not use X509_EXTENSION data directly as it is opaque
This commit is contained in:
parent
84a291d4da
commit
e138b51dad
1 changed files with 4 additions and 2 deletions
|
@ -2053,6 +2053,7 @@ static int openssl_x509v3_subjectAltName(BIO *bio, X509_EXTENSION *extension)
|
||||||
{
|
{
|
||||||
GENERAL_NAMES *names;
|
GENERAL_NAMES *names;
|
||||||
const X509V3_EXT_METHOD *method = NULL;
|
const X509V3_EXT_METHOD *method = NULL;
|
||||||
|
ASN1_OCTET_STRING *extension_data;
|
||||||
long i, length, num;
|
long i, length, num;
|
||||||
const unsigned char *p;
|
const unsigned char *p;
|
||||||
|
|
||||||
|
@ -2061,8 +2062,9 @@ static int openssl_x509v3_subjectAltName(BIO *bio, X509_EXTENSION *extension)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
p = extension->value->data;
|
extension_data = X509_EXTENSION_get_data(extension);
|
||||||
length = extension->value->length;
|
p = extension_data->data;
|
||||||
|
length = extension_data->length;
|
||||||
if (method->it) {
|
if (method->it) {
|
||||||
names = (GENERAL_NAMES*) (ASN1_item_d2i(NULL, &p, length,
|
names = (GENERAL_NAMES*) (ASN1_item_d2i(NULL, &p, length,
|
||||||
ASN1_ITEM_ptr(method->it)));
|
ASN1_ITEM_ptr(method->it)));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue