crypt32: Compare CRL's authority key identifier against the certificate's subject key identifier property, which also decodes the certificate's extension if necessary.
This commit is contained in:
parent
1becda464d
commit
4df042b54b
|
@ -167,14 +167,21 @@ static BOOL compare_crl_issued_by(PCCRL_CONTEXT pCrlContext, DWORD dwType,
|
||||||
}
|
}
|
||||||
else if (info->KeyId.cbData)
|
else if (info->KeyId.cbData)
|
||||||
{
|
{
|
||||||
if ((ext = CertFindExtension(
|
DWORD size;
|
||||||
szOID_SUBJECT_KEY_IDENTIFIER,
|
|
||||||
issuer->pCertInfo->cExtension,
|
ret = CertGetCertificateContextProperty(issuer,
|
||||||
issuer->pCertInfo->rgExtension)))
|
CERT_KEY_IDENTIFIER_PROP_ID, NULL, &size);
|
||||||
|
if (ret && size == info->KeyId.cbData)
|
||||||
{
|
{
|
||||||
if (info->KeyId.cbData == ext->Value.cbData)
|
LPBYTE buf = CryptMemAlloc(size);
|
||||||
ret = !memcmp(info->KeyId.pbData,
|
|
||||||
ext->Value.pbData, info->KeyId.cbData);
|
if (buf)
|
||||||
|
{
|
||||||
|
CertGetCertificateContextProperty(issuer,
|
||||||
|
CERT_KEY_IDENTIFIER_PROP_ID, buf, &size);
|
||||||
|
ret = !memcmp(buf, info->KeyId.pbData, size);
|
||||||
|
CryptMemFree(buf);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
ret = FALSE;
|
ret = FALSE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue