000023216 - How to revoke certificates using the API?

Document created by RSA Customer Support Employee on Jun 16, 2016Last modified by RSA Customer Support Employee on Apr 21, 2017
Version 2Show Document
  • View in full screen mode

Article Content

Article Number000023216
Applies ToRSA Certificate Manager 6.7 API
IssueHow to revoke certificates using the API?
Customer has a large list of certificates to revoke and would like to use the API to revoke them
ResolutionThe easiest way to revoke a large number of certificates given a specific attribute is to use the API. Here is the pseudo-code of what can be done, given the fact that all certificates share the same attribute with a unique value per certificate.

This example assume that we use a file containing the certificate serial number to revoke, one serial number per line.

For each line in file [which contains one serial number per line]
  Serial = Read line
  XudaCertificateSearchSimple (session, "Serial Number", Serial, ListReturned)
  For each cert in ListReturned [you will have only one certificate anyway]
     XudaCARevokeCertificate (session, CA, cert, null)
Legacy Article IDa37926