Delete Certificate From Key Manager
To delete a certificate on the Key Manager:
Create an
NAESession
object (session).Create an
NAECertificate
object (mycert).Call the
NAECertificate
object'sdelete()
method. Note that the certificate must be deletable. You can callisDeletable()
to check if this is true. Deleting the certificate removes the certificate and the private key from the Key Manager.
Code sample
NAESession session = NAESession.getSession("userOne", "1234".toCharArray());
NAECertificate mycert = new NAECertificate ("CertOne", session);
if(mycert.isDeletable())mycert.delete();