|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.kth.pdc.grid.utility.FileCertReader
public class 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(Provider provider)
Creates a new instance of CertReader with the specified provider |
|
| Method Summary | |
|---|---|
Object |
objectReader(BufferedInputStream binStream,
int type)
Reads a certificate or a CRL from the stream, doing some error correction. |
Vector |
readAnchors(String files)
Reads the certificates from the files defined in the argument and makes TrustAnchors from them. |
Vector |
readCerts(String files)
Reads the certificates from the files defined in the argument. |
Vector |
readCRLs(String files)
Reads the certificate revocation lists (CRLs) from the files defined in the argument. |
Vector |
readFile(File certFile,
int type)
Reads the objects of given type from the File |
Object |
readObject(BufferedInputStream binStream,
int type)
Does the actual reading of the object. |
KeyStore |
readProxy(BufferedInputStream stream,
String storePasswd)
|
static void |
skipEmptyLines(BufferedInputStream stream)
Skips empty lines in the stream. |
static void |
skipToCertBeginning(BufferedInputStream stream)
Skips everything in front of "-----BEGIN" in the stream. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FileCertReader()
throws CertificateException
CertificateException
public FileCertReader(Provider provider)
throws CertificateException
provider - the provider to be used in creating the
certificates etc.
CertificateException| Method Detail |
|---|
public Vector readCerts(String files)
throws Exception
files - The file definition.
Exception - Thrown if certificate reading from the files
fails.org.glite.security.util.DirectoryList
public Vector readAnchors(String files)
throws Exception
files - The file definition.
Exception - Thrown if the certificate reading fails.org.glite.security.util.DirectoryList
public Vector readCRLs(String files)
throws Exception
files - The file definition.
Exception - Thrown if the CRL reading failed.org.glite.security.util.DirectoryList
public Vector readFile(File certFile,
int type)
throws Exception
certFile - The file to read.type - The type of objects to read form the file.
Exception - Thrown if the reading of objects of given type
fails.
public Object objectReader(BufferedInputStream binStream,
int type)
throws Exception
binStream - The stream to read the object from.type - The type of object to read from the stream.
Exception - Thrown if an error occurs while reading the object.
public Object readObject(BufferedInputStream binStream,
int type)
throws Exception
binStream - The stream to read the object from.type - The type of the object.
Exception - Thrown if there is a problem reading the object.
public static void skipToCertBeginning(BufferedInputStream stream)
throws IOException
stream - The stream to read and skip.
IOException - Thrown if there is a problem skipping.
public static void skipEmptyLines(BufferedInputStream stream)
throws IOException
stream - The stream possibly containing empty lines.
IOException - Thrown if a problem occurs.
public KeyStore readProxy(BufferedInputStream stream,
String storePasswd)
throws IOException
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||