edu.vt.middleware.crypt.io
Class X509CertificatesCredentialReader

java.lang.Object
  extended by edu.vt.middleware.crypt.io.X509CertificatesCredentialReader
All Implemented Interfaces:
CredentialReader<X509Certificate[]>

public class X509CertificatesCredentialReader
extends Object
implements CredentialReader<X509Certificate[]>

Reads collections of encoded X.509 certificates from a resource. Both PEM and DER encodings are supported, as well as certificate chains in PKCS#7 format.

Version:
$Revision: 1818 $
Author:
Middleware Services

Constructor Summary
X509CertificatesCredentialReader()
           
 
Method Summary
 X509Certificate[] read(File file)
          Reads a credential, commonly in encoded format, from the given file.
 X509Certificate[] read(InputStream in)
          Reads a credential, commonly in encoded format, from the given input stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

X509CertificatesCredentialReader

public X509CertificatesCredentialReader()
Method Detail

read

public X509Certificate[] read(File file)
                       throws IOException,
                              CryptException
Reads a credential, commonly in encoded format, from the given file.

Specified by:
read in interface CredentialReader<X509Certificate[]>
Parameters:
file - File from which to read credential.
Returns:
Credential read from file.
Throws:
IOException - On IO exceptions.
CryptException - On cryptography errors such as invalid formats, unsupported ciphers, illegal settings.

read

public X509Certificate[] read(InputStream in)
                       throws IOException,
                              CryptException
Reads a credential, commonly in encoded format, from the given input stream.

Specified by:
read in interface CredentialReader<X509Certificate[]>
Parameters:
in - Input stream from which to read credential.
Returns:
Credential read from input stream.
Throws:
IOException - On IO exceptions.
CryptException - On cryptography errors such as invalid formats, unsupported ciphers, illegal settings.


Copyright © 2003-2011 Virginia Tech. All Rights Reserved.