public interface KeyPairProvider extends KeyIdentityProvider
| Modifier and Type | Field and Description |
|---|---|
static String |
ECDSA_SHA2_NISTP256
SSH identifier for EC keys in NIST curve P-256
|
static String |
ECDSA_SHA2_NISTP384
SSH identifier for EC keys in NIST curve P-384
|
static String |
ECDSA_SHA2_NISTP521
SSH identifier for EC keys in NIST curve P-521
|
static KeyPairProvider |
EMPTY_KEYPAIR_PROVIDER
A
KeyPairProvider that has no keys |
static String |
SSH_DSS
SSH identifier for DSA keys
|
static String |
SSH_DSS_CERT |
static String |
SSH_ECDSA_SHA2_NISTP256_CERT |
static String |
SSH_ECDSA_SHA2_NISTP384_CERT |
static String |
SSH_ECDSA_SHA2_NISTP521_CERT |
static String |
SSH_ED25519
SSH identifier for ED25519 elliptic curve keys
|
static String |
SSH_ED25519_CERT |
static String |
SSH_RSA
SSH identifier for RSA keys
|
static String |
SSH_RSA_CERT
SSH identifier for openssh cert keys
|
EMPTY_KEYS_PROVIDER| Modifier and Type | Method and Description |
|---|---|
default Iterable<String> |
getKeyTypes(SessionContext session) |
default KeyPair |
loadKey(SessionContext session,
String type)
Load a key of the specified type which can be "ssh-rsa", "ssh-dss", or
"ecdsa-sha2-nistp{256,384,521}".
|
static KeyPairProvider |
wrap(Iterable<KeyPair> pairs)
Wrap the provided
KeyPairs into a KeyPairProvider |
static KeyPairProvider |
wrap(KeyPair... pairs)
Wrap the provided
KeyPairs into a KeyPairProvider |
exhaustCurrentIdentities, isEmpty, iterableOf, loadKeys, multiProvider, multiProvider, resolveKeyIdentityProvider, wrapKeyPairs, wrapKeyPairsstatic final String SSH_RSA
static final String SSH_DSS
static final String SSH_ED25519
static final String ECDSA_SHA2_NISTP256
static final String ECDSA_SHA2_NISTP384
static final String ECDSA_SHA2_NISTP521
static final String SSH_RSA_CERT
static final String SSH_DSS_CERT
static final String SSH_ED25519_CERT
static final String SSH_ECDSA_SHA2_NISTP256_CERT
static final String SSH_ECDSA_SHA2_NISTP384_CERT
static final String SSH_ECDSA_SHA2_NISTP521_CERT
static final KeyPairProvider EMPTY_KEYPAIR_PROVIDER
KeyPairProvider that has no keysdefault KeyPair loadKey(SessionContext session, String type) throws IOException, GeneralSecurityException
nullsession - The SessionContext for invoking this load command - may be null
if not invoked within a session context (e.g., offline tool).type - the type of key to loadnull if this type of key is not availableIOException - If failed to read/parse the keys dataGeneralSecurityException - If failed to generate the keysdefault Iterable<String> getKeyTypes(SessionContext session) throws IOException, GeneralSecurityException
session - The SessionContext for invoking this load command - may be null
if not invoked within a session context (e.g., offline tool).Iterable key types - never nullIOException - If failed to read/parse the keys dataGeneralSecurityException - If failed to generate the keysstatic KeyPairProvider wrap(KeyPair... pairs)
KeyPairs into a KeyPairProviderpairs - The available pairs - ignored if null/empty (i.e., returns EMPTY_KEYPAIR_PROVIDER)wrap(Iterable)static KeyPairProvider wrap(Iterable<KeyPair> pairs)
KeyPairs into a KeyPairProviderpairs - The available pairs Iterable - ignored if null (i.e., returns
EMPTY_KEYPAIR_PROVIDER)Copyright © 2018–2021 The Apache Software Foundation. All rights reserved.