Top Fields Methods
org.apache.sshd.common.config.keys

public Interface PublicKeyEntryResolver

Known Direct Subinterfaces
org.apache.sshd.common.config.keys.PublicKeyEntryDecoder
Known Direct Implementers
org.apache.sshd.common.config.keys.loader.ssh2.Ssh2PublicKeyEntryDecoder
Annotations
@FunctionalInterface
Imports
java.io.IOException, java.security.GeneralSecurityException, .PublicKey, java.security.spec.InvalidKeySpecException, java.util.Map, org.apache.sshd.common.session.SessionContext

Author
Apache MINA SSHD Project

Field Summary

Modifier and TypeField and Description
public static final PublicKeyEntryResolver
FAILING

A resolver that fails on all input

public static final PublicKeyEntryResolver
IGNORING

A resolver that ignores all input

public static final PublicKeyEntryResolver
UNSUPPORTED

A resolver that returns an UnsupportedSshPublicKey for any input.

Method Summary

Modifier and TypeMethod and Description
public PublicKey

Returns:

The extracted PublicKey - ignored if null
resolve
(SessionContext
The SessionContext for invoking this load command - may be null if not invoked within a session context (e.g., offline tool or session unknown).
session
,
String
The OpenSSH reported key type
keyType
,
byte[]
The OpenSSH encoded key data
keyData
,
Map<String, String>
Any headers that may have been available when data was read
headers
)

Field Detail

FAILINGback to summary
public static final PublicKeyEntryResolver FAILING

A resolver that fails on all input

IGNORINGback to summary
public static final PublicKeyEntryResolver IGNORING

A resolver that ignores all input

UNSUPPORTEDback to summary
public static final PublicKeyEntryResolver UNSUPPORTED

A resolver that returns an UnsupportedSshPublicKey for any input.

Method Detail

resolveback to summary
public PublicKey resolve(SessionContext session, String keyType, byte[] keyData, Map<String, String> headers) throws IOException, GeneralSecurityException
Parameters
session:SessionContext

The SessionContext for invoking this load command - may be null if not invoked within a session context (e.g., offline tool or session unknown).

keyType:String

The OpenSSH reported key type

keyData:byte[]

The OpenSSH encoded key data

headers:Map<String, String>

Any headers that may have been available when data was read

Returns:PublicKey

The extracted PublicKey - ignored if null

Exceptions
IOException:
If failed to parse the key data
GeneralSecurityException:
If failed to generate the key