Top Description Fields Constructors Methods
org.apache.sshd.client.kex

public Class DHGClient

extends AbstractDHClientKeyExchange
Class Inheritance
Imports
java.net.InetSocketAddress, .SocketAddress, java.security.PublicKey, java.util.Arrays, .Collection, .Objects, org.apache.sshd.client.session.AbstractClientSession, org.apache.sshd.common.NamedFactory, .SshConstants, .SshException, org.apache.sshd.common.config.keys.KeyUtils, .OpenSshCertificate, org.apache.sshd.common.digest.Digest, org.apache.sshd.common.kex.AbstractDH, .CurveSizeIndicator, .DHFactory, .KexProposalOption, .KeyEncapsulationMethod, .KeyExchange, .KeyExchangeFactory, org.apache.sshd.common.keyprovider.KeyPairProvider, org.apache.sshd.common.session.Session, org.apache.sshd.common.signature.Signature, org.apache.sshd.common.util.GenericUtils, .ValidateUtils, org.apache.sshd.common.util.buffer.Buffer, .ByteArrayBuffer, org.apache.sshd.common.util.net.SshdSocketAddress, org.apache.sshd.core.CoreModuleProperties

Base class for DHG key exchange algorithms. Implementations will only have to configure the required data on the org.apache.sshd.common.kex.DHG class in the getDH() method.
Author
Apache MINA SSHD Project

Field Summary

Modifier and TypeField and Description
protected AbstractDH
protected final DHFactory
private KeyEncapsulationMethod.Client

Constructor Summary

AccessConstructor and Description
protected
DHGClient(DHFactory factory, Session session)

Method Summary

Modifier and TypeMethod and Description
protected AbstractDH
public final String
public void
init(byte[]
the server identification string
v_s
,
byte[]
the client identification string
v_c
,
byte[]
the server key initialization packet
i_s
,
byte[]
the client key initialization packet
i_c
)

Overrides org.apache.sshd.common.kex.dh.AbstractDHKeyExchange.init.

Implements org.apache.sshd.common.kex.KeyExchange.init.

Initialize the key exchange algorithm.

public static KeyExchangeFactory
public boolean
next(int
the command
cmd
,
Buffer
the packet contents positioned after the command
buffer
)

Implements org.apache.sshd.common.kex.KeyExchange.next.

Process the next packet

protected void
Inherited from org.apache.sshd.client.kex.AbstractDHClientKeyExchange:
getClientSession

Field Detail

dhback to summary
protected AbstractDH dh
factoryback to summary
protected final DHFactory factory
kemClientback to summary
private KeyEncapsulationMethod.Client kemClient

Constructor Detail

DHGClientback to summary
protected DHGClient(DHFactory factory, Session session)

Method Detail

getDHback to summary
protected AbstractDH getDH() throws Exception
getNameback to summary
public final String getName()

Implements org.apache.sshd.common.NamedResource.getName.

Returns:String

Doc from org.apache.sshd.common.NamedResource.getName.

The resource name

Annotations
@Override
initback to summary
public void init(byte[] v_s, byte[] v_c, byte[] i_s, byte[] i_c) throws Exception

Overrides org.apache.sshd.common.kex.dh.AbstractDHKeyExchange.init.

Implements org.apache.sshd.common.kex.KeyExchange.init.

Doc from org.apache.sshd.common.kex.KeyExchange.init.

Initialize the key exchange algorithm.

Parameters
v_s:byte[]

the server identification string

v_c:byte[]

the client identification string

i_s:byte[]

the server key initialization packet

i_c:byte[]

the client key initialization packet

Annotations
@Override
Exceptions
Exception:
if an error occurs
newFactoryback to summary
public static KeyExchangeFactory newFactory(DHFactory delegate)
nextback to summary
public boolean next(int cmd, Buffer buffer) throws Exception

Implements org.apache.sshd.common.kex.KeyExchange.next.

Doc from org.apache.sshd.common.kex.KeyExchange.next.

Process the next packet

Parameters
cmd:int

the command

buffer:Buffer

the packet contents positioned after the command

Returns:boolean

a boolean indicating if the processing is complete or if more packets are to be received

Annotations
@Override
@SuppressWarnings:checkstyle:VariableDeclarationUsageDistance
Exceptions
Exception:
if an error occurs
verifyCertificateback to summary
protected void verifyCertificate(Session session, OpenSshCertificate openSshKey) throws Exception