org.openpermis.cert
Class KeyStoreReader

java.lang.Object
  extended by org.openpermis.cert.KeyStoreReader

public class KeyStoreReader
extends Object

Reader for the first entry in a key store.

Since:
0.3.0

Constructor Summary
KeyStoreReader(InputStream keyStoreIn, char[] password)
          Creates a KeyStoreReader that reads the first key in a key store, protected by a password.
 
Method Summary
 PrivateKey getFirstPrivateKey()
          Returns the first PrivateKey in this key store.
 X509Certificate getFirstX509Certificate()
          Returns the first X509Certificate in this key store.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KeyStoreReader

public KeyStoreReader(InputStream keyStoreIn,
                      char[] password)
               throws KeyStoreReaderException
Creates a KeyStoreReader that reads the first key in a key store, protected by a password. The key store and the first entry must be both protected by the same password.

Parameters:
keyStoreIn - a InputStream.
password - the password.
Throws:
KeyStoreReaderException - if there is a problem reading the key store, if required, the detail exception can be found as the cause of the reader exception.
Since:
0.3.0
Method Detail

getFirstPrivateKey

public PrivateKey getFirstPrivateKey()
Returns the first PrivateKey in this key store.

Returns:
the first PrivateKey in this key store.
Since:
0.3.0

getFirstX509Certificate

public X509Certificate getFirstX509Certificate()
Returns the first X509Certificate in this key store.

Returns:
the first X509Certificate in this key store.
Since:
0.3.0


PERMIS Role Based Access Control 0.4.0 (Build 15)
2009/05/20 08:14:49
Copyright (c) 2002-2007 Ergon Informatik AG