Commit bf0406cf authored by Juan Lang's avatar Juan Lang Committed by Alexandre Julliard

crypt32: Implement CertFindCertificateInStore for CERT_FIND_PUBLIC_KEY.

parent 3ae5e99c
......@@ -966,6 +966,17 @@ static BOOL compare_cert_by_name(PCCERT_CONTEXT pCertContext, DWORD dwType,
return ret;
}
static BOOL compare_cert_by_public_key(PCCERT_CONTEXT pCertContext,
DWORD dwType, DWORD dwFlags, const void *pvPara)
{
CERT_PUBLIC_KEY_INFO *publicKey = (CERT_PUBLIC_KEY_INFO *)pvPara;
BOOL ret;
ret = CertComparePublicKeyInfo(pCertContext->dwCertEncodingType,
&pCertContext->pCertInfo->SubjectPublicKeyInfo, publicKey);
return ret;
}
static BOOL compare_cert_by_subject_cert(PCCERT_CONTEXT pCertContext,
DWORD dwType, DWORD dwFlags, const void *pvPara)
{
......@@ -1201,6 +1212,9 @@ PCCERT_CONTEXT WINAPI CertFindCertificateInStore(HCERTSTORE hCertStore,
case CERT_COMPARE_NAME:
compare = compare_cert_by_name;
break;
case CERT_COMPARE_PUBLIC_KEY:
compare = compare_cert_by_public_key;
break;
case CERT_COMPARE_SUBJECT_CERT:
compare = compare_cert_by_subject_cert;
break;
......
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