Platform SDK: Smart Card Enrollment Control

ISCrdEnr::getCertTemplateSMIME

The getCertTemplateSMIME method is used to determine if a certificate template contains the szOID_PKIX_KP_EMAIL_PROTECTION key usage. If this key usage is part of the certificate template, the certificate template supports S/MIME operations.

objSCEnroll.getCertTemplateSMIME( _
            bstrCertTemplateName As String ) As Long

Parameters

objSCEnroll
Object expression that resolves to a SCrdEnr object.
bstrCertTemplateName
Name of the certificate being queried for the S/MIME key usage.

Return Values

Long value of 1 if bstrCertTemplateName supports S/MIME; otherwise 0.

Remarks

The constant for szOID_PKIX_KP_EMAIL_PROTECTION is defined in wincrypt.h.

Example Code in VBScript

Dim lSMIME

' strCTName is a certificate template name, such as
' "ExchangeUser".
lSMIME = Senroll.getCertTemplateSMIME(strCTName)

' Use lSMIME as needed.

Requirements

  Windows NT/2000: Requires Windows 2000.
  Windows 95/98: Unsupported.
  Library: Included as a resource in Scrdenrl.dll.

See Also

ISCrdEnr::enroll