crypt32: Implement CertFindCertificateInStore for CERT_FIND_PUBLIC_KEY.
This commit is contained in:
parent
3ae5e99cba
commit
bf0406cf3a
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue