00001 00009 #ifndef __PKIFCAPICREDENTIAL2_H__ 00010 #define __PKIFCAPICREDENTIAL2_H__ 00011 00012 #include "PKIFdll.h" 00013 #include "PKIFCredential.h" 00014 #include "components.h" 00015 00016 #include <wincrypt.h> 00017 00018 struct CPKIFCAPI2Impl; 00019 FD_SMART_PTR(CPKIFCertificate); 00020 00021 //removed export declaration 7/29/2004 00031 class CPKIFCAPICredential2 : public CPKIFCredential 00032 { 00033 friend class CPKIFCAPI2; 00034 friend class CPKIFCNGCAPI; 00035 friend struct CPKIFCAPI2Impl; 00036 friend struct CPKIFCNGCAPIImpl; 00037 public: 00038 virtual ~CPKIFCAPICredential2(void); 00039 void SetPassword(unsigned char* password, int len); 00040 CPKIFCertificatePtr GetCertificate() const; 00041 00042 bool ProviderInfoMatches(const char* provider, int provType) const; 00043 00044 private: 00045 CPKIFCAPICredential2& operator=(const CPKIFCAPICredential2& rhs); //added 4/6/2004 00046 CPKIFCAPICredential2(const char* provider = NULL, int provType = 0, int sysStoRegLoc = CERT_SYSTEM_STORE_CURRENT_USER); //allow creation from inside friend classes only 00047 void SetKeyProviderInfo() const; 00048 00049 enum { thisComponent = TOOLKIT_CRYPTO_CAPICRED }; 00050 00051 CPKIFCertificatePtr m_cacCert; 00052 PCCERT_CONTEXT m_certContext; 00053 CRYPT_KEY_PROV_INFO* m_keyProviderInfo; 00054 unsigned char* m_password; 00055 int m_nPasswordLen; 00056 00057 char* m_provider; 00058 int m_provType; 00059 int m_sysStoRegLoc; 00060 }; 00061 00062 00063 #endif