|
|
| Getting certificate context properties |
|
| Author |
Message |
Abbs

|
Posted: Thu Jul 03 09:54:54 CDT 2003 |
Top |
Security >> Getting certificate context properties
Hi all,
I am developing a small app in C++ and I need to list all the certificates
in the system store, in a List View, like the one displayed in the
CryptUIDlgSelectCertificateFromStore() dialog. I have successfully
enumerated all the certificates using CertEnumCertificatesInStore() but I
can't seem to extract all the bits of information from the certificate
context, i.e. Issued to, Issued by, Intended purposes, Friendly name,
Expiration date and Location. The only pieces of information I have been
able to get so far using CertGetCertificateContextProperty() and
CertGetNameString() is the Issued to, Issued by and Friendly name.
Can anyone tell me how to get the remaining properties?
Kind Regards,
Chris
Windows OS103
|
| |
|
| |
 |
Michel

|
Posted: Thu Jul 03 09:54:54 CDT 2003 |
Top |
Security >> Getting certificate context properties
You should be able to get this info. from the various fields
of CERT_INFO:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/security/security/cert_info.asp
Note that several members are actually encoded so you will need
to use CryptDecodeObject() to extract the info you want.
If it is an option for you, consider using CAPICOM. It makes life a LOT easier
for extracting all X.509 certificate fields, extensions and extended properties.
- Michel Gallant
MVP Security
"Chris Morrison" <[SPAM BLOCK]EMail@HideDomain.com[SPAM-BLOCKED]> wrote in message
news:EMail@HideDomain.com...
> Hi all,
>
> I am developing a small app in C++ and I need to list all the certificates
> in the system store, in a List View, like the one displayed in the
> CryptUIDlgSelectCertificateFromStore() dialog. I have successfully
> enumerated all the certificates using CertEnumCertificatesInStore() but I
> can't seem to extract all the bits of information from the certificate
> context, i.e. Issued to, Issued by, Intended purposes, Friendly name,
> Expiration date and Location. The only pieces of information I have been
> able to get so far using CertGetCertificateContextProperty() and
> CertGetNameString() is the Issued to, Issued by and Friendly name.
>
> Can anyone tell me how to get the remaining properties?
>
> Kind Regards,
>
>
> Chris
>
>
|
| |
|
| |
 |
| |
|