|
||||||||||
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
Class KeystoreKeyPairProvider implements a KeyPairProvider working on a java keystore.
Constructor Summary | |
---|---|
KeystoreKeyPairProvider(java.security.KeyStore keyStore)
Constructor creates a new instance from a pre loaded keystore. |
|
KeystoreKeyPairProvider(java.lang.String keyStoreType,
java.io.InputStream instream,
char[] password)
Constructor creates a new instance from a inputstream. |
Method Summary | |
---|---|
java.security.KeyStore |
getKeyStore()
Method gets the keyStore. |
KeyPair |
resolveByAlias(java.lang.String alias,
char[] password)
Method resolves a keypair by an alias. |
KeyPair |
resolveByCertificate(java.security.cert.Certificate cert,
char[] password)
Method resolves a key pair by a given certificate. |
KeyPair |
resolveBySerialIssuer(java.lang.String issuerDN,
java.math.BigInteger serial,
char[] password)
Method 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(java.security.KeyStore keyStore)
keyStore
- the keyStore.public KeystoreKeyPairProvider(java.lang.String keyStoreType, java.io.InputStream instream, char[] password)
keyStoreType
- the keyStoreType.instream
- the instream.password
- the password.Method Detail |
---|
public java.security.KeyStore getKeyStore()
public KeyPair resolveByAlias(java.lang.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(java.lang.String issuerDN, java.math.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(java.security.cert.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 |