Use the AWController method to modify SCEP certificate fetches to account for when the SCEP certificate authority returns a pending status for the fetch.

Pending Status of Certificate Fetches

Some configurations set the SCEP certificate authority to not issue the certificate until a request is approved. In this scenario, the authority returns a pending status to the SDK. You can use the methods in AWController to configure the retry logic and monitor the retry progress.

Ensure the Certificate Authority Server Handles Retry Requests

The Workspace ONE SDK retries the fetch request based on the parameters in the modified code or using the default behavior (retries every 5 milliseconds for 10 tries). If a certificate authority server is not configured to handle retry requests caused by the pending status, the fetch never completes.

Methods for Pending Status

Use the AWController to modify the retry timeout and maximum number of retry attempts when fetching SCEP certificates. Also, use the SDK delegate method to notify the SDK-built application on the progress of the pending SCEP certificate fetch.

Modify the Retry Timeout and Maximum Number of Retry Attempts

Make the listed modification in the AWController.

public func setPendingCertificateRetry(timeout: Double, maxAttempts: Int) -> Bool

Here is an example of code modifications that set the timeout value to 10 seconds and the maximum number of retry attempts to 8.

let success = AWController.clientInstance.setPendingCertificateRetry(timeout: 10.0, maxAttempts: 8)
Note:

: If you do not configure the timeout and retry attempts, then the timeout value defaults to 5 milliseconds and the maximum number of retry attempts defaults to 10.

Use the Delegate Method for Pending Status Notifications

Use the listed delegate method to notify about the pending status of the fetch.

@objc(didFinishPollingForPendingCertificateIssued:error:)
optional public func controllerDidFinishPollingForPendingCertificate(certificateIssued: Bool, error: NSError?)

Here is an example of the delegate method for notification.

 func controllerDidFinishPollingForPendingCertificate(certificateIssued: Bool, error: NSError?)  {
 
        // Application logic goes here

     }


Possible Error Codes

  • certificateIssuancePending - The certificate is pending.

  • retryIntervalNotReached - The timeout is not reached for retry. You can set in setPendingCertificateRetry.

  • maximumAllowedAttemptsEllapsed - The maximum attempts have been reached for polling. You can set it in setPendingCertificateRetry.