interface ICertPropertyEnrollment : IDispatch
{
public:
virtual HRESULT STDMETHODCALLTYPE InitializeFromCertificate(
/* [in] */ __RPC__in_opt PCCERT_CONTEXT pCertContext,
/* [retval][out] */ __RPC__out VARIANT_BOOL *pbResult) = 0;
virtual HRESULT STDMETHODCALLTYPE InitializeFromCertificateString(
/* [in] */ __RPC__in const BSTR strCert,
/* [in] */ EncodingType Encoding,
/* [retval][out] */ __RPC__out VARIANT_BOOL *pbResult) = 0;
virtual HRESULT STDMETHODCALLTYPE CopyFrom(
/* [in] */ __RPC__in_opt ICertPropertyEnrollment *pProp) = 0;
virtual HRESULT STDMETHODCALLTYPE InitializeFromCertificateHash(
/* [in] */ __RPC__in const BSTR strCertificateHash,
/* [in] */ __RPC__in const BSTR strProviderName,
/* [in] */ EncodingType Encoding,
/* [retval][out] */ __RPC__out VARIANT_BOOL *pbResult) = 0;
virtual HRESULT STDMETHODCALLTYPE InitializeFromPKCS7(
/* [in] */ __RPC__in const BSTR strPKCS7,
/* [in] */ EncodingType Encoding,
/* [retval][out] */ __RPC__out VARIANT_BOOL *pbResult) = 0;
virtual HRESULT STDMETHODCALLTYPE InitializeFromCAKeyArchival(
/* [in] */ __RPC__in const BSTR strConfig,
/* [in] */ __RPC__in const BSTR strCADNS,
/* [in] */ __RPC__in const BSTR strCAName,
/* [in] */ __RPC__in const BSTR strCertificateName,
/* [in] */ __RPC__in const BSTR strSerialNumber,
/* [retval][out] */ __RPC__out VARIANT_BOOL *pbResult) = 0;
virtual HRESULT STDMETHODCALLTYPE GetProviderName(
/* [retval][out] */ __RPC__deref_out_opt BSTR *pstrProviderName) = 0;
virtual HRESULT STDMETHODCALLTYPE GetProviderType(
/* [retval][out] */ __RPC__out LONG *pProviderType) = 0;
virtual HRESULT STDMETHODCALLTYPE GetKeySpec(
/* [retval][out] */ __RPC__out LONG *pKeySpec) = 0;
virtual HRESULT STDMETHODCALLTYPE GetHashAlgorithm(
/* [retval][out] */ __RPC__out __RPC__deref_out_opt BSTR *pstrHash) = 0;
virtual HRESULT STDMETHODCALLTYPE GetHashLength(
/* [retval][out] */ __RPC__out LONG *pHashLength) = 0;
virtual HRESULT STDMETHODCALLTYPE GetEncryptionAlgorithm(
/* [retval][out] */ __RPC__deref_out_opt BSTR *pstrEncryption) = 0;
virtual HRESULT STDMETHODCALLTYPE GetEncryptionLength(
/* [retval][out] */ __RPC__out LONG *pEncryptionLength) = 0;
virtual HRESULT STDMETHODCALLTYPE GetKeySecurityDescriptor(
/* [retval][out] */ __RPC__deref_out_opt BSTR *pstrSecurityDescriptor) = 0;
virtual HRESULT STDMETHODCALLTYPE GetKeyContainerName(
/* [retval][out] */ __RPC__deref_out_opt BSTR *pstrContainerName) = 0;
virtual HRESULT STDMETHODCALLTYPE GetRenewalCertificate(
/* [in] */ __RPC__in const BSTR strCAConfig,
/* [in] */ __RPC__in const BSTR strCADNS,
/* [in] */ __RPC__in const BSTR strCAName,
/* [in] */ __RPC__in const BSTR strCertificateName,
/* [in] */ __RPC__in const BSTR strSerialNumber,
/* [retval][out] */ __RPC__deref_out_opt BSTR *pstrCertificate) = 0;
virtual HRESULT STDMETHODCALLTYPE GetArchivedKeyHash(
/* [retval][out] */ __RPC__deref_out_opt BSTR *pstrArchivedKeyHash) = 0;
};
这个接口定义了多个方法,用于初始化、复制、获取与证书注册相关的属性。例如,可以通过已有的证书、证书哈希、PKCS7 格式数据等初始化证书的注册属性。
要正确使用这个接口,你可能需要详细查阅 Microsoft 的文档或者参考相关的示例代码,以了解如何使用这些方法来处理证书的注册属性。
转载请注明出处:http://www.zyzy.cn/article/detail/24191/Win32 API/Certenroll.h/ICertPropertyEnrollment