Feature notes: SSH implementation notes
inherits from tCustomOption
(no public members)
The common negotiation contract implemented by every SSH algorithm/option list (cipher, MAC, KEX, host-key, compression, user-auth). Applications do not usually call these methods; they configure the enabled/preferred set via SelectedOptionNames on the corresponding published option-list property of a client or server component, and the SSH transport layer drives the RFC 4253 algorithm negotiation through this interface during KEXINIT.
function GetSelOptionNames: string;
function SelectAsClient(const aServerPrefs : string; out aCorrectGuess: Boolean) : iCustomOption;
function SelectAsServer(const aClientPrefs : string; out aCorrectGuess: Boolean) : iCustomOption;
property SelectedOptionNames: string read GetSelOptionNames;
inherits from tCustomOptionList
implements iSSHOptionList
function SelectAsClient(const aServerPrefs : string; out aCorrectGuess: Boolean) : iCustomOption;
function SelectAsServer(const aClientPrefs : string; out aCorrectGuess: Boolean) : iCustomOption;
destructor Destroy; override;
procedure SuggestRequiredUnits(aProc: tGetStringMethod); override;
property EnabledOptionCount: Integer read GetEnabledOptionCount;
inherits from iCustomOption
function GetCipherClass: tCipherClass;
function GetKeyLength: Integer;
property CipherClass: tCipherClass read GetCipherClass;
property KeyLength: Integer read GetKeyLength;
inherits from tCustomSSHOptionList
procedure AddOption(const aIdentifier: string; aCipherAlg : tCipherAlg; aCipherMode: tCipherMode; aKeyLength : Integer);
property EnabledOptions[aIndex: Integer]: iSSHCipherOption read GetEnabledOptions;
inherits from tCustomSSHOption
implements iSSHCipherOption
constructor Create(const aIdentifier: string; aCipherAlg : tCipherAlg; aCipherMode: tCipherMode; aKeyLength : Integer);
procedure SuggestRequiredUnits(aProc: tGetStringMethod); override;
inherits from iCustomOption
function GetHashClass: tHashClass;
function GetMacLength: Integer;
function GetKeyLength: Integer;
property HashClass: tHashClass read GetHashClass;
property MacLength: Integer read GetMacLength;
property KeyLength: Integer read GetKeyLength;
inherits from tCustomSSHOptionList
procedure AddOption(const aIdentifier: string; aHashAlg : tHashAlgorithm; aMacLength, aKeyLength : Integer);
property EnabledOptions[aIndex: Integer]: iSSHMacOption read GetEnabledOptions;
inherits from tCustomSSHOption
implements iSSHMacOption
constructor Create(const aIdentifier: string; aHashAlg : tHashAlgorithm; aMacLength : Integer; aKeyLength : Integer);
procedure SuggestRequiredUnits(aProc: tGetStringMethod); override;
inherits from iCustomOption
function GetCompressionClass: tSSHCompressionClass;
function GetDecompressionClass: tSSHCompressionClass;
property CompressionClass: tSSHCompressionClass read GetCompressionClass;
property DecompressionClass: tSSHCompressionClass read GetDecompressionClass;
inherits from tCustomSSHOptionList
procedure AddOption(const aIdentifier: string);
property EnabledOptions[aIndex: Integer]: iSSHCompressionOption read GetEnabledOptions;
inherits from tCustomSSHOption
implements iSSHCompressionOption
constructor Create(const aIdentifier: string);
inherits from iCustomOption
function GetKexClientClass: tDSIKeyExchangeClass;
function GetKexServerClass: tDSIKeyExchangeClass;
function GetHashAlgorithm: tHashAlgorithm;
function GetKeyDerivation: tKeyDerivation;
property KexClientClass: tDSIKeyExchangeClass read GetKexClientClass;
property KexServerClass: tDSIKeyExchangeClass read GetKexServerClass;
property HashAlgorithm: tHashAlgorithm read GetHashAlgorithm;
property KeyDerivation: tKeyDerivation read GetKeyDerivation;
inherits from tCustomSSHOptionList
procedure AddOption(const aIdentifier: string; const aKexClassName : string; aHashAlgorithm: tHashAlgorithm; aKeyDerivation: tKeyDerivation);
property EnabledOptions[aIndex: Integer]: iSSHKexOption read GetEnabledOptions;
inherits from tCustomSSHOption
implements iSSHKexOption
constructor Create(const aIdentifier : string; const aKexClassName : string; aHashAlgorithm: tHashAlgorithm; aKeyDerivation: tKeyDerivation);
procedure SuggestRequiredUnits(aProc: tGetStringMethod); override;
inherits from iCustomOption
function GetKey: iUnknown;
function GetHashAlgorithm: tHashAlgorithm;
function GetPublicKeyFormat: iCustomDSIKeyFormat;
function SetKey(const aKey : iUnknown; const aTransport: iTransport) : Boolean;
property Key: iUnknown read GetKey;
property PublicKeyFormat: iCustomDSIKeyFormat read GetPublicKeyFormat;
inherits from tCustomSSHOptionList
procedure AddOption(const aIdentifier: string; const aKey : iUnknown; aHashAlg : tHashAlgorithm; const aFormat : iCustomDSIKeyFormat);
procedure RemoveOption(const aIdentifier: string);
procedure RemoveKeylessOptions;
procedure ResolveSelection;
procedure SetSelectedOptionNames(const aNames: array of string); override;
procedure SuggestRequiredUnits(aProc: tGetStringMethod); override;
property EnabledOptions[aIndex: Integer]: iSSHKeyOption read GetEnabledOptions;
property OnSetKey: tSetKeyEvent read fOnSetKey write SetOnSetKey;
inherits from tCustomSSHOption
implements iSSHKeyOption
constructor Create(const aIdentifier: string; const aKey : iUnknown; aHashAlg : tHashAlgorithm; const aFormat : iCustomDSIKeyFormat);
procedure SuggestRequiredUnits(aProc: tGetStringMethod); override;
property OnSetKey: tSetKeyEvent read fOnSetKey write SetOnSetKey;
inherits from iCustomOption
TODO One entry in a user's allowed-subsystem list: it names an SSH connection subsystem (e.g. "sftp") that the user is permitted to request. Applications populate the owning tSSHUserSubSystemOptionList (per user) rather than creating these directly; the option's identifier is the subsystem name.
function GetSubSystemName: string;
property SubSystemName: string read GetSubSystemName;
inherits from tCustomSSHOptionList
procedure AddOption(const aIdentifier: string);
procedure RemoveOption(const aIdentifier: string);
property EnabledOptions[aIndex: Integer]: iSSHUserSubSystemOption read GetEnabledOptions;
property AllOptionNames: string read GetAllOptionNames write SetAllOptionNames;
inherits from tCustomSSHOption
implements iSSHUserSubSystemOption
constructor Create(const aIdentifier: string);
inherits from iCustomOption
TODO
One client-side user-authentication method entry (e.g. "password" or "publickey"). It maps a method name to the tSSHClientAuthentication class that performs it. Applications enable/order the methods via the owning tSSHClientUserAuthOptionList (the client component's UserAuthOptions), not by handling these entries directly.
function GetClientAuthClass: tSSHClientAuthenticationClass;
procedure AddOption(const aIdentifier: string; const aClassName : string);
function Execute(const aTransport : iTransport; const aAuthData : iSSHGetAuthData; var aMustCont : Boolean; var aAuthThatCanCont: string) : Boolean;
property EnabledOptions[aIndex: Integer]: iSSHClientUserAuthOption read GetEnabledOptions;
property Username: string read GetUsername write SetUsername;
property Service: string read GetService write SetService;
inherits from tCustomSSHOption
implements iSSHClientUserAuthOption
constructor Create(const aIdentifier : string; const aClassName : string);
inherits from iCustomOption
One server-side user-authentication method entry (e.g. "password" or "publickey"): it maps an accepted method name to the server-side tSSHClientAuthenticationServer class that verifies it. Applications enable the methods a server accepts via the owning tSSHServerUserAuthOptionList (the server component's UserAuthOptions), not through these entries.
function GetServerAuthClass: tSSHClientAuthenticationServerClass;
inherits from tCustomSSHOptionList
procedure AddOption(const aIdentifier: string; const aClassName : string);
function Execute(const aTransport: iTransport; const aAuthData : iSSHGetAuthDataServer; var aUsername : string; var aService : string) : Boolean;
property EnabledOptions[aIndex: Integer]: iSSHServerUserAuthOption read GetEnabledOptions;
inherits from tCustomSSHOption
implements iSSHServerUserAuthOption
constructor Create(const aIdentifier : string; const aClassName : string);