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

public Interface PrivateKeyEntryResolver

Known Direct Subinterfaces
org.apache.sshd.common.config.keys.PrivateKeyEntryDecoder
Annotations
@FunctionalInterface
Imports
java.io.IOException, java.security.GeneralSecurityException, .PrivateKey, java.security.spec.InvalidKeySpecException, org.apache.sshd.common.session.SessionContext

Author
Apache MINA SSHD Project

Field Summary

Modifier and TypeField and Description
public static final PrivateKeyEntryResolver
FAILING

A resolver that fails on all input

public static final PrivateKeyEntryResolver
IGNORING

A resolver that ignores all input

Method Summary

Modifier and TypeMethod and Description
public PrivateKey

Returns:

The extracted PrivateKey - 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
)

Field Detail

FAILINGback to summary
public static final PrivateKeyEntryResolver FAILING

A resolver that fails on all input

IGNORINGback to summary
public static final PrivateKeyEntryResolver IGNORING

A resolver that ignores all input

Method Detail

resolveback to summary
public PrivateKey resolve(SessionContext session, String keyType, byte[] keyData) 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

Returns:PrivateKey

The extracted PrivateKey - ignored if null

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