Commit 6a575d69 authored by Juan Lang's avatar Juan Lang Committed by Alexandre Julliard

crypt32: Accept either the subject alt name 2 or subject alt name extensions,…

crypt32: Accept either the subject alt name 2 or subject alt name extensions, and prefer the former when both are present.
parent 1e953ef1
......@@ -618,8 +618,12 @@ static void CRYPT_CheckNameConstraints(
{
CERT_EXTENSION *ext;
if ((ext = CertFindExtension(szOID_SUBJECT_ALT_NAME, cert->cExtension,
cert->rgExtension)))
ext = CertFindExtension(szOID_SUBJECT_ALT_NAME2, cert->cExtension,
cert->rgExtension);
if (!ext)
ext = CertFindExtension(szOID_SUBJECT_ALT_NAME, cert->cExtension,
cert->rgExtension);
if (ext)
{
CERT_ALT_NAME_INFO *subjectName;
DWORD size;
......@@ -1088,6 +1092,8 @@ static BOOL CRYPT_CriticalExtensionsSupported(PCCERT_CONTEXT cert)
ret = TRUE;
else if (!strcmp(oid, szOID_SUBJECT_ALT_NAME))
ret = TRUE;
else if (!strcmp(oid, szOID_SUBJECT_ALT_NAME2))
ret = TRUE;
else
{
FIXME("unsupported critical extension %s\n",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment