getRevocationStatus method

Future<GetRevocationStatusResponse> getRevocationStatus({
  1. required List<String> certificateHashes,
  2. required String jobArn,
  3. required String platformId,
  4. required String profileVersionArn,
  5. required DateTime signatureTimestamp,
})

Retrieves the revocation status of one or more of the signing profile, signing job, and signing certificate.

May throw AccessDeniedException. May throw InternalServiceErrorException. May throw TooManyRequestsException. May throw ValidationException.

Parameter certificateHashes : A list of composite signed hashes that identify certificates.

A certificate identifier consists of a subject certificate TBS hash (signed by the parent CA) combined with a parent CA TBS hash (signed by the parent CA’s CA). Root certificates are defined as their own CA.

The following example shows how to calculate a hash for this parameter using OpenSSL commands:

openssl asn1parse -in childCert.pem -strparse 4 -out childCert.tbs

openssl sha384 < childCert.tbs -binary > childCertTbsHash

openssl asn1parse -in parentCert.pem -strparse 4 -out parentCert.tbs

openssl sha384 < parentCert.tbs -binary > parentCertTbsHash xxd -p childCertTbsHash > certificateHash.hex xxd -p parentCertTbsHash >> certificateHash.hex

cat certificateHash.hex | tr -d '\n'

Parameter jobArn : The ARN of a signing job.

Parameter platformId : The ID of a signing platform.

Parameter profileVersionArn : The version of a signing profile.

Parameter signatureTimestamp : The timestamp of the signature that validates the profile or job.

Implementation

Future<GetRevocationStatusResponse> getRevocationStatus({
  required List<String> certificateHashes,
  required String jobArn,
  required String platformId,
  required String profileVersionArn,
  required DateTime signatureTimestamp,
}) async {
  final $query = <String, List<String>>{
    'certificateHashes': certificateHashes,
    'jobArn': [jobArn],
    'platformId': [platformId],
    'profileVersionArn': [profileVersionArn],
    'signatureTimestamp': [_s.iso8601ToJson(signatureTimestamp).toString()],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri: '/revocations',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return GetRevocationStatusResponse.fromJson(response);
}