CertFindCertificateInStore with CERT_FIND_SUBJECT_ATTR



Anyone know how to make this work?

I want to find the one and only certificate in the store with OU in the
Subject being equal to a particular string. So I try a find with
CERT_FIND_SUBJECT_ATTR, with one CERT_RDN_ATTR, which has pszObjId set to
szOID_ORGANIZATIONAL_UNIT_NAME.

Now, it seems completely unclear to me from the documentation what I'm
supposed to put in the dwValueType and the Value. I've tried various ways of
expressing the string as both Unicode and ASCII and none of them work.

--
Tim Ward
Brett Ward Limited - www.brettward.co.uk


.