CPEnroll.h

00001 #ifndef _CPENROLL_H
00002 #define _CPENROLL_H
00003 
00004 #include "reader/support.h"
00005 #include <string>
00006 #include <memory>
00007 #include <list>
00008 #include <vector>
00009 #include "SecureBuffer.h"
00010 #include "BSTR.h"
00011 
00012 #define XECR_PKCS10_V2_0     0x1
00013 #define XECR_PKCS7           0x2
00014 #define XECR_CMC             0x3
00015 #define XECR_PKCS10_V1_5     0x4
00016 #define XECR_PKCS7_TWICE     0x5
00017 
00024 class CPEnroll
00025 {
00026 public:
00032     class UserCallbacks
00033     {
00034     public:
00047         virtual bool askPermissionToAddToRootStore( 
00048                 const BYTE* pbCert, DWORD cbCert, bool = false) const=0;
00049 
00053         virtual UserCallbacks* clone() const=0;
00054 
00058         virtual ~UserCallbacks() {}
00059     };
00060 public:
00061     
00062 
00067     virtual ~CPEnroll() {};
00075     static CPEnroll *CPEFactory(const UserCallbacks* callbacks = 0, bool handlePKCS7 = false);
00076 
00084     virtual HRESULT put_EnableSMIMECapabilities( bool value){
00085         UNUSED(value);
00086         return E_NOTIMPL;
00087     }
00088     
00096     virtual HRESULT put_UseExistingKeySet(bool value){
00097         UNUSED(value);
00098         return E_NOTIMPL;
00099     }
00100     
00108     virtual HRESULT put_HashAlgorithm( BSTR hashOid){
00109         UNUSED(hashOid);
00110         return E_NOTIMPL;
00111     }
00112     
00127     virtual HRESULT put_ContainerName( BSTR cName){
00128         UNUSED(cName);
00129         return E_NOTIMPL;
00130     }
00131 
00141     virtual HRESULT put_ProviderType( DWORD pType){
00142         UNUSED(pType);
00143         return E_NOTIMPL;
00144     }
00145     
00155     virtual HRESULT put_ProviderName( BSTR pName){
00156         UNUSED(pName);
00157         return E_NOTIMPL;
00158     }
00159     
00173     virtual HRESULT put_GenKeyFlags( DWORD keyFlags){
00174         UNUSED(keyFlags);
00175         return E_NOTIMPL;
00176     }
00177     
00195     virtual HRESULT put_RequestStoreFlags( DWORD storeFlags){
00196         UNUSED(storeFlags);
00197         return E_NOTIMPL;
00198     }
00199     
00213     virtual HRESULT put_ProviderFlags( DWORD provFlags){
00214         UNUSED(provFlags);
00215         return E_NOTIMPL;
00216     }
00217     
00237     virtual HRESULT put_KeySpec( DWORD _dwKeySpec){
00238         UNUSED(_dwKeySpec);
00239         return E_NOTIMPL;
00240     }
00241     
00267     virtual HRESULT put_LimitExchangeKeyToEncipherment( int value){
00268         UNUSED(value);
00269         return E_NOTIMPL;
00270     }
00271     
00289     virtual HRESULT put_CAStoreFlags( DWORD flags){
00290         UNUSED(flags);
00291         return E_NOTIMPL;
00292     }
00311     virtual HRESULT put_MyStoreFlags( DWORD flags){
00312         UNUSED(flags);
00313         return E_NOTIMPL;
00314     }
00315     
00334     virtual HRESULT put_RootStoreFlags( DWORD flags){
00335         UNUSED(flags);
00336         return E_NOTIMPL;
00337     }
00338     
00352     virtual HRESULT put_MyStoreName( BSTR name){
00353         UNUSED(name);
00354         return E_NOTIMPL;
00355     }
00356     
00377     virtual HRESULT put_DeleteRequestCert( bool value){
00378         UNUSED(value);
00379         return E_NOTIMPL;
00380     }
00381     
00414     virtual HRESULT put_WriteCertToCSP( bool value){
00415         UNUSED(value);
00416         return E_NOTIMPL;
00417     }
00418 
00434     virtual HRESULT put_PIN( const CSecurePin& pin){
00435         UNUSED(pin);
00436         return E_NOTIMPL;
00437     }
00438 
00454     virtual HRESULT put_SupressAddRootUI( bool value){
00455         UNUSED(value);
00456         return E_NOTIMPL;
00457     }
00458 
00459 
00473     virtual HRESULT addExtensionToRequest( LONG flags, BSTR name, BSTR value){
00474         UNUSED(flags);
00475         UNUSED(name);
00476         UNUSED(value);
00477         return E_NOTIMPL;
00478     }
00479 
00480 
00492     virtual HRESULT get_InstallToContainerStatus( DWORD *pdwStatus){
00493         UNUSED(pdwStatus);
00494         return E_NOTIMPL;
00495     }
00496 
00502     virtual HRESULT get_ContainerName ( BSTR *cName )
00503     {
00504         UNUSED ( cName );
00505         return E_NOTIMPL;
00506     }
00507 
00508 
00526     virtual HRESULT createPKCS10( BSTR rdn, BSTR usage, BSTR *request){
00527         UNUSED(rdn);
00528         UNUSED(usage);
00529         UNUSED(request);
00530         return E_NOTIMPL;
00531     }
00532     
00556     virtual HRESULT createRequest( LONG flags, BSTR rdn, BSTR usage, BSTR *request){
00557         UNUSED(flags);
00558         UNUSED(rdn);
00559         UNUSED(usage);
00560         UNUSED(request);
00561         return E_NOTIMPL;
00562     }
00563     
00593     virtual HRESULT acceptPKCS7( BSTR msg){
00594         UNUSED(msg);
00595         return E_NOTIMPL;
00596     }
00597 
00620     virtual HRESULT installPKCS7( BSTR msg){
00621         UNUSED(msg);
00622         return E_NOTIMPL;
00623     }
00624 
00633     virtual HRESULT SetSignerCertificate(
00634       /* [in] */  PCCERT_CONTEXT pSignerCert
00635       ){
00636         UNUSED(pSignerCert);
00637         return E_NOTIMPL;
00638     }
00639 
00640     virtual HRESULT AddCProLicenseExt(){
00641         return E_NOTIMPL;
00642     }
00643 };
00644 
00645 #endif /* _CPENROLL_H */

Документация по КриптоПро CAPILite. Последние изменения: Tue Sep 8 12:03:29 2020. Создано системой  doxygen 1.4.5-20051109