public class DefaultClientKexExtensionHandler extends AbstractLoggingBean implements KexExtensionHandler
KexExtensionHandler.AvailabilityPhase, KexExtensionHandler.KexPhase| Modifier and Type | Field and Description |
|---|---|
static AttributeRepository.AttributeKey<Boolean> |
CLIENT_PROPOSAL_MADE
Session
AttributeRepository.AttributeKey used to store whether the extension indicator was already sent. |
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. |
void |
handleKexInitProposal(Session session,
boolean initiator,
Map<KexProposalOption,String> proposal)
Invoked when a peer is ready to send the KEX options proposal or has received such a proposal.
|
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, warnclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waithandleKexCompressionMessage, handleKexExtensionNegotiation, handleKexExtensionsMessage, sendKexExtensionspublic static final DefaultClientKexExtensionHandler INSTANCE
public static final AttributeRepository.AttributeKey<Boolean> CLIENT_PROPOSAL_MADE
AttributeRepository.AttributeKey used to store whether the extension indicator was already sent.public static final AttributeRepository.AttributeKey<Set<String>> SERVER_ALGORITHMS
AttributeRepository.AttributeKey storing the algorithms announced by the server as known.public boolean isKexExtensionsAvailable(Session session, KexExtensionHandler.AvailabilityPhase phase) throws IOException
isKexExtensionsAvailable in interface KexExtensionHandlersession - 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 void handleKexInitProposal(Session session, boolean initiator, Map<KexProposalOption,String> proposal) throws IOException
KexExtensionHandlerisKexExtensionsAvailable returns false for
the session.handleKexInitProposal in interface KexExtensionHandlersession - The Session initiating or receiving the proposalinitiator - true if the proposal is about to be sent, false if this is a proposal received
from the peer.proposal - The proposal contents - Caveat emptor: the proposal is modifiable i.e., the
handler can modify it before being sent or before being processed (if incoming)IOExceptionpublic boolean handleKexExtensionRequest(Session session, int index, int count, String name, byte[] data) throws IOException
KexExtensionHandlerKexExtensionHandler.handleKexExtensionsMessage(Session, Buffer) in order to handle a specific extension.handleKexExtensionRequest in interface KexExtensionHandlersession - 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 restIOExceptionprotected 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–2021 The Apache Software Foundation. All rights reserved.