|
![]() |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openpermis.cert.KeystoreUtility
public final class KeystoreUtility
Some useful keystore operations.
Method Summary | |
---|---|
static KeyStore |
createKeystoreFromFile(String inputKeyStore,
String inputPassword)
Creates a KeyStore from a file. |
static KeyStore |
createKeystoreFromInputStream(InputStream inputStream,
String inputPassword)
Creates a KeyStore from an input stream. |
static X509Certificate |
getCertificate(KeyStore keystore,
String alias)
Returns a X509Certificate in this key store. |
static PrivateKey |
getPrivateKey(KeyStore keystore,
String alias,
String inputPassword)
Gets a private key from a keystore. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static PrivateKey getPrivateKey(KeyStore keystore, String alias, String inputPassword) throws KeystoreUtilityException
keystore
- the keystore.alias
- the alias.inputPassword
- the password.
KeystoreUtilityException
- if private key could not be retrieved.public static KeyStore createKeystoreFromFile(String inputKeyStore, String inputPassword) throws KeystoreUtilityException
KeyStore
from a file.
inputKeyStore
- the file path.inputPassword
- the password.
KeyStore
.
KeystoreUtilityException
- if the KeyStore
could not be created.public static KeyStore createKeystoreFromInputStream(InputStream inputStream, String inputPassword) throws KeystoreUtilityException
KeyStore
from an input stream.
inputStream
- the input stream.inputPassword
- the password.
KeyStore
.
KeystoreUtilityException
- if the KeyStore
could not be created.public static X509Certificate getCertificate(KeyStore keystore, String alias) throws KeystoreUtilityException
X509Certificate
in this key store.
keystore
- the keystore.alias
- the alias of the certificate.
X509Certificate
.
KeystoreUtilityException
- if the X509Certificate
could not be returned.
|
![]() |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
OpenPermis Role Based Access Control 0.9.0 (Build 16)
2009/08/13 07:16:59
Copyright (c) 2002-2007 Ergon Informatik AG