public class KeystoreKeyPairProvider extends Object implements KeyPairProvider
Constructor and Description |
---|
KeystoreKeyPairProvider(KeyStore keyStore) |
KeystoreKeyPairProvider(String keyStoreType,
InputStream instream,
char[] password) |
Modifier and Type | Method and Description |
---|---|
KeyStore |
getKeyStore() |
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.
|
public KeystoreKeyPairProvider(KeyStore keyStore)
public KeystoreKeyPairProvider(String keyStoreType, InputStream instream, char[] password)
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.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.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.Copyright © 2004–2017 52north.org. All rights reserved.