Retrieve-Certificate function
Implementing logic for the Retrieve-Certificate function is required unless the Submit-CsrAsNew, Submit-CsrAsRenewal, and Submit-CsrAsReplacement functions are all written to return the certificate issued by the CA.
When implemented, this function must attempt to retrieve a certificate from the CA. It is called at Processing Stage 700 and could return a Pending status to indicate that the driver should retry the operation again later. When the certificate issued by the CA is available, the function must return a status of Issued and include the certificate in the same response.
NOTE The Retrieve-Certificate function is not called when the Submit-CsrAsNew, Submit-CsrAsRenewal, or Submit-CsrAsReplacement functions return a certificate in the Pkcs7 or Pkcs12 parameters. Also, this function must return Pkcs7 or Pkcs12 unless they were returned by the Submit function.
Refer to the Returns table below.
Variable Name |
Data Type |
Description |
---|---|---|
CertId |
String |
Text that uniquely identifies the certificate issued by the CA. |
Variable Name |
Data Type |
Description |
---|---|---|
AuxPass |
String |
The password portion of the Secondary Credential when a user name or a password credential is assigned, or the PKCS#12 password when a certificate credential is assigned |
AuxPfxData |
Byte Array |
A PKCS#12 byte array that contains a client certificate and private key when a certificate credential is assigned as the Secondary Credential |
AuxUser |
String |
The user name portion of the Secondary Credential when a user name credential is assigned |
CertObjDN |
String |
Venafi distinguished name (DN) of the certificate object in the policy tree |
CustomFields |
Hashtable |
Hash table keys are Custom Field labels and the values are strings (single-valued) or string arrays (multi-valued). |
OAuthAccessToken |
String |
OAuth token passed to the PowerShell script. Tokens are passed only after you've provided the required information in the WebSDK OAuth Token Configuration settings of the Adaptable object. See Configuring the Adaptable CA object. How it worksWhen used, each time your script is called, Trust Protection Platform requests a new token automatically. Each new token is associated with both the specified user and with the referenced application ID. After the script finishes running, Trust Protection Platform revokes the token automatically. To get started, see Adaptable CA prerequisites. |
PfxData |
Byte Array |
PKCS#12 keystore containing client certificate and private key for authenticating with the CA; this and the PfxPass are used together to instantiate an X509Certificate2 object for client certificate authentication. |
PfxPass |
SecureString |
Password for access to the private key of the PfxData PKCS#12 |
UserName |
String |
User name for authenticating with the CA |
UserPass |
String |
Password for authenticating with the CA |
WebSdkUrl |
String |
String representing the fully-qualified domain name to the WebSDK of your Trust Protection Platform server. For information on where this variable data is set, see Trust Protection Platform server configuration. |
IMPORTANT If Pkcs12 or PrivKeyPem are returned, DiscardPrivateKeyAndCsr is automatically set to $true and cannot be overridden.
For information about processing stages, see About certificate lifecycle management.