Juan Lang : crypt32: Compare CRL' s authority key identifier against the certificate' s subject key identifier property, which also decodes the certificate' s extension if necessary.
Alexandre Julliard
julliard at winehq.org
Wed Dec 9 10:46:25 CST 2009
Module: wine
Branch: master
Commit: 4df042b54bae0159a5b8216b4bb2a59dfc561dec
URL: http://source.winehq.org/git/wine.git/?a=commit;h=4df042b54bae0159a5b8216b4bb2a59dfc561dec
Author: Juan Lang <juan.lang at gmail.com>
Date: Tue Dec 8 10:18:27 2009 -0800
crypt32: Compare CRL's authority key identifier against the certificate's subject key identifier property, which also decodes the certificate's extension if necessary.
---
dlls/crypt32/crl.c | 21 ++++++++++++++-------
1 files changed, 14 insertions(+), 7 deletions(-)
diff --git a/dlls/crypt32/crl.c b/dlls/crypt32/crl.c
index a24e6ad..72180c5 100644
--- a/dlls/crypt32/crl.c
+++ b/dlls/crypt32/crl.c
@@ -167,14 +167,21 @@ static BOOL compare_crl_issued_by(PCCRL_CONTEXT pCrlContext, DWORD dwType,
}
else if (info->KeyId.cbData)
{
- if ((ext = CertFindExtension(
- szOID_SUBJECT_KEY_IDENTIFIER,
- issuer->pCertInfo->cExtension,
- issuer->pCertInfo->rgExtension)))
+ DWORD size;
+
+ ret = CertGetCertificateContextProperty(issuer,
+ CERT_KEY_IDENTIFIER_PROP_ID, NULL, &size);
+ if (ret && size == info->KeyId.cbData)
{
- if (info->KeyId.cbData == ext->Value.cbData)
- ret = !memcmp(info->KeyId.pbData,
- ext->Value.pbData, info->KeyId.cbData);
+ LPBYTE buf = CryptMemAlloc(size);
+
+ if (buf)
+ {
+ CertGetCertificateContextProperty(issuer,
+ CERT_KEY_IDENTIFIER_PROP_ID, buf, &size);
+ ret = !memcmp(buf, info->KeyId.pbData, size);
+ CryptMemFree(buf);
+ }
else
ret = FALSE;
}
More information about the wine-cvs
mailing list