|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.glite.security.util.FileCertReader
Reads all certificates from given files, accepts binary form of DER encoded certs and the Base64 form of the DER encoded certs (PEM). The base64 certs can contain garbage in front of the actual certificate that has to begin with "-----BEGIN". Should accept multiple certs in one file, not tested!
Constructor Summary | |
FileCertReader()
Creates a new instance of CertReader |
|
FileCertReader(java.security.Provider provider)
Creates a new instance of CertReader with the specified provider |
|
FileCertReader(java.lang.String provider)
Creates a new instance of CertReader with the specified provider |
Method Summary | |
java.lang.Object |
objectReader(java.io.BufferedInputStream binStream,
int type)
Reads a certificate or a CRL from the stream, doing some error correction. |
java.util.Vector |
readAnchors(java.lang.String files)
Reads the certificates from the files defined in the argument and makes TrustAnchors from them. |
java.util.Vector |
readCerts(java.lang.String files)
Reads the certificates from the files defined in the argument. |
java.util.Vector |
readCRLs(java.lang.String files)
Reads the certificate revocation lists (CRLs) from the files defined in the argument. |
java.util.Vector |
readFile(java.io.File certFile,
int type)
Reads the objects of given type from the File |
java.lang.Object |
readObject(java.io.BufferedInputStream binStream,
int type)
Does the actual reading of the object. |
java.security.KeyStore |
readProxy(java.io.BufferedInputStream stream,
java.lang.String storePasswd)
|
static void |
skipEmptyLines(java.io.BufferedInputStream stream)
Skips empty lines in the stream. |
static void |
skipToCertBeginning(java.io.BufferedInputStream stream)
Skips everything in front of "-----BEGIN" in the stream. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public FileCertReader() throws java.security.cert.CertificateException
public FileCertReader(java.security.Provider provider) throws java.security.cert.CertificateException
provider
- the provider to be used in creating the
certificates etc.public FileCertReader(java.lang.String provider) throws java.security.cert.CertificateException
provider
- the provider to be used in creating the
certificates etc.Method Detail |
public java.util.Vector readCerts(java.lang.String files) throws java.lang.Exception
files
- The file definition.
java.lang.Exception
- Thrown if certificate reading from the files
fails.DirectoryList
public java.util.Vector readAnchors(java.lang.String files) throws java.lang.Exception
files
- The file definition.
java.lang.Exception
- Thrown if the certificate reading fails.DirectoryList
public java.util.Vector readCRLs(java.lang.String files) throws java.lang.Exception
files
- The file definition.
java.lang.Exception
- Thrown if the CRL reading failed.DirectoryList
public java.util.Vector readFile(java.io.File certFile, int type) throws java.lang.Exception
certFile
- The file to read.type
- The type of objects to read form the file.
java.lang.Exception
- Thrown if the reading of objects of given type
fails.public java.lang.Object objectReader(java.io.BufferedInputStream binStream, int type) throws java.lang.Exception
binStream
- The stream to read the object from.type
- The type of object to read from the stream.
java.lang.Exception
- Thrown if an error occurs while reading the object.public java.lang.Object readObject(java.io.BufferedInputStream binStream, int type) throws java.lang.Exception
binStream
- The stream to read the object from.type
- The type of the object.
java.lang.Exception
- Thrown if there is a problem reading the object.public static void skipToCertBeginning(java.io.BufferedInputStream stream) throws java.io.IOException
stream
- The stream to read and skip.
java.io.IOException
- Thrown if there is a problem skipping.public static void skipEmptyLines(java.io.BufferedInputStream stream) throws java.io.IOException
stream
- The stream possibly containing empty lines.
java.io.IOException
- Thrown if a problem occurs.public java.security.KeyStore readProxy(java.io.BufferedInputStream stream, java.lang.String storePasswd) throws java.io.IOException
java.io.IOException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |