Class PEMParser

java.lang.Object
java.io.Reader
java.io.BufferedReader
org.bouncycastle.util.io.pem.PemReader
org.bouncycastle.openssl.PEMParser
All Implemented Interfaces:
Closeable, AutoCloseable, Readable

public class PEMParser extends org.bouncycastle.util.io.pem.PemReader
Class for parsing OpenSSL PEM encoded streams containing X509 certificates, PKCS8 encoded keys and PKCS7 objects.

In the case of PKCS7 objects the reader will return a CMS ContentInfo object. Public keys will be returned as well formed SubjectPublicKeyInfo objects, private keys will be returned as well formed PrivateKeyInfo objects. In the case of a private key a PEMKeyPair will normally be returned if the encoding contains both the private and public key definition. CRLs, Certificates, PKCS#10 requests, and Attribute Certificates will generate the appropriate BC holder class.