Back to product page

KeyExchangeList function


Determines list of key exchange algorithms supported and offered by wodSFTPdll.

Type

A Long value. If successful, 0 is returned, otherwise error as specified here

Syntax

  • C
long Sftp_GetKeyExchangeList(void *Sftp, char *Buffer, int *Bufsize);
long Sftp_SetKeyExchangeList(void *Sftp, char *newVal);
The KeyExchangeList(void *Sftp,char *Buffer,int *Bufsize) syntax has these parts:
void *SftpHandle of the created Sftp instance.
char *BufferBuffer that will hold the returned string, or new string that will be set.
int *BufsizeSize of the buffer.

Remarks

KeyExchangeList property holds list of all supported and offered key exchange algorithms that can be used when client connects to the server. By default KeyExchangeList will contain this list

ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,curve25519-sha256@libssh.org,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1,diffie-hellman-group14-sha1

but you can change it and remove or rearrange algorithms to suit your needs. Note that order of supported algorithms is VERY important since client makes a choice of used key exchange algorithm. Removing them means wodSFTPdll will not use them. Adding new unlisted algorithm will cause wodSFTPdll to fail to connect.

Platforms

Windows