|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.n52.security.common.crypto.KeystoreKeyPairProvider
public class KeystoreKeyPairProvider
KeyPairProvider working on a java keystore.
Constructor Summary | |
---|---|
KeystoreKeyPairProvider(KeyStore keyStore)
Constructor creates a new instance from a pre loaded keystore. |
|
KeystoreKeyPairProvider(String keyStoreType,
InputStream instream,
char[] password)
Constructor creates a new instance from a inputstream. |
Method Summary | |
---|---|
KeyStore |
getKeyStore()
Method gets the keyStore. |
KeyPair |
resolveByAlias(String alias,
char[] password)
Resolves a keypair by an alias. |
KeyPair |
resolveByCertificate(Certificate cert,
char[] password)
Resolves a key pair by a given certificate. |
KeyPair |
resolveBySerialIssuer(String issuerDN,
BigInteger serial,
char[] password)
Resolves a key pair by a SerialIssuer, this is required to resolve certificates and it's private keys by the id of the certificate. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public KeystoreKeyPairProvider(KeyStore keyStore)
keyStore
- the keyStore.public KeystoreKeyPairProvider(String keyStoreType, InputStream instream, char[] password)
keyStoreType
- the keyStoreType.instream
- the instream.password
- the password.Method Detail |
---|
public KeyStore getKeyStore()
public KeyPair resolveByAlias(String alias, char[] password) throws KeyPairResolvingException
KeyPairProvider
resolveByAlias
in interface KeyPairProvider
alias
- the alias.password
- a password for the private key, can be null.
KeyPairResolvingException
- if keypair can't be resolved.KeyPairProvider.resolveByAlias(String, char[])
public KeyPair resolveBySerialIssuer(String issuerDN, BigInteger serial, char[] password) throws KeyPairResolvingException
KeyPairProvider
resolveBySerialIssuer
in interface KeyPairProvider
issuerDN
- the issuerDN.serial
- the serial.password
- a password for the private key, can be null.
KeyPairResolvingException
- if error occurs.KeyPairProvider.resolveBySerialIssuer(String, BigInteger, char[])
public KeyPair resolveByCertificate(Certificate cert, char[] password) throws KeyPairResolvingException
KeyPairProvider
resolveByCertificate
in interface KeyPairProvider
cert
- the cert.password
- a password for the private key, can be null.
KeyPairResolvingException
- if error occurs.KeyPairProvider.resolveByCertificate(Certificate, char[])
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |