A number of PKI-related classes and interfaces exist in J2SE SDK. We have already come across KeyStore, KeyPair, PublicKey, PrivateKey and many others, in Chapter 3, Cryptography with Java. Classes representing certificates, certification paths, CRLs, repositories and others are covered here.
There are times when you want to access a certificate or a certification path in your program, either by reading a file or getting it from a keystore. Also, you may want to write it back to a file or store it into a keystore. These operations are made possible via Java API classes Certificate, CertPath, X509Certificate and CertificateFactory, all under package java.security.cert. The abstract class