Platform SDK: Smart Card Enrollment Control |
The enroll method is used to request a certificate on behalf of the user and store the resulting certificate on the user's smart card.
objSCEnroll.enroll(dwFlags As Long)
This method has no return values.
During the processing of this method, the resulting certificate will be available for storage on the smart card. Before the certificate is written to the smart card, the user will be prompted for the smart card PIN number and, if necessary, for confirmation to overwrite the smart card's existing credentials. If the user doesn't enter the correct PIN number, or if the user declines to overwrite the smart card's existing credentials, this method will fail.
When re-issuing a smart card that previously contained a certificate, it may be necessary to run vendor-specific personalization software (prior to enrolling with the Smart Card Enrollment control) to ensure that a different public/private key pair is generated for the smart card. Consult your smart card vendor's documentation for instructions.
Valid names for the following items are mandatory for this method to be successful.
Names required for | Names assigned by |
---|---|
Certification authority (CA) | ISCrdEnr::setCAName method. |
Certificate template | ISCrdEnr::setCertTemplateName method. |
Cryptographic Service Provider | ISCrdEnr::CSPName property. |
Signing certificate | ISCrdEnr::selectSigningCertificate method or ISCrdEnr::setSigningCertificate method. |
User | ISCrdEnr::selectUserName method or ISCrdEnr::setUserName method. |
The caller can retrieve the resulting certificate by means of ISCrdEnr::getEnrolledCertificateName.
' Senroll is a previously instantiated SCrdEnr object. Senroll.enroll(0)
Windows NT/2000: Requires Windows 2000.
Windows 95/98: Unsupported.
Library: Included as a resource in Scrdenrl.dll.