Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

OW32::CCertStore Class Reference

certificate store wrappers More...

#include <CertStore.h>

List of all members.

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


Detailed Description

certificate store wrappers


Constructor & Destructor Documentation

OW32::CCertStore::CCertStore HCERTSTORE  hCertStore  )  [inline]
 

Construct a wrapper around an existing certificate store.

Parameters:
hCertStore the handle of the store to wrap


Member Function Documentation

void OW32::CCertStore::OpenFromHandle HCERTSTORE  hCertStore  )  [inline]
 

Set the current store.

Parameters:
hCertStore the certificate store handle to use.


The documentation for this class was generated from the following file:
Generated on Sun Jun 5 01:29:23 2005 for OW32 by  doxygen 1.3.9.1