public class DefaultClientKexExtensionHandler extends AbstractLoggingBean implements KexExtensionHandler
KexExtensionHandler.AvailabilityPhase, KexExtensionHandler.KexPhase| Modifier and Type | Field and Description |
|---|---|
static AttributeRepository.AttributeKey<Map<KexProposalOption,String>> |
CLIENT_PROPOSAL_KEY
Session
AttributeRepository.AttributeKey used to store the client's proposal |
static NavigableSet<String> |
DEFAULT_EXTRA_SIGNATURES |
static DefaultClientKexExtensionHandler |
INSTANCE |
static AttributeRepository.AttributeKey<Map<KexProposalOption,String>> |
SERVER_PROPOSAL_KEY
Session
AttributeRepository.AttributeKey used to store the server's proposal |
log| Constructor and Description |
|---|
DefaultClientKexExtensionHandler() |
getSimplifiedLoggerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waithandleKexCompressionMessage, handleKexExtensionNegotiation, handleKexExtensionsMessage, sendKexExtensionspublic static final AttributeRepository.AttributeKey<Map<KexProposalOption,String>> CLIENT_PROPOSAL_KEY
AttributeRepository.AttributeKey used to store the client's proposalpublic static final AttributeRepository.AttributeKey<Map<KexProposalOption,String>> SERVER_PROPOSAL_KEY
AttributeRepository.AttributeKey used to store the server's proposalpublic static final NavigableSet<String> DEFAULT_EXTRA_SIGNATURES
public static final DefaultClientKexExtensionHandler INSTANCE
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 before being sent or before
being processed (if incoming)IOException - If failed to handle the requestpublic 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 restIOException - If failed to handle the extensionpublic List<NamedFactory<Signature>> updateAvailableSignatureFactories(Session session, Collection<String> extraAlgos) throws IOException
IOExceptionpublic List<NamedFactory<Signature>> resolveUpdatedSignatureFactories(Session session, List<NamedFactory<Signature>> available, Collection<String> extraAlgos) throws IOException
session - The Session for which the resolution occursavailable - The available signature factoriesextraAlgos - The extra requested signatures - ignored if null/emptyIOException - If failed to resolve the factoriespublic List<NamedFactory<Signature>> updateAvailableSignatureFactories(Session session, List<NamedFactory<Signature>> available, Collection<? extends NamedFactory<Signature>> toAdd) throws IOException
IOExceptionpublic int resolvePreferredSignaturePosition(Session session, List<? extends NamedFactory<Signature>> factories, NamedFactory<Signature> factory) throws IOException
IOExceptionpublic List<NamedFactory<Signature>> resolveRequestedSignatureFactories(Session session, Collection<String> extraAlgos) throws IOException
IOExceptionpublic NamedFactory<Signature> resolveRequestedSignatureFactory(Session session, String name) throws IOException
IOExceptionCopyright © 2008–2020 The Apache Software Foundation. All rights reserved.