public class DefaultClientKexExtensionHandler extends AbstractLoggingBean implements KexExtensionHandler
KexExtensionHandler.AvailabilityPhase, KexExtensionHandler.KexPhase
Modifier and Type | Field and Description |
---|---|
static AttributeRepository.AttributeKey<Integer> |
HOSTBOUND_AUTHENTICATION
Session
AttributeRepository.AttributeKey storing the version if the server supports host-bound public key authentication. |
static DefaultClientKexExtensionHandler |
INSTANCE
Default singleton instance.
|
static AttributeRepository.AttributeKey<Set<String>> |
SERVER_ALGORITHMS
Session
AttributeRepository.AttributeKey storing the algorithms announced by the server as known. |
log
Constructor and Description |
---|
DefaultClientKexExtensionHandler() |
Modifier and Type | Method and Description |
---|---|
boolean |
handleKexExtensionRequest(Session session,
int index,
int count,
String name,
byte[] data)
Invoked by
KexExtensionHandler.handleKexExtensionsMessage(Session, Buffer) in order to handle a specific extension. |
protected void |
handleServerSignatureAlgorithms(Session session,
Collection<String> serverAlgorithms)
Perform updates after a server-sig-algs extension has been received.
|
boolean |
isKexExtensionsAvailable(Session session,
KexExtensionHandler.AvailabilityPhase phase) |
debug, debug, debug, debug, debug, error, error, error, error, error, getSimplifiedLogger, info, info, warn, warn, warn, warn, warn, warn, warn, warn
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
handleKexCompressionMessage, handleKexExtensionNegotiation, handleKexExtensionsMessage, handleKexInitProposal, sendKexExtensions
public static final DefaultClientKexExtensionHandler INSTANCE
public static final AttributeRepository.AttributeKey<Set<String>> SERVER_ALGORITHMS
AttributeRepository.AttributeKey
storing the algorithms announced by the server as known.public static final AttributeRepository.AttributeKey<Integer> HOSTBOUND_AUTHENTICATION
AttributeRepository.AttributeKey
storing the version if the server supports host-bound public key authentication.public boolean isKexExtensionsAvailable(Session session, KexExtensionHandler.AvailabilityPhase phase) throws IOException
isKexExtensionsAvailable
in interface KexExtensionHandler
session
- The Session
about to execute KEXphase
- The KexExtensionHandler.AvailabilityPhase
hint as to why the query is being madetrue
whether to KEX extensions are supported/allowed for the sessionIOException
- If failed to process the requestpublic boolean handleKexExtensionRequest(Session session, int index, int count, String name, byte[] data) throws IOException
KexExtensionHandler
KexExtensionHandler.handleKexExtensionsMessage(Session, Buffer)
in order to handle a specific extension.handleKexExtensionRequest
in interface KexExtensionHandler
session
- The Session
through which the message was receivedindex
- The 0-based extension indexcount
- The total extensions in the messagename
- The extension namedata
- The extension datatrue
whether to proceed to the next extension or stop processing the restIOException
protected void handleServerSignatureAlgorithms(Session session, Collection<String> serverAlgorithms)
SERVER_ALGORITHMS
of the session
.session
- the message was received forserverAlgorithms
- signature algorithm names announced by the serverCopyright © 2008–2024 The Apache Software Foundation. All rights reserved.