Re: problem with CertFindCertificateInStore

From: Mariusz Popiołek (mpopiolek_at_unizeto.no.spam.allowed.pl)
Date: 03/31/04


Date: Wed, 31 Mar 2004 08:18:12 +0200


Użytkownik "Nick Voicu [MS]" <nicolaev@online.microsoft.com> napisał w
wiadomości news:ODgLvpsFEHA.740@tk2msftngp13.phx.gbl...
> You could use CERT_FIND_MD5_HASH flag instead. In order to get the hash
blob
> try using CertGetCertificateContextProperty with CERT_MD5_HASH_PROP_ID for
> dwPropId.
>

Thanks for the answer. I can always achieve my goal by enumerating all
certificates in store and calculating public key md5 hash by myself (I
suppose that it will be much slower than searching on WinXP with
CERT_FIND_PUBKEY_MD5_HASH). I wonder why MSDN doesn't contain information
about availability of the CERT_FIND_PUBKEY_MD5_HASH flag under different
platforms (unfortunatelly, very often information about availability of
different APIs are not accurate). Moreover, it would be nice if
CertFindCertificateInStore could return proper error code (some kind of
NOT_IMPLEMENTED, if I rememember well under Win2000/Win95 I got
CRYPT_E_NOT_FOUND).

Mariusz Popiolek


Quantcast