How to revoke certificates using the API?
3 years ago
Originally Published: 2007-12-06
Article Number
000061476
Applies To
RSA Certificate Manager 6.7 API
Issue
How 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
Resolution
The 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)
   Next
Next