#include <CertStore.h>
Public Member Functions | |
| CCertStore () | |
| Construct an empty certificate store wrapper. | |
| CCertStore (HCERTSTORE hCertStore) | |
| Construct a wrapper around an existing certificate store. | |
| HCERTSTORE | Detach () |
| Detach the current certificate store handle. | |
| void | OpenFromHandle (HCERTSTORE hCertStore) |
| Set the current store. | |
| BOOL | Open (LPCSTR lpszStoreProvider=CERT_STORE_PROV_SYSTEM, DWORD dwMsgAndCertEncodingType=PKCS_7_ASN_ENCODING|X509_ASN_ENCODING, HCRYPTPROV hCryptProv=NULL, DWORD dwFlags=CERT_SYSTEM_STORE_CURRENT_USER, const void *pvPara=L"MY") |
| opens the "MY" store for the current user by default | |
| BOOL | OpenCurrentUser (LPCWSTR lpStore=L"MY") |
| opens a store for the current user | |
| BOOL | OpenLocalMachine (LPCWSTR lpStore=L"MY") |
| opens a store for the local machine | |
| BOOL | OpenMemoryStore () |
| opens a memory store | |
| void | Close (DWORD dwFlags=0) |
| close the currently open store | |
| BOOL | FindCertificateBySubject (LPCWSTR subject, PCCERT_CONTEXT *ppCertContext) |
| Find a certificate by a subject string (fuzzy match, not recommended for actual identification of a certificate). | |
| BOOL | FindCertificateByCertID (CERT_ID *pCertID, PCCERT_CONTEXT *ppCertContext) |
| BOOL | FindCertificateByHash (CRYPT_HASH_BLOB *hash, PCCERT_CONTEXT *ppCertContext) |
| find a certificate by its (SHA1) hash | |
| BOOL | FindCertificateByHash (BYTE *hash, DWORD hashLen, PCCERT_CONTEXT *ppCertContext) |
| find a certificate by its (SHA1) hash | |
| BOOL | FindCertificateByCertID (LPCSTR issuer, LPCSTR serial, PCCERT_CONTEXT *ppCertContext) |
| find a certificate in the store by the string representations of CERT_ID | |
| BOOL | AddCertificateContext (PCCERT_CONTEXT pCertContext, DWORD dwAddDisposition=CERT_STORE_ADD_NEW, PCCERT_CONTEXT *ppStoreContext=NULL) |
| PCCERT_CONTEXT | EnumCertificates (PCCERT_CONTEXT pPrevCertContext) |
| Enumerate certificates in the store. | |
| operator HCERTSTORE () | |
| for use of functions that are not wrapped by this class | |
| HCERTSTORE * | operator & () |
Static Public Member Functions | |
| BOOL | NameToStr (LPTSTR buf, DWORD cch, CERT_NAME_BLOB *pName, DWORD dwStrType=CERT_X500_NAME_STR) |
| BOOL | NameToStr (std::_tstring &str, CERT_NAME_BLOB *pName, DWORD dwStrType=CERT_X500_NAME_STR) |
| as above, but uses an STL string to avoid truncation issues | |
|
|
Construct a wrapper around an existing certificate store.
|
|
|
Set the current store.
|
1.3.9.1