public class FilesystemKeyPairProvider extends Object implements KeyPairProvider
.cer
file name extension.
Private keys need to be base64 + PKCS #8-encoded with the .key
file name extension.
A certificate and its according private key have to share a common file name that is used as the alias name during
key pair lookup.Constructor and Description |
---|
FilesystemKeyPairProvider() |
Modifier and Type | Method and Description |
---|---|
String |
getFilePath() |
Map<String,String> |
getPassphrasesByAlias() |
void |
init() |
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.
|
void |
setFilePath(String filePath) |
void |
setPassphrasesByAlias(Map<String,String> passphrasesByAlias) |
public void init()
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)
KeyPairProvider
resolveBySerialIssuer
in interface KeyPairProvider
issuerDN
- the issuerDN.serial
- the serial.password
- a password for the private key, can be null.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.public String getFilePath()
public void setFilePath(String filePath)
Copyright © 2004–2017 52north.org. All rights reserved.