crypt32: Accept either the subject alt name 2 or subject alt name extensions, and prefer the former when both are present.

This commit is contained in:
Juan Lang 2009-10-23 11:54:05 -07:00 committed by Alexandre Julliard
parent 1e953ef12e
commit 6a575d697e
1 changed files with 8 additions and 2 deletions

View File

@ -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",