Skip to content

Latest commit

 

History

History
144 lines (120 loc) · 6.09 KB

nf-certenroll-ipolicyqualifier-initializeencode.md

File metadata and controls

144 lines (120 loc) · 6.09 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:certenroll.IPolicyQualifier.InitializeEncode
IPolicyQualifier::InitializeEncode (certenroll.h)
Initializes the object from a string and a value that identifies the qualifier type.
IPolicyQualifier interface [Security]
InitializeEncode method
IPolicyQualifier.InitializeEncode
IPolicyQualifier::InitializeEncode
InitializeEncode
InitializeEncode method [Security]
InitializeEncode method [Security]
IPolicyQualifier interface
PolicyQualifierTypeUnknown
PolicyQualifierTypeUrl
PolicyQualifierTypeUserNotice
certenroll/IPolicyQualifier::InitializeEncode
security.ipolicyqualifier_initializeencode_method
security\ipolicyqualifier_initializeencode_method.htm
security
fc8b5916-0557-4f9b-8478-169a3dd9cebc
12/05/2018
IPolicyQualifier interface [Security],InitializeEncode method, IPolicyQualifier.InitializeEncode, IPolicyQualifier::InitializeEncode, InitializeEncode, InitializeEncode method [Security], InitializeEncode method [Security],IPolicyQualifier interface, PolicyQualifierTypeUnknown, PolicyQualifierTypeUrl, PolicyQualifierTypeUserNotice, certenroll/IPolicyQualifier::InitializeEncode, security.ipolicyqualifier_initializeencode_method
certenroll.h
Windows
Windows Vista [desktop apps only]
Windows Server 2008 [desktop apps only]
CertEnroll.dll
Windows
19H1
IPolicyQualifier::InitializeEncode
certenroll/IPolicyQualifier::InitializeEncode
c++
APIRef
kbSyntax
COM
CertEnroll.dll
IPolicyQualifier.InitializeEncode

IPolicyQualifier::InitializeEncode

-description

The InitializeEncode method initializes the object from a string and a value that identifies the qualifier type.

-parameters

-param strQualifier [in]

A BSTR variable that contains the qualifier.

-param Type [in]

A PolicyQualifierType enumeration value that specifies the type of qualifier applied to a certificate policy. This can be one of the following values.

Value Meaning
PolicyQualifierTypeUnknown
The qualifier type is not specified.
PolicyQualifierTypeUrl
The qualifier is a URL that points to a Certification Practice Statement (CPS) that has been defined by the certification authority to outline the policies under which the certificate was issued and the purposes for which the certificate can be used.
PolicyQualifierTypeUserNotice
The qualifier is a text statement to be displayed by the application to any user who relies on the certificate. The user notice identifies the permitted uses of the certificate.

-returns

If the function succeeds, the function returns S_OK.

If the function fails, it returns an HRESULT value that indicates the error. Possible values include, but are not limited to, those in the following table. For a list of common error codes, see Common HRESULT Values.

Return code Description
HRESULT_FROM_WIN32(ERROR_ALREADY_INITIALIZED)
The object is already initialized.

-remarks

If you specify PolicyQualifierTypeUrl in the Type parameter, this method associates the string entered in the strQualifier parameter with the XCN_OID_PKIX_POLICY_QUALIFIER_CPS (1.3.6.1.5.5.7.2.1) object identifier (OID) and encodes it by using Distinguished Encoding Rules (DER). The URL is encoded as an Abstract Syntax Notation One (ASN.1) IA5 string.

If you specify PolicyQualifierTypeUserNotice in the Type parameter, this method associates the string entered in the strQualifier parameter with the XCN_OID_PKIX_POLICY_QUALIFIER_USERNOTICE (1.3.6.1.5.5.7.2.2) OID and encodes it by using DER.

You can retrieve the following properties for this object:

  • The ObjectId property retrieves an OID that identifies whether the qualifier is a CPS or a user notice.
  • The Qualifier property retrieves the string specified for the strQualifier parameter of the InitializeEncode method.
  • The RawData property retrieves the DER-encoded qualifier.
  • The Type property retrieves a value of the PolicyQualifierType enumeration that specifies the qualifier type.

-see-also

IPolicyQualifier