public interface ClientIdentityLoader
Modifier and Type | Field and Description |
---|---|
static ClientIdentityLoader |
DEFAULT
A default implementation that assumes a file location that must exist.
|
Modifier and Type | Method and Description |
---|---|
boolean |
isValidLocation(java.lang.String location) |
java.security.KeyPair |
loadClientIdentity(java.lang.String location,
FilePasswordProvider provider) |
static final ClientIdentityLoader DEFAULT
A default implementation that assumes a file location that must exist.
Note: It calls SecurityUtils.loadKeyPairIdentity(String, InputStream, FilePasswordProvider)
boolean isValidLocation(java.lang.String location) throws java.io.IOException
location
- The identity key-pair location - the actual meaning (file, URL, etc.)
depends on the implementation.true
if it represents a valid location - the actual meaning of
the validity depends on the implementationjava.io.IOException
- If failed to validate the locationjava.security.KeyPair loadClientIdentity(java.lang.String location, FilePasswordProvider provider) throws java.io.IOException, java.security.GeneralSecurityException
location
- The identity key-pair location - the actual meaning (file, URL, etc.)
depends on the implementation.provider
- The FilePasswordProvider
to consult if the location contains
an encrypted identityKeyPair
- null
if location is empty
and it is OK that it does not existjava.io.IOException
- If failed to access / process the remote locationjava.security.GeneralSecurityException
- If failed to convert the contents into
a valid identity