public class PEMReader
extends java.io.BufferedReader
In the case of PKCS7 objects the reader will return a CMS ContentInfo object. Keys and Certificates will be returned using the appropriate java.security type.
Modifier and Type | Field and Description |
---|---|
private PasswordFinder |
pFinder |
private java.lang.String |
provider |
Constructor and Description |
---|
PEMReader(java.io.Reader reader)
Create a new PEMReader
|
PEMReader(java.io.Reader reader,
PasswordFinder pFinder)
Create a new PEMReader with a password finder
|
PEMReader(java.io.Reader reader,
PasswordFinder pFinder,
java.lang.String provider)
Create a new PEMReader with a password finder
|
Modifier and Type | Method and Description |
---|---|
private X509AttributeCertificate |
readAttributeCertificate(java.lang.String endMarker)
Reads in a X509 Attribute Certificate.
|
private byte[] |
readBytes(java.lang.String endMarker) |
private java.security.cert.X509Certificate |
readCertificate(java.lang.String endMarker)
Reads in a X509Certificate.
|
private PKCS10CertificationRequest |
readCertificateRequest(java.lang.String endMarker)
Reads in a PKCS10 certification request.
|
private java.security.cert.X509CRL |
readCRL(java.lang.String endMarker)
Reads in a X509CRL.
|
private java.security.KeyPair |
readKeyPair(java.lang.String type,
java.lang.String endMarker)
Read a Key Pair
|
java.lang.Object |
readObject() |
private ContentInfo |
readPKCS7(java.lang.String endMarker)
Reads in a PKCS7 object.
|
private java.security.PublicKey |
readPublicKey(java.lang.String endMarker) |
private java.security.PublicKey |
readRSAPublicKey(java.lang.String endMarker) |
private final PasswordFinder pFinder
private final java.lang.String provider
public PEMReader(java.io.Reader reader)
reader
- the Readerpublic PEMReader(java.io.Reader reader, PasswordFinder pFinder)
reader
- the ReaderpFinder
- the password finderpublic PEMReader(java.io.Reader reader, PasswordFinder pFinder, java.lang.String provider)
reader
- the ReaderpFinder
- the password finderprovider
- the cryptography provider to usepublic java.lang.Object readObject() throws java.io.IOException
java.io.IOException
private byte[] readBytes(java.lang.String endMarker) throws java.io.IOException
java.io.IOException
private java.security.PublicKey readRSAPublicKey(java.lang.String endMarker) throws java.io.IOException
java.io.IOException
private java.security.PublicKey readPublicKey(java.lang.String endMarker) throws java.io.IOException
java.io.IOException
private java.security.cert.X509Certificate readCertificate(java.lang.String endMarker) throws java.io.IOException
java.io.IOException
- if an I/O error occuredprivate java.security.cert.X509CRL readCRL(java.lang.String endMarker) throws java.io.IOException
java.io.IOException
- if an I/O error occuredprivate PKCS10CertificationRequest readCertificateRequest(java.lang.String endMarker) throws java.io.IOException
java.io.IOException
- if an I/O error occuredprivate X509AttributeCertificate readAttributeCertificate(java.lang.String endMarker) throws java.io.IOException
java.io.IOException
- if an I/O error occuredprivate ContentInfo readPKCS7(java.lang.String endMarker) throws java.io.IOException
java.io.IOException
- if an I/O error occuredprivate java.security.KeyPair readKeyPair(java.lang.String type, java.lang.String endMarker) throws java.lang.Exception
java.lang.Exception
Copyright © 1998-2014 Gamma Technologies. All Rights Reserved.