Package org.soulwing.s2ks
Interface KeyPairStorage
-
public interface KeyPairStorageA service that provides storage for key pairs.- Author:
- Carl Harris
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringCA_FILE_NAMEName of the file or file-like object used to store additional CA certificatesstatic java.lang.StringCERT_FILE_NAMEName of the file or file-like object used to store a certificatestatic java.lang.StringKEY_FILE_NAMEName of the file or file-like object used to store a private key
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.List<java.security.cert.X509Certificate>retrieveCertificates(java.lang.String id)Retrieves the certificates associated for a key pair.KeyPairInforetrieveKeyPair(java.lang.String id)Retrieves the key pair with the given identifier.
-
-
-
Field Detail
-
KEY_FILE_NAME
static final java.lang.String KEY_FILE_NAME
Name of the file or file-like object used to store a private key- See Also:
- Constant Field Values
-
CERT_FILE_NAME
static final java.lang.String CERT_FILE_NAME
Name of the file or file-like object used to store a certificate- See Also:
- Constant Field Values
-
CA_FILE_NAME
static final java.lang.String CA_FILE_NAME
Name of the file or file-like object used to store additional CA certificates- See Also:
- Constant Field Values
-
-
Method Detail
-
retrieveKeyPair
KeyPairInfo retrieveKeyPair(java.lang.String id) throws NoSuchKeyException, KeyStorageException
Retrieves the key pair with the given identifier.- Parameters:
id- identifier of the key pair to retrieve- Returns:
- key pair info
- Throws:
NoSuchKeyException- if there exists no key pair with the given IDKeyStorageException- if an unexpected error occurs in loading the key from storage
-
retrieveCertificates
java.util.List<java.security.cert.X509Certificate> retrieveCertificates(java.lang.String id) throws NoSuchKeyException, KeyStorageExceptionRetrieves the certificates associated for a key pair.This method can be used in situations in which the private key is not needed or is not available.
- Parameters:
id- identifier of the key pair whose certificates are to be retrieved- Returns:
- certificate chain
- Throws:
NoSuchKeyException- if there exists no key pair with the given IDKeyStorageException- if an unexpected error occurs in loading the key from storage
-
-