# SFTPClient Component

The SFTPClient class provides client-side functionality for SFTP (Secure File Transfer Protocol).

## Syntax

```text
secureblackbox.SFTPClient
```

## Remarks

SFTP is a file transfer subsystem that runs on top of secure shell (SSH) connection. This means that SFTP uses the whole strength of security provided by the SSH protocol, at the same time providing strong file transfer capabilities.

Please do keep in mind that there exist two protocols that offer similar secure file transfer features. SFTP works on top of SSH and normally uses port 22. FTPS works on top of TLS (or SSL) and normally uses ports 21 and 990. The protocols are very different, so please make sure you are after the right component. This component works with SFTP. Use the FTPClient component to connect to FTPS servers.

Below are the typical steps that let you integrate SFTPClient to your project:

- Set up your [Username](#username-property-sftpclient-component) and [Password](#password-property-sftpclient-component). SSH uses mandatory client-side authentication, so in most cases you need to provide your username, your password, or, sometimes, your private key. Use Key property to provide your key, if needed.
- Be ready to handle server authentication, which is also mandatory in SSH. SSH operates a concept of a trusted keys file, where keys of known servers are stored. You can assign a path to your own trusted keys file to the [TrustedKeysFile](#trustedkeysfile-property-sftpclient-component) property. When a client receives a server key, it reports it to your code via its [KnownKeyReceived](#knownkeyreceived-event-sftpclient-component) or [UnknownKeyReceived](#unknownkeyreceived-event-sftpclient-component) event, depending on whether the key was found in the trusted list. If you leave [TrustedKeysFile](#trustedkeysfile-property-sftpclient-component) empty, SFTPClient will only be able to fire the [UnknownKeyReceived](#unknownkeyreceived-event-sftpclient-component) event, since there will be no known keys to report.
- If needed, customize Proxy parameters and SSHSettings.
- Consider interacting more with SFTPClient by subscribing to [AuthAttempt](#authattempt-event-sftpclient-component), [AuthFailed](#authfailed-event-sftpclient-component), and [AuthSucceeded](#authsucceeded-event-sftpclient-component) events to be notified about the client authentication progress.
- When you are ready to connect, call [Connect](#connect-method-sftpclient-component), passing the details of the server as parameters. During the initial handshake, the following events will fire: [UnknownKeyReceived](#unknownkeyreceived-event-sftpclient-component) (or [KnownKeyReceived](#knownkeyreceived-event-sftpclient-component)), and then one or more [AuthAttempt](#authattempt-event-sftpclient-component), [AuthFailed](#authfailed-event-sftpclient-component) and [AuthSucceeded](#authsucceeded-event-sftpclient-component).
- Upon completion of the [Connect](#connect-method-sftpclient-component) method, the component is ready for file operations. Use [DownloadFile](#downloadfile-method-sftpclient-component), [UploadFile](#uploadfile-method-sftpclient-component), [ListDir](#listdir-method-sftpclient-component), [DeleteFile](#deletefile-method-sftpclient-component) and other file transfer methods to work with the server file system.
- When you are done with your work, call [Disconnect](#disconnect-method-sftpclient-component) to close the connection.

Some SFTP servers, primarily older ones, may expose various transfer issues. If you come across a weird issue that you believe should not be happening (such as repeated connection closures in the middle of the transfer), please try adjusting the following properties:

- [AutoAdjustTransferBlock](#autoadjusttransferblock-property-sftpclient-component) to false,
- [PipelineLength](#pipelinelength-property-sftpclient-component) to 1,
- [UploadBlockSize](#uploadblocksize-property-sftpclient-component) to 16384,
- [DownloadBlockSize](#downloadblocksize-property-sftpclient-component) to 16384.

 These adjustments will put SFTPClient in very conservative transfer setup. While this setup may be quite sluggish with modern servers, it should make SFTPClient interoperable with most older servers.

## Property List

*The following is the full list of the properties of the component with short descriptions. Click on the links for further details.*

|  |  |
| --- | --- |
| [AuthAttempts](#authattempts-property-sftpclient-component) | Specifies the number of SSH authentication attempts. |
| [AutoAdjustTransferBlock](#autoadjusttransferblock-property-sftpclient-component) | Specifies whether to adjust the send and receive buffer sizes automatically. |
| [ConflictResolutionMode](#conflictresolutionmode-property-sftpclient-component) | Defines the approach that should be used to resolve various conflicts during batch processing. |
| [Connected](#connected-property-sftpclient-component) | Indicates if the client is connected to the SFTP server. |
| [ConnInfoClientKeyAlgorithm](#conninfoclientkeyalgorithm-property-sftpclient-component) | Specifies the client's key algorithm. |
| [ConnInfoClientKeyBits](#conninfoclientkeybits-property-sftpclient-component) | Specifies the length of the client's key. |
| [ConnInfoClientKeyFingerprint](#conninfoclientkeyfingerprint-property-sftpclient-component) | The fingerprint (hash value) of the client's public key. |
| [ConnInfoCloseReason](#conninfoclosereason-property-sftpclient-component) | Contains the line sent by the server just before closing the connection. |
| [ConnInfoCompressionAlgorithmInbound](#conninfocompressionalgorithminbound-property-sftpclient-component) | Compression algorithm for the incoming traffic. |
| [ConnInfoCompressionAlgorithmOutbound](#conninfocompressionalgorithmoutbound-property-sftpclient-component) | Compression algorithm for the outgoing traffic. |
| [ConnInfoEncryptionAlgorithmInbound](#conninfoencryptionalgorithminbound-property-sftpclient-component) | Encryption algorithm for the incoming traffic. |
| [ConnInfoEncryptionAlgorithmOutbound](#conninfoencryptionalgorithmoutbound-property-sftpclient-component) | Encryption algorithm for the outgoing traffic. |
| [ConnInfoInboundEncryptionKeyBits](#conninfoinboundencryptionkeybits-property-sftpclient-component) | Specifies the length of the key used to encrypt the incoming traffic. |
| [ConnInfoKexAlgorithm](#conninfokexalgorithm-property-sftpclient-component) | The key exchange algorithm used during the SSH handshake. |
| [ConnInfoKexBits](#conninfokexbits-property-sftpclient-component) | The number of bits used by the key exchange algorithm. |
| [ConnInfoKexLines](#conninfokexlines-property-sftpclient-component) | The contents of the received KexInit packet. |
| [ConnInfoMacAlgorithmInbound](#conninfomacalgorithminbound-property-sftpclient-component) | MAC algorithm used for the incoming connection. |
| [ConnInfoMacAlgorithmOutbound](#conninfomacalgorithmoutbound-property-sftpclient-component) | MAC algorithm used for outbound connection. |
| [ConnInfoOutboundEncryptionKeyBits](#conninfooutboundencryptionkeybits-property-sftpclient-component) | Specifies the length of the key used to encrypt the outgoing traffic. |
| [ConnInfoPublicKeyAlgorithm](#conninfopublickeyalgorithm-property-sftpclient-component) | Specifies the public key algorithm which was used during the SSH handshake. |
| [ConnInfoRemoteAddress](#conninforemoteaddress-property-sftpclient-component) | The client's IP address. |
| [ConnInfoRemotePort](#conninforemoteport-property-sftpclient-component) | The remote port of the client connection. |
| [ConnInfoRemoteSoftwareName](#conninforemotesoftwarename-property-sftpclient-component) | Returns the name (self-advertised) of the SSH software running on the other side. |
| [ConnInfoServerKeyAlgorithm](#conninfoserverkeyalgorithm-property-sftpclient-component) | Specifies the server's key algorithm. |
| [ConnInfoServerKeyBits](#conninfoserverkeybits-property-sftpclient-component) | Specifies the number of bits in the server's key. |
| [ConnInfoServerKeyFingerprint](#conninfoserverkeyfingerprint-property-sftpclient-component) | The fingerprint (hash value) of the server's public key. |
| [ConnInfoTotalBytesReceived](#conninfototalbytesreceived-property-sftpclient-component) | Returns the total number of bytes received over this connection. |
| [ConnInfoTotalBytesSent](#conninfototalbytessent-property-sftpclient-component) | Returns the total number of bytes sent over this connection. |
| [ConnInfoVersion](#conninfoversion-property-sftpclient-component) | Specifies SSH protocol version. |
| [CurrListEntryAccessTime](#currlistentryaccesstime-property-sftpclient-component) | Contains the last access time for this file, in UTC. |
| [CurrListEntryCreationTime](#currlistentrycreationtime-property-sftpclient-component) | Contains this file's creation time, in UTC. |
| [CurrListEntryEntryFormat](#currlistentryentryformat-property-sftpclient-component) | The file listing format: cfefUnknown 0 cfefUnix 1 cfefWindows 2 cfefMLSD 3 . |
| [CurrListEntryFileType](#currlistentryfiletype-property-sftpclient-component) | The type of the entry: fetUnknown 0 fetDirectory 1 fetFile 2 fetSymlink 3 fetSpecial 4 fetCurrentDirectory 5 fetParentDirectory 6 fetSocket 7 fetCharDevice 8 fetBlockDevice 9 fetFIFO 10 . |
| [CurrListEntryHandle](#currlistentryhandle-property-sftpclient-component) | Allows to get or set a 'handle', a unique identifier of the underlying property object. |
| [CurrListEntryModificationTime](#currlistentrymodificationtime-property-sftpclient-component) | File last modification date/time. |
| [CurrListEntryName](#currlistentryname-property-sftpclient-component) | The file or directory name. |
| [CurrListEntryPath](#currlistentrypath-property-sftpclient-component) | The full path to the file or directory. |
| [CurrListEntryPrincipal](#currlistentryprincipal-property-sftpclient-component) | Specifies the owner of the file/directory. |
| [CurrListEntrySize](#currlistentrysize-property-sftpclient-component) | File size in bytes. |
| [CurrListEntryUnixPerms](#currlistentryunixperms-property-sftpclient-component) | The file Unix permissions bit mask (e. |
| [CurrListEntryUnparsedName](#currlistentryunparsedname-property-sftpclient-component) | The unparsed entry as returned by the server. |
| [DownloadBlockSize](#downloadblocksize-property-sftpclient-component) | The download block size in bytes. |
| [ExternalCryptoAsyncDocumentID](#externalcryptoasyncdocumentid-property-sftpclient-component) | Specifies an optional document ID for SignAsyncBegin() and SignAsyncEnd() calls. |
| [ExternalCryptoCustomParams](#externalcryptocustomparams-property-sftpclient-component) | Custom parameters to be passed to the signing service (uninterpreted). |
| [ExternalCryptoData](#externalcryptodata-property-sftpclient-component) | Additional data to be included in the async state and mirrored back by the requestor. |
| [ExternalCryptoExternalHashCalculation](#externalcryptoexternalhashcalculation-property-sftpclient-component) | Specifies whether the message hash is to be calculated at the external endpoint. |
| [ExternalCryptoHashAlgorithm](#externalcryptohashalgorithm-property-sftpclient-component) | Specifies the request's signature hash algorithm. |
| [ExternalCryptoKeyID](#externalcryptokeyid-property-sftpclient-component) | The ID of the pre-shared key used for DC request authentication. |
| [ExternalCryptoKeySecret](#externalcryptokeysecret-property-sftpclient-component) | The pre-shared key used for DC request authentication. |
| [ExternalCryptoMethod](#externalcryptomethod-property-sftpclient-component) | Specifies the asynchronous signing method. |
| [ExternalCryptoMode](#externalcryptomode-property-sftpclient-component) | Specifies the external cryptography mode. |
| [ExternalCryptoPublicKeyAlgorithm](#externalcryptopublickeyalgorithm-property-sftpclient-component) | Provide the public key algorithm here if the certificate is not available on the pre-signing stage. |
| [FIPSMode](#fipsmode-property-sftpclient-component) | Reserved. |
| [ForceCompression](#forcecompression-property-sftpclient-component) | Enforces compression for the SSH layer. |
| [KeyFingerprintSHA1](#keyfingerprintsha1-property-sftpclient-component) | Contains the SHA-1 fingerprint (hash) of the key. |
| [KeyFingerprintSHA256](#keyfingerprintsha256-property-sftpclient-component) | Contains the SHA-256 fingerprint (hash) of the key. |
| [KeyHandle](#keyhandle-property-sftpclient-component) | Allows to get or set a 'handle', a unique identifier of the underlying property object. |
| [MaxSFTPVersion](#maxsftpversion-property-sftpclient-component) | Higher SFTP version to support. |
| [MinSFTPVersion](#minsftpversion-property-sftpclient-component) | Lower SFTP version to support. |
| [Password](#password-property-sftpclient-component) | Specifies user's authentication password. |
| [PipelineLength](#pipelinelength-property-sftpclient-component) | The number of parallelized transfer requests. |
| [ProxyAddress](#proxyaddress-property-sftpclient-component) | The IP address of the proxy server. |
| [ProxyAuthentication](#proxyauthentication-property-sftpclient-component) | The authentication type used by the proxy server. |
| [ProxyPassword](#proxypassword-property-sftpclient-component) | The password to authenticate to the proxy server. |
| [ProxyPort](#proxyport-property-sftpclient-component) | The port on the proxy server to connect to. |
| [ProxyType](#proxytype-property-sftpclient-component) | The type of the proxy server. |
| [ProxyRequestHeaders](#proxyrequestheaders-property-sftpclient-component) | Contains HTTP request headers for WebTunnel and HTTP proxy. |
| [ProxyResponseBody](#proxyresponsebody-property-sftpclient-component) | Contains the HTTP or HTTPS (WebTunnel) proxy response body. |
| [ProxyResponseHeaders](#proxyresponseheaders-property-sftpclient-component) | Contains response headers received from an HTTP or HTTPS (WebTunnel) proxy server. |
| [ProxyUseIPv6](#proxyuseipv6-property-sftpclient-component) | Specifies whether IPv6 should be used when connecting through the proxy. |
| [ProxyUsername](#proxyusername-property-sftpclient-component) | Specifies the username credential for proxy authentication. |
| [ServerKeyAlgorithm](#serverkeyalgorithm-property-sftpclient-component) | Specifies the key algorithm. |
| [ServerKeyBits](#serverkeybits-property-sftpclient-component) | The number of bits in the key: the more the better, 2048 or 4096 are typical values. |
| [ServerKeyComment](#serverkeycomment-property-sftpclient-component) | The comment for the public key. |
| [ServerKeyCurve](#serverkeycurve-property-sftpclient-component) | Specifies the elliptical curve when EC cryptography is used. |
| [ServerKeyExtractable](#serverkeyextractable-property-sftpclient-component) | Whether the key is extractable (e. |
| [ServerKeyFingerprintMD5](#serverkeyfingerprintmd5-property-sftpclient-component) | Contains the MD5 fingerprint (hash) of the key. |
| [ServerKeyFingerprintSHA1](#serverkeyfingerprintsha1-property-sftpclient-component) | Contains the SHA-1 fingerprint (hash) of the key. |
| [ServerKeyFingerprintSHA256](#serverkeyfingerprintsha256-property-sftpclient-component) | Contains the SHA-256 fingerprint (hash) of the key. |
| [ServerKeyHandle](#serverkeyhandle-property-sftpclient-component) | Allows to get or set a 'handle', a unique identifier of the underlying property object. |
| [ServerKeyKeyFormat](#serverkeykeyformat-property-sftpclient-component) | Specifies the format in which the key is stored. |
| [ServerKeyKeyProtectionAlgorithm](#serverkeykeyprotectionalgorithm-property-sftpclient-component) | Specifies the key protection algorithm. |
| [ServerKeyPrivate](#serverkeyprivate-property-sftpclient-component) | Whether this key is a private key or not. |
| [ServerKeyPublic](#serverkeypublic-property-sftpclient-component) | Whether this key is a public key or not. |
| [ServerKeySubject](#serverkeysubject-property-sftpclient-component) | Specifies the public key owner (subject). |
| [SocketDNSMode](#socketdnsmode-property-sftpclient-component) | Selects the DNS resolver to use: the class's (secure) built-in one, or the one provided by the system. |
| [SocketDNSPort](#socketdnsport-property-sftpclient-component) | Specifies the port number to be used for sending queries to the DNS server. |
| [SocketDNSQueryTimeout](#socketdnsquerytimeout-property-sftpclient-component) | The timeout (in milliseconds) for each DNS query. |
| [SocketDNSServers](#socketdnsservers-property-sftpclient-component) | The addresses of DNS servers to use for address resolution, separated by commas or semicolons. |
| [SocketDNSTotalTimeout](#socketdnstotaltimeout-property-sftpclient-component) | The timeout (in milliseconds) for the whole resolution process. |
| [SocketIncomingSpeedLimit](#socketincomingspeedlimit-property-sftpclient-component) | The maximum number of bytes to read from the socket, per second. |
| [SocketLocalAddress](#socketlocaladdress-property-sftpclient-component) | The local network interface to bind the socket to. |
| [SocketLocalPort](#socketlocalport-property-sftpclient-component) | The local port number to bind the socket to. |
| [SocketOutgoingSpeedLimit](#socketoutgoingspeedlimit-property-sftpclient-component) | The maximum number of bytes to write to the socket, per second. |
| [SocketTimeout](#sockettimeout-property-sftpclient-component) | The maximum period of waiting, in milliseconds, after which the socket operation is considered unsuccessful. |
| [SocketUseIPv6](#socketuseipv6-property-sftpclient-component) | Enables or disables IP protocol version 6. |
| [SSHSettingsAutoAdjustCiphers](#sshsettingsautoadjustciphers-property-sftpclient-component) | Whether the SSH client should adjust its list of supported ciphers 'on-the-fly' for greater compatibility with the server it is connecting to. |
| [SSHSettingsBaseConfiguration](#sshsettingsbaseconfiguration-property-sftpclient-component) | Allows to choose base configuration of SSH settings, tuned up for different purposes such as high security or higher compatibility. |
| [SSHSettingsCompressionAlgorithms](#sshsettingscompressionalgorithms-property-sftpclient-component) | A list of session compression algorithms separated with commas or semicolons. |
| [SSHSettingsCompressionLevel](#sshsettingscompressionlevel-property-sftpclient-component) | Possible values for the Compression Level range from 0 (minimum compression) to 9 (maximum compression). |
| [SSHSettingsDefaultWindowSize](#sshsettingsdefaultwindowsize-property-sftpclient-component) | The SSH window size specifies how many bytes the client can send to the server in the command channel without obtaining pre-authorization for the further send from the server. |
| [SSHSettingsEncryptionAlgorithms](#sshsettingsencryptionalgorithms-property-sftpclient-component) | A list of session encryption algorithms separated with commas or semicolons. |
| [SSHSettingsForceCompression](#sshsettingsforcecompression-property-sftpclient-component) | Whether the SSH client should explicitly request compression. |
| [SSHSettingsForwardAuthAgent](#sshsettingsforwardauthagent-property-sftpclient-component) | Enables or disables auth agent forwarding. |
| [SSHSettingsGSSAuthTypes](#sshsettingsgssauthtypes-property-sftpclient-component) | A comma-separated list of authentication types. |
| [SSHSettingsGSSDelegateCreds](#sshsettingsgssdelegatecreds-property-sftpclient-component) | Switches credential delegation on or off. |
| [SSHSettingsGSSHostname](#sshsettingsgsshostname-property-sftpclient-component) | The GSS host name, in form of a FQDN (e. |
| [SSHSettingsGSSLib](#sshsettingsgsslib-property-sftpclient-component) | A path to the GSS-API library (DLL or SO). |
| [SSHSettingsGSSMechanisms](#sshsettingsgssmechanisms-property-sftpclient-component) | A comma-separated list of GSS mechanisms to use. |
| [SSHSettingsGSSProtocols](#sshsettingsgssprotocols-property-sftpclient-component) | A comma-separated list of SSPI protocols. |
| [SSHSettingsHandshakeTimeout](#sshsettingshandshaketimeout-property-sftpclient-component) | Specifies the maximal time for the SSH handshake to proceed, in seconds. |
| [SSHSettingsKexAlgorithms](#sshsettingskexalgorithms-property-sftpclient-component) | A list of key exchange algorithms separated with commas or semicolons. |
| [SSHSettingsMacAlgorithms](#sshsettingsmacalgorithms-property-sftpclient-component) | A list of MAC (for message authentication code ) algorithms separated with commas or semicolons. |
| [SSHSettingsMaxSSHPacketSize](#sshsettingsmaxsshpacketsize-property-sftpclient-component) | Specifies the maximum length of one SSH packet in bytes. |
| [SSHSettingsMinWindowSize](#sshsettingsminwindowsize-property-sftpclient-component) | Specifies the minimal internal window size. |
| [SSHSettingsObfuscateHandshake](#sshsettingsobfuscatehandshake-property-sftpclient-component) | Enables or disables handshake obfuscation. |
| [SSHSettingsObfuscationPassword](#sshsettingsobfuscationpassword-property-sftpclient-component) | Specifies the password used to encrypt the handshake when ObfuscateHandshake is set. |
| [SSHSettingsPublicKeyAlgorithms](#sshsettingspublickeyalgorithms-property-sftpclient-component) | A list of public key algorithms separated with commas or semicolons. |
| [SSHSettingsRequestPasswordChange](#sshsettingsrequestpasswordchange-property-sftpclient-component) | Whether to request a password change when connecting. |
| [SSHSettingsSoftwareName](#sshsettingssoftwarename-property-sftpclient-component) | The name to be used by the class to identify itself. |
| [SSHSettingsTrustAllKeys](#sshsettingstrustallkeys-property-sftpclient-component) | Enables or disables explicit trust to all server keys. |
| [SSHSettingsUseAuthAgent](#sshsettingsuseauthagent-property-sftpclient-component) | Enables or disables the use of external key agent, such as Putty key agent. |
| [SSHSettingsVersions](#sshsettingsversions-property-sftpclient-component) | Specifies enabled SSH protocol versions (1 or 2). |
| [TrustedKeysFile](#trustedkeysfile-property-sftpclient-component) | A file containing the keys of authorized servers. |
| [UploadBlockSize](#uploadblocksize-property-sftpclient-component) | The upload block size in bytes. |
| [Username](#username-property-sftpclient-component) | The client's username to authenticate to the server. |
| [UseUTF8](#useutf8-property-sftpclient-component) | Enables UTF8 for all string content. |
| [Version](#version-property-sftpclient-component) | The SFTP version negotiated. |

## Method List

*The following is the full list of the methods of the component with short descriptions. Click on the links for further details.*

|  |  |
| --- | --- |
| [AbsolutePath](#absolutepath-method-sftpclient-component) | Requests the absolute path for a relative path. |
| [ChangeDir](#changedir-method-sftpclient-component) | Changes current working directory on the server. |
| [Config](#config-method-sftpclient-component) | Sets or retrieves a configuration setting. |
| [Connect](#connect-method-sftpclient-component) | Connects to an SFTP server. |
| [CreateLink](#createlink-method-sftpclient-component) | Creates a symbolic or hard link to a remote file. |
| [DeleteDir](#deletedir-method-sftpclient-component) | Removes directory from the SFTP server. |
| [DeleteFile](#deletefile-method-sftpclient-component) | Deletes a file from the SFTP server. |
| [DeleteFiles](#deletefiles-method-sftpclient-component) | Deletes a group of files from the SFTP server. |
| [DirExists](#direxists-method-sftpclient-component) | Checks if a directory exists on the SFTP server. |
| [Disconnect](#disconnect-method-sftpclient-component) | Disconnects from the SFTP server. |
| [DoAction](#doaction-method-sftpclient-component) | Performs an additional action. |
| [DownloadBytes](#downloadbytes-method-sftpclient-component) | Downloads a file from the server into an array of bytes. |
| [DownloadFile](#downloadfile-method-sftpclient-component) | Downloads a file from the SFTP server. |
| [DownloadFiles](#downloadfiles-method-sftpclient-component) | Downloads multiple files from the SFTP server. |
| [ExecuteSSHCommand](#executesshcommand-method-sftpclient-component) | Sends an SSH command to the server in the middle of SFTP session. |
| [ExtensionCmd](#extensioncmd-method-sftpclient-component) | Sends an extension command to the server. |
| [FileExists](#fileexists-method-sftpclient-component) | Checks whether a file exists on the server. |
| [GetCurrentDir](#getcurrentdir-method-sftpclient-component) | Returns the current directory on the SFTP server. |
| [GetFileSize](#getfilesize-method-sftpclient-component) | Checks the size of a remote file. |
| [ListDir](#listdir-method-sftpclient-component) | Lists the content of the current remote directory. |
| [MakeDir](#makedir-method-sftpclient-component) | Creates a new directory on the server. |
| [RenameFile](#renamefile-method-sftpclient-component) | Renames a file. |
| [RequestAttributes](#requestattributes-method-sftpclient-component) | Requests attributes of the remote file. |
| [Reset](#reset-method-sftpclient-component) | Resets the class settings. |
| [SetAttributes](#setattributes-method-sftpclient-component) | Sets the attributes upon a remote file. |
| [UploadBytes](#uploadbytes-method-sftpclient-component) | Uploads a byte array to the server. |
| [UploadFile](#uploadfile-method-sftpclient-component) | Uploads a file to the server. |
| [UploadFiles](#uploadfiles-method-sftpclient-component) | Uploads multiple files to the server. |

## Event List

*The following is the full list of the events fired by the component with short descriptions. Click on the links for further details.*

|  |  |
| --- | --- |
| [AuthAttempt](#authattempt-event-sftpclient-component) | Fires when an authentication attempt is performed. |
| [AuthFailed](#authfailed-event-sftpclient-component) | Fires if an authentication attempt fails. |
| [AuthSucceeded](#authsucceeded-event-sftpclient-component) | Reports a successful authentication. |
| [Banner](#banner-event-sftpclient-component) | Reports the receipt of the Welcome message from the server. |
| [Disconnect](#disconnect-event-sftpclient-component) | Reports SFTP connection closure. |
| [Error](#error-event-sftpclient-component) | Information about errors during SFTP connection. |
| [ExternalSign](#externalsign-event-sftpclient-component) | Handles remote or external signing initiated by the SignExternal method or other source. |
| [FileNameChangeNeeded](#filenamechangeneeded-event-sftpclient-component) | Asks the application for a new file name. |
| [FileOperation](#fileoperation-event-sftpclient-component) | Signifies the start of a file transfer operation. |
| [FileOperationResult](#fileoperationresult-event-sftpclient-component) | Signifies the completion of a file transfer operation. |
| [KnownKeyReceived](#knownkeyreceived-event-sftpclient-component) | Signals that the server has introduced itself with a known key. |
| [ListEntry](#listentry-event-sftpclient-component) | Reports a directory listing entry to the application. |
| [Notification](#notification-event-sftpclient-component) | This event notifies the application about an underlying control flow event. |
| [PasswordChangeRequest](#passwordchangerequest-event-sftpclient-component) | Signals that the server requests a password change. |
| [PrivateKeyNeeded](#privatekeyneeded-event-sftpclient-component) | Asks the application for the client's private key. |
| [Progress](#progress-event-sftpclient-component) | Fires periodically during the data transfer. |
| [UnknownKeyReceived](#unknownkeyreceived-event-sftpclient-component) | Signals that the server has introduced itself with an unknown key. |

## Config Settings

*The following is a list of config settings for the component with short descriptions. Click on the links for further details.*

|  |  |
| --- | --- |
| [AdjustFileTimes](#AdjustFileTimes) | Whether file times should be adjusted after upload/download. |
| [AllAlgorithms](#AllAlgorithms) | Returns the list of algorithms enabled in the class. |
| [ASCIIMode](#ASCIIMode) | Whether ASCII transfer mode is used. |
| [AvailableSpace](#AvailableSpace) | Returns details of server disk space availability. This protocol extension must be supported by the server for this request to work. |
| [CaseConversion](#CaseConversion) | Whether file names and paths should be case-converted. |
| [CaseSensitive](#CaseSensitive) | Specifies if file paths are case-sensitive. |
| [CloseQuietly](#CloseQuietly) | Controls the client's approach to session closure. |
| [CommandTimeout](#CommandTimeout) | Specifies the command timeout. |
| [CompressionAlgorithms](#CompressionAlgorithms) | Returns the list of compression algorithms enabled in the class. |
| [CopyMode](#CopyMode) | Tunes up the post-transfer action for batch uploads. |
| [DefaultTransferBlock](#DefaultTransferBlock) | Specifies the default transfer block size. |
| [DefOutboundBlockSize](#DefOutboundBlockSize) | The default outbound block size. |
| [DisablePacketFragmentation](#DisablePacketFragmentation) | Enables or disables SSH packet fragmentation. |
| [EarlyIdString](#EarlyIdString) | Enables the proactive approach to SSH handshake. |
| [EncryptionAlgorithms](#EncryptionAlgorithms) | Returns the list of encryption algorithms enabled in the class. |
| [ErrorOrigin](#ErrorOrigin) | Specifies whether the error is local or remote. |
| [ErrorSeverity](#ErrorSeverity) | Specifies whether the error is fatal. |
| [FileHash](#FileHash) | Returns the hash of the specified file. This protocol extension must be supported by the server for this request to work. |
| [HashAlgorithm](#HashAlgorithm) | The hash algorithm to use for the protocol operations. |
| [HomeDir](#HomeDir) | Returns a user's home directory. This protocol extension must be supported by the server for this request to work. |
| [IncomingSpeedLimit](#IncomingSpeedLimit) | Specifies incoming speed limit. |
| [KeepAlivePeriod](#KeepAlivePeriod) | The inactivity period after which a keep-alive signal will be sent. |
| [KexAlgorithms](#KexAlgorithms) | Returns the list of key exchange algorithms enabled in the class. |
| [LocalCharset](#LocalCharset) | Charset used on the client machine. |
| [LocalNewLineConvention](#LocalNewLineConvention) | A character string for the end of line (EOL) indication on the local machine. |
| [MacAlgorithms](#MacAlgorithms) | Returns the list of MAC algorithms enabled in the class. |
| [NewLineConvention](#NewLineConvention) | A character string for the end of line (EOL) indication on the server. |
| [OutgoingSpeedLimit](#OutgoingSpeedLimit) | Specifies incoming speed limit. |
| [PreserveExistingFileTimes](#PreserveExistingFileTimes) | Whether original file times should be restored upon transfer. |
| [PublicKeyAlgorithms](#PublicKeyAlgorithms) | Returns the list of public key algorithms enabled in the class. |
| [RedirectStdErr](#RedirectStdErr) | Whether to redirect output to StdErr. |
| [RemoteCharset](#RemoteCharset) | Charset used on the server. |
| [SFTPBufferSize](#SFTPBufferSize) | The size of internal buffer used for data transfer. |
| [SFTPServerExecutableLocations](#SFTPServerExecutableLocations) | Location of the SFTP server executable. |
| [SocketRecvBufferSize](#SocketRecvBufferSize) | The inbound socket buffer size. |
| [SocketSendBufferSize](#SocketSendBufferSize) | The outbound socket buffer size. |
| [StatVFS](#StatVFS) | Returns VFS details. This protocol extension must be supported by the server for this request to work. |
| [StdErrData](#StdErrData) | The buffer for writing StdErr data. |
| [SuppressAuxTransferOps](#SuppressAuxTransferOps) | TBD. |
| [TempFolder](#TempFolder) | Returns the temporary directory offered by the server. This protocol extension must be supported by the server for this request to work. |
| [TempPath](#TempPath) | Path for storing temporary files. |
| [TreatZeroSizeAsUndefined](#TreatZeroSizeAsUndefined) | Whether zero size returned by STAT should be considered as undefined. |
| [TryPasswordAuth](#TryPasswordAuth) | Specifies whether the class should attempt the password-based authentication if no password is set. |
| [UseStrictKeyExchange](#UseStrictKeyExchange) | Specifies how strict key exchange is supported. |
| [UseTruncateFlagOnUpload](#UseTruncateFlagOnUpload) | whether to use the 'truncate' flag on file upload. |
| [UseUTF8OnV3](#UseUTF8OnV3) | Whether to apply UTF-8 conversion for SFTP protocol versions 3 and lower. |
| [ASN1UseGlobalTagCache](#ASN1UseGlobalTagCache) | Controls whether ASN.1 module should use a global object cache. |
| [AssignSystemSmartCardPins](#AssignSystemSmartCardPins) | Specifies whether CSP-level PINs should be assigned to CNG keys. |
| [CheckKeyIntegrityBeforeUse](#CheckKeyIntegrityBeforeUse) | Enables or disable private key integrity check before use. |
| [CookieCaching](#CookieCaching) | Specifies whether a cookie cache should be used for HTTP(S) transports. |
| [Cookies](#Cookies) | Gets or sets local cookies for the class. |
| [DefDeriveKeyIterations](#DefDeriveKeyIterations) | Specifies the default key derivation algorithm iteration count. |
| [DNSLocalSuffix](#DNSLocalSuffix) | The suffix to assign for TLD names. |
| [EnableClientSideSSLFFDHE](#EnableClientSideSSLFFDHE) | Enables or disables finite field DHE key exchange support in TLS clients. |
| [EnableSSHMLKEM](#EnableSSHMLKEM) | Enables support for ML-KEM/hybrid key exchange algorithms in SSH client and server classes. |
| [EnableTLSMLKEM](#EnableTLSMLKEM) | Enables support for ML-KEM and hybrid groups in TLS client and server classes. |
| [GlobalCookies](#GlobalCookies) | Gets or sets global cookies for all the HTTP transports. |
| [HardwareCryptoUsePolicy](#HardwareCryptoUsePolicy) | The hardware crypto usage policy. |
| [HttpUserAgent](#HttpUserAgent) | Specifies the user agent name to be used by all HTTP clients. |
| [HttpVersion](#HttpVersion) | The HTTP version to use in any inner HTTP client classes created. |
| [IgnoreExpiredMSCTLSigningCert](#IgnoreExpiredMSCTLSigningCert) | Whether to tolerate the expired Windows Update signing certificate. |
| [ListDelimiter](#ListDelimiter) | The delimiter character for multi-element lists. |
| [LogDestination](#LogDestination) | Specifies the debug log destination. |
| [LogDetails](#LogDetails) | Specifies the debug log details to dump. |
| [LogFile](#LogFile) | Specifies the debug log filename. |
| [LogFilters](#LogFilters) | Specifies the debug log filters. |
| [LogFlushMode](#LogFlushMode) | Specifies the log flush mode. |
| [LogLevel](#LogLevel) | Specifies the debug log level. |
| [LogMaxEventCount](#LogMaxEventCount) | Specifies the maximum number of events to cache before further action is taken. |
| [LogRotationMode](#LogRotationMode) | Specifies the log rotation mode. |
| [MaxASN1BufferLength](#MaxASN1BufferLength) | Specifies the maximal allowed length for ASN.1 primitive tag data. |
| [MaxASN1TreeDepth](#MaxASN1TreeDepth) | Specifies the maximal depth for processed ASN.1 trees. |
| [OCSPHashAlgorithm](#OCSPHashAlgorithm) | Specifies the hash algorithm to be used to identify certificates in OCSP requests. |
| [OldClientSideRSAFallback](#OldClientSideRSAFallback) | Specifies whether the SSH client should use a SHA1 fallback. |
| [PKICache](#PKICache) | Specifies which PKI elements (certificates, CRLs, OCSP responses) should be cached. |
| [PKICachePath](#PKICachePath) | Specifies the file system path where cached PKI data is stored. |
| [ProductVersion](#ProductVersion) | Returns the version of the SecureBlackbox library. |
| [ServerSSLDHKeyLength](#ServerSSLDHKeyLength) | Sets the size of the TLS DHE key exchange group. |
| [StaticDNS](#StaticDNS) | Specifies whether static DNS rules should be used. |
| [StaticIPAddress\[domain\]](#StaticIPAddress[domain]) | Gets or sets an IP address for the specified domain name. |
| [StaticIPAddresses](#StaticIPAddresses) | Gets or sets all the static DNS rules. |
| [Tag](#Tag) | Allows to store any custom data. |
| [TLSSessionGroup](#TLSSessionGroup) | Specifies the group name of TLS sessions to be used for session resumption. |
| [TLSSessionLifetime](#TLSSessionLifetime) | Specifies lifetime in seconds of the cached TLS session. |
| [TLSSessionPurgeInterval](#TLSSessionPurgeInterval) | Specifies how often the session cache should remove the expired TLS sessions. |
| [UseCRLObjectCaching](#UseCRLObjectCaching) | Specifies whether reuse of loaded CRL objects is enabled. |
| [UseInternalRandom](#UseInternalRandom) | Switches between SecureBlackbox-own and platform PRNGs. |
| [UseLegacyAdESValidation](#UseLegacyAdESValidation) | Enables legacy AdES validation mode. |
| [UseOCSPResponseObjectCaching](#UseOCSPResponseObjectCaching) | Specifies whether reuse of loaded OCSP response objects is enabled. |
| [UseOwnDNSResolver](#UseOwnDNSResolver) | Specifies whether the client classes should use own DNS resolver. |
| [UseSharedSystemStorages](#UseSharedSystemStorages) | Specifies whether the validation engine should use a global per-process copy of the system certificate stores. |
| [UseSystemNativeSizeCalculation](#UseSystemNativeSizeCalculation) | An internal CryptoAPI access tweak. |
| [UseSystemOAEPAndPSS](#UseSystemOAEPAndPSS) | Enforces or disables the use of system-driven RSA OAEP and PSS computations. |
| [UseSystemRandom](#UseSystemRandom) | Enables or disables the use of the OS PRNG. |
| [XMLRDNDescriptorName\[OID\]](#XMLRDNDescriptorName[OID]) | Defines an OID mapping to descriptor names for the certificate's IssuerRDN or SubjectRDN. |
| [XMLRDNDescriptorPriority\[OID\]](#XMLRDNDescriptorPriority[OID]) | Specifies the priority of descriptor names associated with a specific OID. |
| [XMLRDNDescriptorReverseOrder](#XMLRDNDescriptorReverseOrder) | Specifies whether to reverse the order of descriptors in RDN. |
| [XMLRDNDescriptorSeparator](#XMLRDNDescriptorSeparator) | Specifies the separator used between descriptors in RDN. |

# AuthAttempts Property ([SFTPClient](#sftpclient-component) Component)

Specifies the number of SSH authentication attempts.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) AuthAttempts() (int32, error)func (obj *SFTPClient) SetAuthAttempts(value int32) error
```

## Default Value

1

## Remarks

Use this property to specify the number of authentication attempts to try. The [AuthFailed](#authfailed-event-sftpclient-component) event is fired for every failed attempt.

## Data Type

**int32**

# AutoAdjustTransferBlock Property ([SFTPClient](#sftpclient-component) Component)

Specifies whether to adjust the send and receive buffer sizes automatically.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) AutoAdjustTransferBlock() (bool, error)func (obj *SFTPClient) SetAutoAdjustTransferBlock(value bool) error
```

## Default Value

true

## Remarks

Automatic transfer block size adjustment may be beneficial for maximizing interoperability and achieving the best transfer speeds.

Use [DownloadBlockSize](#downloadblocksize-property-sftpclient-component), [UploadBlockSize](#uploadblocksize-property-sftpclient-component), and [PipelineLength](#pipelinelength-property-sftpclient-component) properties to adjust the transfer settings manually.

## Data Type

**bool**

# ConflictResolutionMode Property ([SFTPClient](#sftpclient-component) Component)

Defines the approach that should be used to resolve various conflicts during batch processing.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) ConflictResolutionMode() (int32, error)func (obj *SFTPClient) SetConflictResolutionMode(value int32) error
```

## Possible Values

```text
0   // Overwrite1   // Skip2   // AppendToEnd3   // Resume4   // OverwriteIfDiffSize5   // SaveWithNewName6   // RenameExistingTarget
```

## Default Value

0

## Remarks

Use this property to specify the approach to use when landing in conflicting transfer situations.

|  |  |  |
| --- | --- | --- |
| cftmOverwrite | 0 |  |
| cftmSkip | 1 |  |
| cftmAppendToEnd | 2 | The signature is corrupted |
| cftmResume | 3 |  |
| cftmOverwriteIfDiffSize | 4 |  |
| cftmSaveWithNewName | 5 |  |
| cftmRenameExistingTarget | 5 |  |

## Data Type

**int32**

# Connected Property ([SFTPClient](#sftpclient-component) Component)

Indicates if the client is connected to the SFTP server.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) Connected() (bool, error)
```

## Default Value

false

## Remarks

Use this read-only property to check whether the client is connected to the server.

This property is read-only.

## Data Type

**bool**

# ConnInfoClientKeyAlgorithm Property ([SFTPClient](#sftpclient-component) Component)

Specifies the client's key algorithm.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) ConnInfoClientKeyAlgorithm() (string, error)
```

## Default Value

""

## Remarks

Specifies the client's key algorithm.

This property is read-only.

## Data Type

**string**

# ConnInfoClientKeyBits Property ([SFTPClient](#sftpclient-component) Component)

Specifies the length of the client's key.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) ConnInfoClientKeyBits() (int32, error)
```

## Default Value

0

## Remarks

Specifies the length of the client's key.

This property is read-only.

## Data Type

**int32**

# ConnInfoClientKeyFingerprint Property ([SFTPClient](#sftpclient-component) Component)

The fingerprint (hash value) of the client's public key.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) ConnInfoClientKeyFingerprint() (string, error)
```

## Default Value

""

## Remarks

The fingerprint (hash value) of the client's public key.

This property is read-only.

## Data Type

**string**

# ConnInfoCloseReason Property ([SFTPClient](#sftpclient-component) Component)

Contains the line sent by the server just before closing the connection.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) ConnInfoCloseReason() (string, error)
```

## Default Value

""

## Remarks

Contains the line sent by the server just before closing the connection. It might contain the error description if the connection was not closed gracefully.

This property is read-only.

## Data Type

**string**

# ConnInfoCompressionAlgorithmInbound Property ([SFTPClient](#sftpclient-component) Component)

Compression algorithm for the incoming traffic.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) ConnInfoCompressionAlgorithmInbound() (string, error)
```

## Default Value

""

## Remarks

Compression algorithm for the incoming traffic.

This property is read-only.

## Data Type

**string**

# ConnInfoCompressionAlgorithmOutbound Property ([SFTPClient](#sftpclient-component) Component)

Compression algorithm for the outgoing traffic.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) ConnInfoCompressionAlgorithmOutbound() (string, error)
```

## Default Value

""

## Remarks

Compression algorithm for the outgoing traffic.

This property is read-only.

## Data Type

**string**

# ConnInfoEncryptionAlgorithmInbound Property ([SFTPClient](#sftpclient-component) Component)

Encryption algorithm for the incoming traffic.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) ConnInfoEncryptionAlgorithmInbound() (string, error)
```

## Default Value

""

## Remarks

Encryption algorithm for the incoming traffic.

This property is read-only.

## Data Type

**string**

# ConnInfoEncryptionAlgorithmOutbound Property ([SFTPClient](#sftpclient-component) Component)

Encryption algorithm for the outgoing traffic.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) ConnInfoEncryptionAlgorithmOutbound() (string, error)
```

## Default Value

""

## Remarks

Encryption algorithm for the outgoing traffic.

This property is read-only.

## Data Type

**string**

# ConnInfoInboundEncryptionKeyBits Property ([SFTPClient](#sftpclient-component) Component)

Specifies the length of the key used to encrypt the incoming traffic.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) ConnInfoInboundEncryptionKeyBits() (int32, error)
```

## Default Value

0

## Remarks

Specifies the length of the key used to encrypt the incoming traffic.

This property is read-only.

## Data Type

**int32**

# ConnInfoKexAlgorithm Property ([SFTPClient](#sftpclient-component) Component)

The key exchange algorithm used during the SSH handshake.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) ConnInfoKexAlgorithm() (string, error)
```

## Default Value

""

## Remarks

The key exchange algorithm used during the SSH handshake.

This property is read-only.

## Data Type

**string**

# ConnInfoKexBits Property ([SFTPClient](#sftpclient-component) Component)

The number of bits used by the key exchange algorithm.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) ConnInfoKexBits() (int32, error)
```

## Default Value

0

## Remarks

The number of bits used by the key exchange algorithm.

This property is read-only.

## Data Type

**int32**

# ConnInfoKexLines Property ([SFTPClient](#sftpclient-component) Component)

The contents of the received KexInit packet.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) ConnInfoKexLines() (string, error)
```

## Default Value

""

## Remarks

The contents of the received KexInit packet.

KexInit packet contains the list of algorithms supported by the remote party.

This property is read-only.

## Data Type

**string**

# ConnInfoMacAlgorithmInbound Property ([SFTPClient](#sftpclient-component) Component)

MAC algorithm used for the incoming connection.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) ConnInfoMacAlgorithmInbound() (string, error)
```

## Default Value

""

## Remarks

MAC algorithm used for the incoming connection.

This property is read-only.

## Data Type

**string**

# ConnInfoMacAlgorithmOutbound Property ([SFTPClient](#sftpclient-component) Component)

MAC algorithm used for outbound connection.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) ConnInfoMacAlgorithmOutbound() (string, error)
```

## Default Value

""

## Remarks

MAC algorithm used for outbound connection.

This property is read-only.

## Data Type

**string**

# ConnInfoOutboundEncryptionKeyBits Property ([SFTPClient](#sftpclient-component) Component)

Specifies the length of the key used to encrypt the outgoing traffic.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) ConnInfoOutboundEncryptionKeyBits() (int32, error)
```

## Default Value

0

## Remarks

Specifies the length of the key used to encrypt the outgoing traffic.

This property is read-only.

## Data Type

**int32**

# ConnInfoPublicKeyAlgorithm Property ([SFTPClient](#sftpclient-component) Component)

Specifies the public key algorithm which was used during the SSH handshake.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) ConnInfoPublicKeyAlgorithm() (string, error)
```

## Default Value

""

## Remarks

Specifies the public key algorithm which was used during the SSH handshake.

This property is read-only.

## Data Type

**string**

# ConnInfoRemoteAddress Property ([SFTPClient](#sftpclient-component) Component)

The client's IP address.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) ConnInfoRemoteAddress() (string, error)
```

## Default Value

""

## Remarks

The client's IP address.

This property is read-only.

## Data Type

**string**

# ConnInfoRemotePort Property ([SFTPClient](#sftpclient-component) Component)

The remote port of the client connection.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) ConnInfoRemotePort() (int32, error)
```

## Default Value

0

## Remarks

The remote port of the client connection.

This property is read-only.

## Data Type

**int32**

# ConnInfoRemoteSoftwareName Property ([SFTPClient](#sftpclient-component) Component)

Returns the name (self-advertised) of the SSH software running on the other side.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) ConnInfoRemoteSoftwareName() (string, error)
```

## Default Value

""

## Remarks

Returns the name (self-advertised) of the SSH software running on the other side.

This property is read-only.

## Data Type

**string**

# ConnInfoServerKeyAlgorithm Property ([SFTPClient](#sftpclient-component) Component)

Specifies the server's key algorithm.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) ConnInfoServerKeyAlgorithm() (string, error)
```

## Default Value

""

## Remarks

Specifies the server's key algorithm.

This property is read-only.

## Data Type

**string**

# ConnInfoServerKeyBits Property ([SFTPClient](#sftpclient-component) Component)

Specifies the number of bits in the server's key.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) ConnInfoServerKeyBits() (int32, error)
```

## Default Value

0

## Remarks

Specifies the number of bits in the server's key.

This property is read-only.

## Data Type

**int32**

# ConnInfoServerKeyFingerprint Property ([SFTPClient](#sftpclient-component) Component)

The fingerprint (hash value) of the server's public key.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) ConnInfoServerKeyFingerprint() (string, error)
```

## Default Value

""

## Remarks

The fingerprint (hash value) of the server's public key.

This property is read-only.

## Data Type

**string**

# ConnInfoTotalBytesReceived Property ([SFTPClient](#sftpclient-component) Component)

Returns the total number of bytes received over this connection.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) ConnInfoTotalBytesReceived() (int64, error)
```

## Default Value

0

## Remarks

Returns the total number of bytes received over this connection.

This property is read-only.

## Data Type

**int64**

# ConnInfoTotalBytesSent Property ([SFTPClient](#sftpclient-component) Component)

Returns the total number of bytes sent over this connection.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) ConnInfoTotalBytesSent() (int64, error)
```

## Default Value

0

## Remarks

Returns the total number of bytes sent over this connection.

This property is read-only.

## Data Type

**int64**

# ConnInfoVersion Property ([SFTPClient](#sftpclient-component) Component)

Specifies SSH protocol version.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) ConnInfoVersion() (int32, error)
```

## Default Value

2

## Remarks

Specifies SSH protocol version.

This property is read-only.

## Data Type

**int32**

# CurrListEntryAccessTime Property ([SFTPClient](#sftpclient-component) Component)

Contains the last access time for this file, in UTC.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) CurrListEntryAccessTime() (string, error)
```

## Default Value

""

## Remarks

Contains the last access time for this file, in UTC.

This property is read-only.

## Data Type

**string**

# CurrListEntryCreationTime Property ([SFTPClient](#sftpclient-component) Component)

Contains this file's creation time, in UTC.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) CurrListEntryCreationTime() (string, error)
```

## Default Value

""

## Remarks

Contains this file's creation time, in UTC.

This property is read-only.

## Data Type

**string**

# CurrListEntryEntryFormat Property ([SFTPClient](#sftpclient-component) Component)

The file listing format: cfefUnknown 0 cfefUnix 1 cfefWindows 2 cfefMLSD 3 .

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) CurrListEntryEntryFormat() (int32, error)
```

## Possible Values

```text
0   // Unknown1   // Unix2   // Windows3   // MLSD
```

## Default Value

0

## Remarks

The file listing format:

|  |  |
| --- | --- |
| cfefUnknown | 0 |
| cfefUnix | 1 |
| cfefWindows | 2 |
| cfefMLSD | 3 |

This property is read-only.

## Data Type

**int32**

# CurrListEntryFileType Property ([SFTPClient](#sftpclient-component) Component)

The type of the entry: fetUnknown 0 fetDirectory 1 fetFile 2 fetSymlink 3 fetSpecial 4 fetCurrentDirectory 5 fetParentDirectory 6 fetSocket 7 fetCharDevice 8 fetBlockDevice 9 fetFIFO 10 .

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) CurrListEntryFileType() (int32, error)
```

## Possible Values

```text
0   // Unknown1   // Directory2   // File3   // Symlink4   // Special5   // CurrentDirectory6   // ParentDirectory7   // Socket8   // CharDevice9   // BlockDevice10   // FIFO
```

## Default Value

0

## Remarks

The type of the entry:

|  |  |
| --- | --- |
| fetUnknown | 0 |
| fetDirectory | 1 |
| fetFile | 2 |
| fetSymlink | 3 |
| fetSpecial | 4 |
| fetCurrentDirectory | 5 |
| fetParentDirectory | 6 |
| fetSocket | 7 |
| fetCharDevice | 8 |
| fetBlockDevice | 9 |
| fetFIFO | 10 |

This property is read-only.

## Data Type

**int32**

# CurrListEntryHandle Property ([SFTPClient](#sftpclient-component) Component)

Allows to get or set a 'handle', a unique identifier of the underlying property object.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) CurrListEntryHandle() (int64, error)
```

## Default Value

0

## Remarks

Allows to get or set a 'handle', a unique identifier of the underlying property object. Use this property to assign objects of the same type in a quicker manner, without copying them fieldwise.

When you pass a handle of one object to another, the source object is copied to the destination rather than assigned. It is safe to get rid of the original object after such operation.

```text
  pdfSigner.setSigningCertHandle(certMgr.getCertHandle());
```

This property is read-only.

## Data Type

**int64**

# CurrListEntryModificationTime Property ([SFTPClient](#sftpclient-component) Component)

File last modification date/time.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) CurrListEntryModificationTime() (string, error)
```

## Default Value

""

## Remarks

File last modification date/time.

This property is read-only.

## Data Type

**string**

# CurrListEntryName Property ([SFTPClient](#sftpclient-component) Component)

The file or directory name.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) CurrListEntryName() (string, error)
```

## Default Value

""

## Remarks

The file or directory name.

This property is read-only.

## Data Type

**string**

# CurrListEntryPath Property ([SFTPClient](#sftpclient-component) Component)

The full path to the file or directory.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) CurrListEntryPath() (string, error)
```

## Default Value

""

## Remarks

The full path to the file or directory.

This property is read-only.

## Data Type

**string**

# CurrListEntryPrincipal Property ([SFTPClient](#sftpclient-component) Component)

Specifies the owner of the file/directory.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) CurrListEntryPrincipal() (string, error)
```

## Default Value

""

## Remarks

Specifies the owner of the file/directory.

Note: in earlier versions this property was called Owner. It was renamed to Principal to avoid clashes with certain SDK namings.

This property is read-only.

## Data Type

**string**

# CurrListEntrySize Property ([SFTPClient](#sftpclient-component) Component)

File size in bytes.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) CurrListEntrySize() (int64, error)
```

## Default Value

0

## Remarks

File size in bytes.

This property is read-only.

## Data Type

**int64**

# CurrListEntryUnixPerms Property ([SFTPClient](#sftpclient-component) Component)

The file Unix permissions bit mask (e.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) CurrListEntryUnixPerms() (int32, error)
```

## Default Value

511

## Remarks

The file Unix permissions bit mask (e.g. rwxrwxrwx=511 (0777); rwxr--r--=484 (0744)).

This property is read-only.

## Data Type

**int32**

# CurrListEntryUnparsedName Property ([SFTPClient](#sftpclient-component) Component)

The unparsed entry as returned by the server.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) CurrListEntryUnparsedName() (string, error)
```

## Default Value

""

## Remarks

The unparsed entry as returned by the server. Sometimes this is also known as "long name".

This property is read-only.

## Data Type

**string**

# DownloadBlockSize Property ([SFTPClient](#sftpclient-component) Component)

The download block size in bytes.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) DownloadBlockSize() (int32, error)func (obj *SFTPClient) SetDownloadBlockSize(value int32) error
```

## Default Value

65536

## Remarks

Use this property to manually control the size of download blocks. Typically you will only need to adjust this property if the default transfer settings ([AutoAdjustTransferBlock](#autoadjusttransferblock-property-sftpclient-component)) don't work.

## Data Type

**int32**

# ExternalCryptoAsyncDocumentID Property ([SFTPClient](#sftpclient-component) Component)

Specifies an optional document ID for SignAsyncBegin() and SignAsyncEnd() calls.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) ExternalCryptoAsyncDocumentID() (string, error)func (obj *SFTPClient) SetExternalCryptoAsyncDocumentID(value string) error
```

## Default Value

""

## Remarks

Specifies an optional document ID for SignAsyncBegin() and SignAsyncEnd() calls.

Use this property when working with multi-signature DCAuth requests and responses to uniquely identify documents signed within a larger batch. On the completion stage, this value helps the signing component identify the correct signature in the returned batch of responses.

If using batched requests, make sure to set this property to the same value on both the pre-signing (SignAsyncBegin) and completion (SignAsyncEnd) stages.

## Data Type

**string**

# ExternalCryptoCustomParams Property ([SFTPClient](#sftpclient-component) Component)

Custom parameters to be passed to the signing service (uninterpreted).

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) ExternalCryptoCustomParams() (string, error)func (obj *SFTPClient) SetExternalCryptoCustomParams(value string) error
```

## Default Value

""

## Remarks

Custom parameters to be passed to the signing service (uninterpreted).

## Data Type

**string**

# ExternalCryptoData Property ([SFTPClient](#sftpclient-component) Component)

Additional data to be included in the async state and mirrored back by the requestor.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) ExternalCryptoData() (string, error)func (obj *SFTPClient) SetExternalCryptoData(value string) error
```

## Default Value

""

## Remarks

Additional data to be included in the async state and mirrored back by the requestor.

## Data Type

**string**

# ExternalCryptoExternalHashCalculation Property ([SFTPClient](#sftpclient-component) Component)

Specifies whether the message hash is to be calculated at the external endpoint.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) ExternalCryptoExternalHashCalculation() (bool, error)func (obj *SFTPClient) SetExternalCryptoExternalHashCalculation(value bool) error
```

## Default Value

false

## Remarks

Specifies whether the message hash is to be calculated at the external endpoint. Please note that this mode is not supported by the DCAuth struct.

If set to true, the struct will pass a few kilobytes of to-be-signed data from the document to the OnExternalSign event. This only applies when SignExternal() is called.

## Data Type

**bool**

# ExternalCryptoHashAlgorithm Property ([SFTPClient](#sftpclient-component) Component)

Specifies the request's signature hash algorithm.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) ExternalCryptoHashAlgorithm() (string, error)func (obj *SFTPClient) SetExternalCryptoHashAlgorithm(value string) error
```

## Default Value

"SHA256"

## Remarks

Specifies the request's signature hash algorithm.

|  |  |  |
| --- | --- | --- |
| SB_HASH_ALGORITHM_SHA1 | SHA1 |  |
| SB_HASH_ALGORITHM_SHA224 | SHA224 |  |
| SB_HASH_ALGORITHM_SHA256 | SHA256 |  |
| SB_HASH_ALGORITHM_SHA384 | SHA384 |  |
| SB_HASH_ALGORITHM_SHA512 | SHA512 |  |
| SB_HASH_ALGORITHM_MD2 | MD2 |  |
| SB_HASH_ALGORITHM_MD4 | MD4 |  |
| SB_HASH_ALGORITHM_MD5 | MD5 |  |
| SB_HASH_ALGORITHM_RIPEMD160 | RIPEMD160 |  |
| SB_HASH_ALGORITHM_CRC32 | CRC32 |  |
| SB_HASH_ALGORITHM_SSL3 | SSL3 |  |
| SB_HASH_ALGORITHM_GOST_R3411_1994 | GOST1994 |  |
| SB_HASH_ALGORITHM_WHIRLPOOL | WHIRLPOOL |  |
| SB_HASH_ALGORITHM_POLY1305 | POLY1305 |  |
| SB_HASH_ALGORITHM_SHA3_224 | SHA3_224 |  |
| SB_HASH_ALGORITHM_SHA3_256 | SHA3_256 |  |
| SB_HASH_ALGORITHM_SHA3_384 | SHA3_384 |  |
| SB_HASH_ALGORITHM_SHA3_512 | SHA3_512 |  |
| SB_HASH_ALGORITHM_BLAKE2S_128 | BLAKE2S_128 |  |
| SB_HASH_ALGORITHM_BLAKE2S_160 | BLAKE2S_160 |  |
| SB_HASH_ALGORITHM_BLAKE2S_224 | BLAKE2S_224 |  |
| SB_HASH_ALGORITHM_BLAKE2S_256 | BLAKE2S_256 |  |
| SB_HASH_ALGORITHM_BLAKE2B_160 | BLAKE2B_160 |  |
| SB_HASH_ALGORITHM_BLAKE2B_256 | BLAKE2B_256 |  |
| SB_HASH_ALGORITHM_BLAKE2B_384 | BLAKE2B_384 |  |
| SB_HASH_ALGORITHM_BLAKE2B_512 | BLAKE2B_512 |  |
| SB_HASH_ALGORITHM_SHAKE_128 | SHAKE_128 |  |
| SB_HASH_ALGORITHM_SHAKE_256 | SHAKE_256 |  |
| SB_HASH_ALGORITHM_SHAKE_128_LEN | SHAKE_128_LEN |  |
| SB_HASH_ALGORITHM_SHAKE_256_LEN | SHAKE_256_LEN |  |

## Data Type

**string**

# ExternalCryptoKeyID Property ([SFTPClient](#sftpclient-component) Component)

The ID of the pre-shared key used for DC request authentication.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) ExternalCryptoKeyID() (string, error)func (obj *SFTPClient) SetExternalCryptoKeyID(value string) error
```

## Default Value

""

## Remarks

The ID of the pre-shared key used for DC request authentication.

Asynchronous DCAuth-driven communication requires that parties authenticate each other with a secret pre-shared cryptographic key. This provides an extra protection layer for the protocol and diminishes the risk of the private key becoming abused by foreign parties. Use this property to provide the pre-shared key identifier, and use [ExternalCryptoKeySecret](#externalcryptokeysecret-property-sftpclient-component) to pass the key itself.

The same KeyID/KeySecret pair should be used on the DCAuth side for the signing requests to be accepted.

Note: The KeyID/KeySecret scheme is very similar to the AuthKey scheme used in various Cloud service providers to authenticate users.

Example:

```text
  signer.ExternalCrypto.KeyID = "MainSigningKey";
  signer.ExternalCrypto.KeySecret = "abcdef0123456789";
```

## Data Type

**string**

# ExternalCryptoKeySecret Property ([SFTPClient](#sftpclient-component) Component)

The pre-shared key used for DC request authentication.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) ExternalCryptoKeySecret() (string, error)func (obj *SFTPClient) SetExternalCryptoKeySecret(value string) error
```

## Default Value

""

## Remarks

The pre-shared key used for DC request authentication. This key must be set and match the key used by the DCAuth counterpart for the scheme to work.

Read more about configuring authentication in the [ExternalCryptoKeyID](#externalcryptokeyid-property-sftpclient-component) topic.

## Data Type

**string**

# ExternalCryptoMethod Property ([SFTPClient](#sftpclient-component) Component)

Specifies the asynchronous signing method.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) ExternalCryptoMethod() (int32, error)func (obj *SFTPClient) SetExternalCryptoMethod(value int32) error
```

## Possible Values

```text
0   // PKCS11   // PKCS7
```

## Default Value

0

## Remarks

Specifies the asynchronous signing method. This is typically defined by the DC server capabilities and setup.

Available options:

|  |  |
| --- | --- |
| asmdPKCS1 | 0 |
| asmdPKCS7 | 1 |

## Data Type

**int32**

# ExternalCryptoMode Property ([SFTPClient](#sftpclient-component) Component)

Specifies the external cryptography mode.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) ExternalCryptoMode() (int32, error)func (obj *SFTPClient) SetExternalCryptoMode(value int32) error
```

## Possible Values

```text
0   // Default1   // Disabled2   // Generic3   // DCAuth4   // DCAuthJSON
```

## Default Value

0

## Remarks

Specifies the external cryptography mode.

Available options:

|  |  |
| --- | --- |
| ecmDefault | The default value (0) |
| ecmDisabled | Do not use DC or external signing (1) |
| ecmGeneric | Generic external signing with the OnExternalSign event (2) |
| ecmDCAuth | DCAuth signing (3) |
| ecmDCAuthJSON | DCAuth signing in JSON format (4) |

## Data Type

**int32**

# ExternalCryptoPublicKeyAlgorithm Property ([SFTPClient](#sftpclient-component) Component)

Provide the public key algorithm here if the certificate is not available on the pre-signing stage.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) ExternalCryptoPublicKeyAlgorithm() (string, error)func (obj *SFTPClient) SetExternalCryptoPublicKeyAlgorithm(value string) error
```

## Default Value

""

## Remarks

Provide the public key algorithm here if the certificate is not available on the pre-signing stage.

|  |  |  |
| --- | --- | --- |
| SB_CERT_ALGORITHM_ID_RSA_ENCRYPTION | rsaEncryption |  |
| SB_CERT_ALGORITHM_MD2_RSA_ENCRYPTION | md2withRSAEncryption |  |
| SB_CERT_ALGORITHM_MD5_RSA_ENCRYPTION | md5withRSAEncryption |  |
| SB_CERT_ALGORITHM_SHA1_RSA_ENCRYPTION | sha1withRSAEncryption |  |
| SB_CERT_ALGORITHM_ID_DSA | id-dsa |  |
| SB_CERT_ALGORITHM_ID_DSA_SHA1 | id-dsa-with-sha1 |  |
| SB_CERT_ALGORITHM_DH_PUBLIC | dhpublicnumber |  |
| SB_CERT_ALGORITHM_SHA224_RSA_ENCRYPTION | sha224WithRSAEncryption |  |
| SB_CERT_ALGORITHM_SHA256_RSA_ENCRYPTION | sha256WithRSAEncryption |  |
| SB_CERT_ALGORITHM_SHA384_RSA_ENCRYPTION | sha384WithRSAEncryption |  |
| SB_CERT_ALGORITHM_SHA512_RSA_ENCRYPTION | sha512WithRSAEncryption |  |
| SB_CERT_ALGORITHM_ID_RSAPSS | id-RSASSA-PSS |  |
| SB_CERT_ALGORITHM_ID_RSAOAEP | id-RSAES-OAEP |  |
| SB_CERT_ALGORITHM_RSASIGNATURE_RIPEMD160 | ripemd160withRSA |  |
| SB_CERT_ALGORITHM_ID_ELGAMAL | elGamal |  |
| SB_CERT_ALGORITHM_SHA1_ECDSA | ecdsa-with-SHA1 |  |
| SB_CERT_ALGORITHM_RECOMMENDED_ECDSA | ecdsa-recommended |  |
| SB_CERT_ALGORITHM_SHA224_ECDSA | ecdsa-with-SHA224 |  |
| SB_CERT_ALGORITHM_SHA256_ECDSA | ecdsa-with-SHA256 |  |
| SB_CERT_ALGORITHM_SHA384_ECDSA | ecdsa-with-SHA384 |  |
| SB_CERT_ALGORITHM_SHA512_ECDSA | ecdsa-with-SHA512 |  |
| SB_CERT_ALGORITHM_EC | id-ecPublicKey |  |
| SB_CERT_ALGORITHM_SPECIFIED_ECDSA | ecdsa-specified |  |
| SB_CERT_ALGORITHM_GOST_R3410_1994 | id-GostR3410-94 |  |
| SB_CERT_ALGORITHM_GOST_R3410_2001 | id-GostR3410-2001 |  |
| SB_CERT_ALGORITHM_GOST_R3411_WITH_R3410_1994 | id-GostR3411-94-with-GostR3410-94 |  |
| SB_CERT_ALGORITHM_GOST_R3411_WITH_R3410_2001 | id-GostR3411-94-with-GostR3410-2001 |  |
| SB_CERT_ALGORITHM_SHA1_ECDSA_PLAIN | ecdsa-plain-SHA1 |  |
| SB_CERT_ALGORITHM_SHA224_ECDSA_PLAIN | ecdsa-plain-SHA224 |  |
| SB_CERT_ALGORITHM_SHA256_ECDSA_PLAIN | ecdsa-plain-SHA256 |  |
| SB_CERT_ALGORITHM_SHA384_ECDSA_PLAIN | ecdsa-plain-SHA384 |  |
| SB_CERT_ALGORITHM_SHA512_ECDSA_PLAIN | ecdsa-plain-SHA512 |  |
| SB_CERT_ALGORITHM_RIPEMD160_ECDSA_PLAIN | ecdsa-plain-RIPEMD160 |  |
| SB_CERT_ALGORITHM_WHIRLPOOL_RSA_ENCRYPTION | whirlpoolWithRSAEncryption |  |
| SB_CERT_ALGORITHM_ID_DSA_SHA224 | id-dsa-with-sha224 |  |
| SB_CERT_ALGORITHM_ID_DSA_SHA256 | id-dsa-with-sha256 |  |
| SB_CERT_ALGORITHM_SHA3_224_RSA_ENCRYPTION | id-rsassa-pkcs1-v1_5-with-sha3-224 |  |
| SB_CERT_ALGORITHM_SHA3_256_RSA_ENCRYPTION | id-rsassa-pkcs1-v1_5-with-sha3-256 |  |
| SB_CERT_ALGORITHM_SHA3_384_RSA_ENCRYPTION | id-rsassa-pkcs1-v1_5-with-sha3-384 |  |
| SB_CERT_ALGORITHM_SHA3_512_RSA_ENCRYPTION | id-rsassa-pkcs1-v1_5-with-sha3-512 |  |
| SB_CERT_ALGORITHM_SHA3_224_ECDSA | id-ecdsa-with-sha3-224 |  |
| SB_CERT_ALGORITHM_SHA3_256_ECDSA | id-ecdsa-with-sha3-256 |  |
| SB_CERT_ALGORITHM_SHA3_384_ECDSA | id-ecdsa-with-sha3-384 |  |
| SB_CERT_ALGORITHM_SHA3_512_ECDSA | id-ecdsa-with-sha3-512 |  |
| SB_CERT_ALGORITHM_SHA3_224_ECDSA_PLAIN | id-ecdsa-plain-with-sha3-224 |  |
| SB_CERT_ALGORITHM_SHA3_256_ECDSA_PLAIN | id-ecdsa-plain-with-sha3-256 |  |
| SB_CERT_ALGORITHM_SHA3_384_ECDSA_PLAIN | id-ecdsa-plain-with-sha3-384 |  |
| SB_CERT_ALGORITHM_SHA3_512_ECDSA_PLAIN | id-ecdsa-plain-with-sha3-512 |  |
| SB_CERT_ALGORITHM_ID_DSA_SHA3_224 | id-dsa-with-sha3-224 |  |
| SB_CERT_ALGORITHM_ID_DSA_SHA3_256 | id-dsa-with-sha3-256 |  |
| SB_CERT_ALGORITHM_BLAKE2S_128_RSA_ENCRYPTION | id-rsassa-pkcs1-v1_5-with-blake2s128 |  |
| SB_CERT_ALGORITHM_BLAKE2S_160_RSA_ENCRYPTION | id-rsassa-pkcs1-v1_5-with-blake2s160 |  |
| SB_CERT_ALGORITHM_BLAKE2S_224_RSA_ENCRYPTION | id-rsassa-pkcs1-v1_5-with-blake2s224 |  |
| SB_CERT_ALGORITHM_BLAKE2S_256_RSA_ENCRYPTION | id-rsassa-pkcs1-v1_5-with-blake2s256 |  |
| SB_CERT_ALGORITHM_BLAKE2B_160_RSA_ENCRYPTION | id-rsassa-pkcs1-v1_5-with-blake2b160 |  |
| SB_CERT_ALGORITHM_BLAKE2B_256_RSA_ENCRYPTION | id-rsassa-pkcs1-v1_5-with-blake2b256 |  |
| SB_CERT_ALGORITHM_BLAKE2B_384_RSA_ENCRYPTION | id-rsassa-pkcs1-v1_5-with-blake2b384 |  |
| SB_CERT_ALGORITHM_BLAKE2B_512_RSA_ENCRYPTION | id-rsassa-pkcs1-v1_5-with-blake2b512 |  |
| SB_CERT_ALGORITHM_BLAKE2S_128_ECDSA | id-ecdsa-with-blake2s128 |  |
| SB_CERT_ALGORITHM_BLAKE2S_160_ECDSA | id-ecdsa-with-blake2s160 |  |
| SB_CERT_ALGORITHM_BLAKE2S_224_ECDSA | id-ecdsa-with-blake2s224 |  |
| SB_CERT_ALGORITHM_BLAKE2S_256_ECDSA | id-ecdsa-with-blake2s256 |  |
| SB_CERT_ALGORITHM_BLAKE2B_160_ECDSA | id-ecdsa-with-blake2b160 |  |
| SB_CERT_ALGORITHM_BLAKE2B_256_ECDSA | id-ecdsa-with-blake2b256 |  |
| SB_CERT_ALGORITHM_BLAKE2B_384_ECDSA | id-ecdsa-with-blake2b384 |  |
| SB_CERT_ALGORITHM_BLAKE2B_512_ECDSA | id-ecdsa-with-blake2b512 |  |
| SB_CERT_ALGORITHM_BLAKE2S_128_ECDSA_PLAIN | id-ecdsa-plain-with-blake2s128 |  |
| SB_CERT_ALGORITHM_BLAKE2S_160_ECDSA_PLAIN | id-ecdsa-plain-with-blake2s160 |  |
| SB_CERT_ALGORITHM_BLAKE2S_224_ECDSA_PLAIN | id-ecdsa-plain-with-blake2s224 |  |
| SB_CERT_ALGORITHM_BLAKE2S_256_ECDSA_PLAIN | id-ecdsa-plain-with-blake2s256 |  |
| SB_CERT_ALGORITHM_BLAKE2B_160_ECDSA_PLAIN | id-ecdsa-plain-with-blake2b160 |  |
| SB_CERT_ALGORITHM_BLAKE2B_256_ECDSA_PLAIN | id-ecdsa-plain-with-blake2b256 |  |
| SB_CERT_ALGORITHM_BLAKE2B_384_ECDSA_PLAIN | id-ecdsa-plain-with-blake2b384 |  |
| SB_CERT_ALGORITHM_BLAKE2B_512_ECDSA_PLAIN | id-ecdsa-plain-with-blake2b512 |  |
| SB_CERT_ALGORITHM_ID_DSA_BLAKE2S_224 | id-dsa-with-blake2s224 |  |
| SB_CERT_ALGORITHM_ID_DSA_BLAKE2S_256 | id-dsa-with-blake2s256 |  |
| SB_CERT_ALGORITHM_EDDSA_ED25519 | id-Ed25519 |  |
| SB_CERT_ALGORITHM_EDDSA_ED448 | id-Ed448 |  |
| SB_CERT_ALGORITHM_EDDSA_ED25519_PH | id-Ed25519ph |  |
| SB_CERT_ALGORITHM_EDDSA_ED448_PH | id-Ed448ph |  |
| SB_CERT_ALGORITHM_EDDSA | id-EdDSA |  |
| SB_CERT_ALGORITHM_EDDSA_SIGNATURE | id-EdDSA-sig |  |
| SB_CERT_ALGORITHM_MLDSA_44 | id-ml-dsa-44 |  |
| SB_CERT_ALGORITHM_MLDSA_65 | id-ml-dsa-65 |  |
| SB_CERT_ALGORITHM_MLDSA_87 | id-ml-dsa-87 |  |
| SB_CERT_ALGORITHM_HASH_MLDSA_44_SHA512 | id-hash-ml-dsa-44-with-sha512 |  |
| SB_CERT_ALGORITHM_HASH_MLDSA_65_SHA512 | id-hash-ml-dsa-65-with-sha512 |  |
| SB_CERT_ALGORITHM_HASH_MLDSA_87_SHA512 | id-hash-ml-dsa-87-with-sha512 |  |
| SB_CERT_ALGORITHM_MLKEM_512 | id-ml-kem-512 |  |
| SB_CERT_ALGORITHM_MLKEM_768 | id-ml-kem-768 |  |
| SB_CERT_ALGORITHM_MLKEM_1024 | id-ml-kem-1024 |  |

## Data Type

**string**

# FIPSMode Property ([SFTPClient](#sftpclient-component) Component)

Reserved.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) FIPSMode() (bool, error)func (obj *SFTPClient) SetFIPSMode(value bool) error
```

## Default Value

false

## Remarks

This property is reserved for future use.

## Data Type

**bool**

# ForceCompression Property ([SFTPClient](#sftpclient-component) Component)

Enforces compression for the SSH layer.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) ForceCompression() (bool, error)func (obj *SFTPClient) SetForceCompression(value bool) error
```

## Default Value

false

## Remarks

Set this property before opening a connection to enforce compression of the SSH packets.

## Data Type

**bool**

# KeyFingerprintSHA1 Property ([SFTPClient](#sftpclient-component) Component)

Contains the SHA-1 fingerprint (hash) of the key.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) KeyFingerprintSHA1() (string, error)
```

## Default Value

""

## Remarks

Contains the SHA-1 fingerprint (hash) of the key.

This property is read-only.

## Data Type

**string**

# KeyFingerprintSHA256 Property ([SFTPClient](#sftpclient-component) Component)

Contains the SHA-256 fingerprint (hash) of the key.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) KeyFingerprintSHA256() (string, error)
```

## Default Value

""

## Remarks

Contains the SHA-256 fingerprint (hash) of the key.

This property is read-only.

## Data Type

**string**

# KeyHandle Property ([SFTPClient](#sftpclient-component) Component)

Allows to get or set a 'handle', a unique identifier of the underlying property object.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) KeyHandle() (int64, error)func (obj *SFTPClient) SetKeyHandle(value int64) error
```

## Default Value

0

## Remarks

Allows to get or set a 'handle', a unique identifier of the underlying property object. Use this property to assign objects of the same type in a quicker manner, without copying them fieldwise.

When you pass a handle of one object to another, the source object is copied to the destination rather than assigned. It is safe to get rid of the original object after such operation.

```text
  pdfSigner.setSigningCertHandle(certMgr.getCertHandle());
```

## Data Type

**int64**

# MaxSFTPVersion Property ([SFTPClient](#sftpclient-component) Component)

Higher SFTP version to support.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) MaxSFTPVersion() (int32, error)func (obj *SFTPClient) SetMaxSFTPVersion(value int32) error
```

## Default Value

6

## Remarks

MaxSFTPVersion and [MinSFTPVersion](#minsftpversion-property-sftpclient-component) properties control the range of SFTP protocol versions supported by this client.

## Data Type

**int32**

# MinSFTPVersion Property ([SFTPClient](#sftpclient-component) Component)

Lower SFTP version to support.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) MinSFTPVersion() (int32, error)func (obj *SFTPClient) SetMinSFTPVersion(value int32) error
```

## Default Value

0

## Remarks

[MaxSFTPVersion](#maxsftpversion-property-sftpclient-component) and MinSFTPVersion properties control the range of SFTP protocol versions to be supported by this client.

## Data Type

**int32**

# Password Property ([SFTPClient](#sftpclient-component) Component)

Specifies user's authentication password.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) Password() (string, error)func (obj *SFTPClient) SetPassword(value string) error
```

## Default Value

""

## Remarks

Use this property to provide an authentication password. This property is only applicable for password-based and keyboard-interactive authentication types.

## Data Type

**string**

# PipelineLength Property ([SFTPClient](#sftpclient-component) Component)

The number of parallelized transfer requests.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) PipelineLength() (int32, error)func (obj *SFTPClient) SetPipelineLength(value int32) error
```

## Default Value

32

## Remarks

This property controls the number of upload/download requests sent simultaneously. This speeds the transfer up, but may lead to issues with older/immature servers.

Typically you will only need to adjust this property if the default transfer settings ([AutoAdjustTransferBlock](#autoadjusttransferblock-property-sftpclient-component)) don't work.

## Data Type

**int32**

# ProxyAddress Property ([SFTPClient](#sftpclient-component) Component)

The IP address of the proxy server.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) ProxyAddress() (string, error)func (obj *SFTPClient) SetProxyAddress(value string) error
```

## Default Value

""

## Remarks

The IP address of the proxy server.

## Data Type

**string**

# ProxyAuthentication Property ([SFTPClient](#sftpclient-component) Component)

The authentication type used by the proxy server.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) ProxyAuthentication() (int32, error)func (obj *SFTPClient) SetProxyAuthentication(value int32) error
```

## Possible Values

```text
0   // NoAuthentication1   // Basic2   // Digest3   // NTLM
```

## Default Value

0

## Remarks

The authentication type used by the proxy server.

|  |  |
| --- | --- |
| patNoAuthentication | 0 |
| patBasic | 1 |
| patDigest | 2 |
| patNTLM | 3 |

## Data Type

**int32**

# ProxyPassword Property ([SFTPClient](#sftpclient-component) Component)

The password to authenticate to the proxy server.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) ProxyPassword() (string, error)func (obj *SFTPClient) SetProxyPassword(value string) error
```

## Default Value

""

## Remarks

The password to authenticate to the proxy server.

## Data Type

**string**

# ProxyPort Property ([SFTPClient](#sftpclient-component) Component)

The port on the proxy server to connect to.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) ProxyPort() (int32, error)func (obj *SFTPClient) SetProxyPort(value int32) error
```

## Default Value

0

## Remarks

The port on the proxy server to connect to.

## Data Type

**int32**

# ProxyType Property ([SFTPClient](#sftpclient-component) Component)

The type of the proxy server.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) ProxyType() (int32, error)func (obj *SFTPClient) SetProxyType(value int32) error
```

## Possible Values

```text
0   // None1   // Socks42   // Socks53   // WebTunnel4   // HTTP
```

## Default Value

0

## Remarks

The type of the proxy server.

|  |  |
| --- | --- |
| cptNone | 0 |
| cptSocks4 | 1 |
| cptSocks5 | 2 |
| cptWebTunnel | 3 |
| cptHTTP | 4 |

## Data Type

**int32**

# ProxyRequestHeaders Property ([SFTPClient](#sftpclient-component) Component)

Contains HTTP request headers for WebTunnel and HTTP proxy.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) ProxyRequestHeaders() (string, error)func (obj *SFTPClient) SetProxyRequestHeaders(value string) error
```

## Default Value

""

## Remarks

Contains HTTP request headers for WebTunnel and HTTP proxy.

## Data Type

**string**

# ProxyResponseBody Property ([SFTPClient](#sftpclient-component) Component)

Contains the HTTP or HTTPS (WebTunnel) proxy response body.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) ProxyResponseBody() (string, error)func (obj *SFTPClient) SetProxyResponseBody(value string) error
```

## Default Value

""

## Remarks

Contains the HTTP or HTTPS (WebTunnel) proxy response body.

## Data Type

**string**

# ProxyResponseHeaders Property ([SFTPClient](#sftpclient-component) Component)

Contains response headers received from an HTTP or HTTPS (WebTunnel) proxy server.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) ProxyResponseHeaders() (string, error)func (obj *SFTPClient) SetProxyResponseHeaders(value string) error
```

## Default Value

""

## Remarks

Contains response headers received from an HTTP or HTTPS (WebTunnel) proxy server.

## Data Type

**string**

# ProxyUseIPv6 Property ([SFTPClient](#sftpclient-component) Component)

Specifies whether IPv6 should be used when connecting through the proxy.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) ProxyUseIPv6() (bool, error)func (obj *SFTPClient) SetProxyUseIPv6(value bool) error
```

## Default Value

false

## Remarks

Specifies whether IPv6 should be used when connecting through the proxy.

## Data Type

**bool**

# ProxyUsername Property ([SFTPClient](#sftpclient-component) Component)

Specifies the username credential for proxy authentication.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) ProxyUsername() (string, error)func (obj *SFTPClient) SetProxyUsername(value string) error
```

## Default Value

""

## Remarks

Specifies the username credential for proxy authentication.

## Data Type

**string**

# ServerKeyAlgorithm Property ([SFTPClient](#sftpclient-component) Component)

Specifies the key algorithm.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) ServerKeyAlgorithm() (string, error)
```

## Default Value

""

## Remarks

Specifies the key algorithm.

The following key algorithms are currently supported and can be returned by this property:

- RSA
- DSS
- ECDSA
- EDDSA
- MLDSA
- ECDSA-SK
- EDDSA-SK

This property is read-only.

## Data Type

**string**

# ServerKeyBits Property ([SFTPClient](#sftpclient-component) Component)

The number of bits in the key: the more the better, 2048 or 4096 are typical values.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) ServerKeyBits() (int32, error)
```

## Default Value

0

## Remarks

The number of bits in the key: the more the better, 2048 or 4096 are typical values.

This property is read-only.

## Data Type

**int32**

# ServerKeyComment Property ([SFTPClient](#sftpclient-component) Component)

The comment for the public key.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) ServerKeyComment() (string, error)
```

## Default Value

""

## Remarks

The comment for the public key.

This property is read-only.

## Data Type

**string**

# ServerKeyCurve Property ([SFTPClient](#sftpclient-component) Component)

Specifies the elliptical curve when EC cryptography is used.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) ServerKeyCurve() (string, error)
```

## Default Value

""

## Remarks

Specifies the elliptical curve when EC cryptography is used.

The following curves are currently supported:

- NISTP256
- NISTP384
- NISTP521
- NISTK163
- NISTP192
- NISTP224
- NISTK233
- NISTB233
- NISTK283
- NISTK409
- NISTB409
- NISTK571
- CURVE25519 (EdDSA curve)
- CURVE448 (EdDSA curve)

This property is read-only.

## Data Type

**string**

# ServerKeyExtractable Property ([SFTPClient](#sftpclient-component) Component)

Whether the key is extractable (e.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) ServerKeyExtractable() (bool, error)
```

## Default Value

false

## Remarks

Whether the key is extractable (e.g., from a security token), or not.

This property is read-only.

## Data Type

**bool**

# ServerKeyFingerprintMD5 Property ([SFTPClient](#sftpclient-component) Component)

Contains the MD5 fingerprint (hash) of the key.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) ServerKeyFingerprintMD5() (string, error)
```

## Default Value

""

## Remarks

Contains the MD5 fingerprint (hash) of the key.

This property is read-only.

## Data Type

**string**

# ServerKeyFingerprintSHA1 Property ([SFTPClient](#sftpclient-component) Component)

Contains the SHA-1 fingerprint (hash) of the key.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) ServerKeyFingerprintSHA1() (string, error)
```

## Default Value

""

## Remarks

Contains the SHA-1 fingerprint (hash) of the key.

This property is read-only.

## Data Type

**string**

# ServerKeyFingerprintSHA256 Property ([SFTPClient](#sftpclient-component) Component)

Contains the SHA-256 fingerprint (hash) of the key.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) ServerKeyFingerprintSHA256() (string, error)
```

## Default Value

""

## Remarks

Contains the SHA-256 fingerprint (hash) of the key.

This property is read-only.

## Data Type

**string**

# ServerKeyHandle Property ([SFTPClient](#sftpclient-component) Component)

Allows to get or set a 'handle', a unique identifier of the underlying property object.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) ServerKeyHandle() (int64, error)
```

## Default Value

0

## Remarks

Allows to get or set a 'handle', a unique identifier of the underlying property object. Use this property to assign objects of the same type in a quicker manner, without copying them fieldwise.

When you pass a handle of one object to another, the source object is copied to the destination rather than assigned. It is safe to get rid of the original object after such operation.

```text
  pdfSigner.setSigningCertHandle(certMgr.getCertHandle());
```

This property is read-only.

## Data Type

**int64**

# ServerKeyKeyFormat Property ([SFTPClient](#sftpclient-component) Component)

Specifies the format in which the key is stored.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) ServerKeyKeyFormat() (int32, error)
```

## Possible Values

```text
0   // OpenSSH1   // OpenSSH22   // IETF3   // PuTTY4   // X5095   // Binary6   // SSH17   // PGP8   // PKCS89   // PuTTY310   // OpenSSHCert
```

## Default Value

0

## Remarks

Specifies the format in which the key is stored.

|  |  |  |
| --- | --- | --- |
| ckfOpenSSH | 0 |  |
| ckfOpenSSH2 | 1 |  |
| ckfIETF | 2 |  |
| ckfPuTTY | 3 |  |
| ckfX509 | 4 |  |
| ckfBinary | 5 |  |
| ckfSSH1 | 6 |  |
| ckfPGP | 7 |  |
| ckfPKCS8 | 8 |  |
| ckfPuTTY3 | 9 |  |
| ckfOpenSSHCert | 10 |  |

This property is read-only.

## Data Type

**int32**

# ServerKeyKeyProtectionAlgorithm Property ([SFTPClient](#sftpclient-component) Component)

Specifies the key protection algorithm.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) ServerKeyKeyProtectionAlgorithm() (string, error)
```

## Default Value

""

## Remarks

Specifies the key protection algorithm.

This property is read-only.

## Data Type

**string**

# ServerKeyPrivate Property ([SFTPClient](#sftpclient-component) Component)

Whether this key is a private key or not.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) ServerKeyPrivate() (bool, error)
```

## Default Value

false

## Remarks

Whether this key is a private key or not.

This property is read-only.

## Data Type

**bool**

# ServerKeyPublic Property ([SFTPClient](#sftpclient-component) Component)

Whether this key is a public key or not.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) ServerKeyPublic() (bool, error)
```

## Default Value

false

## Remarks

Whether this key is a public key or not.

This property is read-only.

## Data Type

**bool**

# ServerKeySubject Property ([SFTPClient](#sftpclient-component) Component)

Specifies the public key owner (subject).

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) ServerKeySubject() (string, error)
```

## Default Value

""

## Remarks

Specifies the public key owner (subject). This property is used only for IETF-keys.

This property is read-only.

## Data Type

**string**

# SocketDNSMode Property ([SFTPClient](#sftpclient-component) Component)

Selects the DNS resolver to use: the class's (secure) built-in one, or the one provided by the system.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) SocketDNSMode() (int32, error)func (obj *SFTPClient) SetSocketDNSMode(value int32) error
```

## Possible Values

```text
0   // Auto1   // Platform2   // Own3   // OwnSecure
```

## Default Value

0

## Remarks

Selects the DNS resolver to use: the component's (secure) built-in one, or the one provided by the system.

|  |  |
| --- | --- |
| dmAuto | 0 |
| dmPlatform | 1 |
| dmOwn | 2 |
| dmOwnSecure | 3 |

## Data Type

**int32**

# SocketDNSPort Property ([SFTPClient](#sftpclient-component) Component)

Specifies the port number to be used for sending queries to the DNS server.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) SocketDNSPort() (int32, error)func (obj *SFTPClient) SetSocketDNSPort(value int32) error
```

## Default Value

0

## Remarks

Specifies the port number to be used for sending queries to the DNS server.

## Data Type

**int32**

# SocketDNSQueryTimeout Property ([SFTPClient](#sftpclient-component) Component)

The timeout (in milliseconds) for each DNS query.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) SocketDNSQueryTimeout() (int32, error)func (obj *SFTPClient) SetSocketDNSQueryTimeout(value int32) error
```

## Default Value

0

## Remarks

The timeout (in milliseconds) for each DNS query. The value of 0 indicates an infinite timeout.

## Data Type

**int32**

# SocketDNSServers Property ([SFTPClient](#sftpclient-component) Component)

The addresses of DNS servers to use for address resolution, separated by commas or semicolons.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) SocketDNSServers() (string, error)func (obj *SFTPClient) SetSocketDNSServers(value string) error
```

## Default Value

""

## Remarks

The addresses of DNS servers to use for address resolution, separated by commas or semicolons.

## Data Type

**string**

# SocketDNSTotalTimeout Property ([SFTPClient](#sftpclient-component) Component)

The timeout (in milliseconds) for the whole resolution process.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) SocketDNSTotalTimeout() (int32, error)func (obj *SFTPClient) SetSocketDNSTotalTimeout(value int32) error
```

## Default Value

0

## Remarks

The timeout (in milliseconds) for the whole resolution process. The value of 0 indicates an infinite timeout.

## Data Type

**int32**

# SocketIncomingSpeedLimit Property ([SFTPClient](#sftpclient-component) Component)

The maximum number of bytes to read from the socket, per second.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) SocketIncomingSpeedLimit() (int32, error)func (obj *SFTPClient) SetSocketIncomingSpeedLimit(value int32) error
```

## Default Value

0

## Remarks

The maximum number of bytes to read from the socket, per second.

## Data Type

**int32**

# SocketLocalAddress Property ([SFTPClient](#sftpclient-component) Component)

The local network interface to bind the socket to.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) SocketLocalAddress() (string, error)func (obj *SFTPClient) SetSocketLocalAddress(value string) error
```

## Default Value

""

## Remarks

The local network interface to bind the socket to.

## Data Type

**string**

# SocketLocalPort Property ([SFTPClient](#sftpclient-component) Component)

The local port number to bind the socket to.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) SocketLocalPort() (int32, error)func (obj *SFTPClient) SetSocketLocalPort(value int32) error
```

## Default Value

0

## Remarks

The local port number to bind the socket to.

## Data Type

**int32**

# SocketOutgoingSpeedLimit Property ([SFTPClient](#sftpclient-component) Component)

The maximum number of bytes to write to the socket, per second.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) SocketOutgoingSpeedLimit() (int32, error)func (obj *SFTPClient) SetSocketOutgoingSpeedLimit(value int32) error
```

## Default Value

0

## Remarks

The maximum number of bytes to write to the socket, per second.

## Data Type

**int32**

# SocketTimeout Property ([SFTPClient](#sftpclient-component) Component)

The maximum period of waiting, in milliseconds, after which the socket operation is considered unsuccessful.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) SocketTimeout() (int32, error)func (obj *SFTPClient) SetSocketTimeout(value int32) error
```

## Default Value

60000

## Remarks

The maximum period of waiting, in milliseconds, after which the socket operation is considered unsuccessful.

If *Timeout* is set to 0, a socket operation will expire after the system-default timeout (2 hrs 8 min for TCP stack).

## Data Type

**int32**

# SocketUseIPv6 Property ([SFTPClient](#sftpclient-component) Component)

Enables or disables IP protocol version 6.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) SocketUseIPv6() (bool, error)func (obj *SFTPClient) SetSocketUseIPv6(value bool) error
```

## Default Value

false

## Remarks

Enables or disables IP protocol version 6.

## Data Type

**bool**

# SSHSettingsAutoAdjustCiphers Property ([SFTPClient](#sftpclient-component) Component)

Whether the SSH client should adjust its list of supported ciphers 'on-the-fly' for greater compatibility with the server it is connecting to.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) SSHSettingsAutoAdjustCiphers() (bool, error)func (obj *SFTPClient) SetSSHSettingsAutoAdjustCiphers(value bool) error
```

## Default Value

true

## Remarks

Whether the SSH client should adjust its list of supported ciphers 'on-the-fly' for greater compatibility with the server it is connecting to.

## Data Type

**bool**

# SSHSettingsBaseConfiguration Property ([SFTPClient](#sftpclient-component) Component)

Allows to choose base configuration of SSH settings, tuned up for different purposes such as high security or higher compatibility.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) SSHSettingsBaseConfiguration() (int32, error)func (obj *SFTPClient) SetSSHSettingsBaseConfiguration(value int32) error
```

## Possible Values

```text
0   // Default1   // Compatible2   // ComprehensiveInsecure3   // HighlySecure
```

## Default Value

0

## Remarks

Allows to choose base configuration of SSH settings, tuned up for different purposes such as high security or higher compatibility.

## Data Type

**int32**

# SSHSettingsCompressionAlgorithms Property ([SFTPClient](#sftpclient-component) Component)

A list of session compression algorithms separated with commas or semicolons.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) SSHSettingsCompressionAlgorithms() (string, error)func (obj *SFTPClient) SetSSHSettingsCompressionAlgorithms(value string) error
```

## Default Value

""

## Remarks

A list of session compression algorithms separated with commas or semicolons. Each algorithm in the list may be prefixed with a minus sign (-) to indicate that the algorithm should be disabled rather than enabled. Besides the specific algorithm names, this property supports the *all* (and *-all*) aliases that allow to blanketly enable or disable all compression algorithms at once.

Note: the list of algorithms provided to this property alters the baseline list of compression algorithms pre-configured for this component. Remember to start your algorithm string with -all; if you need to only enable a specific fixed set of algorithms. The list of supported compression algorithms is provided below:

- none
- zlib
- zlib@openssh.com

## Data Type

**string**

# SSHSettingsCompressionLevel Property ([SFTPClient](#sftpclient-component) Component)

Possible values for the Compression Level range from 0 (minimum compression) to 9 (maximum compression).

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) SSHSettingsCompressionLevel() (int32, error)func (obj *SFTPClient) SetSSHSettingsCompressionLevel(value int32) error
```

## Default Value

6

## Remarks

Possible values for the Compression Level range from 0 (minimum compression) to 9 (maximum compression). This setting is ignored if compression wasn't accepted.

## Data Type

**int32**

# SSHSettingsDefaultWindowSize Property ([SFTPClient](#sftpclient-component) Component)

The SSH window size specifies how many bytes the client can send to the server in the command channel without obtaining pre-authorization for the further send from the server.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) SSHSettingsDefaultWindowSize() (int32, error)func (obj *SFTPClient) SetSSHSettingsDefaultWindowSize(value int32) error
```

## Default Value

2048000

## Remarks

The SSH window size specifies how many bytes the client can send to the server in the command channel without obtaining pre-authorization for the further send from the server.

## Data Type

**int32**

# SSHSettingsEncryptionAlgorithms Property ([SFTPClient](#sftpclient-component) Component)

A list of session encryption algorithms separated with commas or semicolons.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) SSHSettingsEncryptionAlgorithms() (string, error)func (obj *SFTPClient) SetSSHSettingsEncryptionAlgorithms(value string) error
```

## Default Value

""

## Remarks

A list of session encryption algorithms separated with commas or semicolons. Each algorithm in the list may be prefixed with a minus sign (-) to indicate that the algorithm should be disabled rather than enabled. Besides the specific algorithm names, this property supports the *all* (and *-all*) aliases that allow to blanketly enable or disable all encryption algorithms at once.

Note: the list of algorithms provided to this property alters the baseline list of encryption algorithms pre-configured for this component. Remember to start your algorithm string with -all; if you need to only enable a specific fixed set of algorithms. The list of supported encryption algorithms is provided below:

- 3des-cbc
- blowfish-cbc
- twofish256-cbc
- twofish192-cbc
- twofish128-cbc
- aes256-cbc
- aes192-cbc
- aes128-cbc
- serpent256-cbc
- serpent192-cbc
- serpent128-cbc
- arcfour
- idea-cbc
- cast128-cbc
- none
- des-cbc
- aes128-ctr
- aes192-ctr
- aes256-ctr
- 3des-ctr
- blowfish-ctr
- twofish128-ctr
- twofish192-ctr
- twofish256-ctr
- serpent128-ctr
- serpent192-ctr
- serpent256-ctr
- idea-ctr
- cast128-ctr
- arcfour128
- arcfour256
- aes128-gcm
- aes256-gcm
- aes128-gcm@openssh.com
- aes256-gcm@openssh.com
- chacha20-poly1305
- chacha20-poly1305@openssh.com

## Data Type

**string**

# SSHSettingsForceCompression Property ([SFTPClient](#sftpclient-component) Component)

Whether the SSH client should explicitly request compression.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) SSHSettingsForceCompression() (bool, error)func (obj *SFTPClient) SetSSHSettingsForceCompression(value bool) error
```

## Default Value

false

## Remarks

Whether the SSH client should explicitly request compression.

If *ForceCompression* is False, compression will be used only if the server doesn't support algorithms without compression.

## Data Type

**bool**

# SSHSettingsForwardAuthAgent Property ([SFTPClient](#sftpclient-component) Component)

Enables or disables auth agent forwarding.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) SSHSettingsForwardAuthAgent() (bool, error)func (obj *SFTPClient) SetSSHSettingsForwardAuthAgent(value bool) error
```

## Default Value

false

## Remarks

Enables or disables auth agent forwarding. This allows the struct to connect to the second and subsequent servers in the chain with the key agent available on the client computer.

## Data Type

**bool**

# SSHSettingsGSSAuthTypes Property ([SFTPClient](#sftpclient-component) Component)

A comma-separated list of authentication types.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) SSHSettingsGSSAuthTypes() (string, error)func (obj *SFTPClient) SetSSHSettingsGSSAuthTypes(value string) error
```

## Default Value

""

## Remarks

A comma-separated list of authentication types. Two types are currently supported: gssapi-with-mic and gssapi-keyex.

## Data Type

**string**

# SSHSettingsGSSDelegateCreds Property ([SFTPClient](#sftpclient-component) Component)

Switches credential delegation on or off.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) SSHSettingsGSSDelegateCreds() (bool, error)func (obj *SFTPClient) SetSSHSettingsGSSDelegateCreds(value bool) error
```

## Default Value

false

## Remarks

Switches credential delegation on or off.

## Data Type

**bool**

# SSHSettingsGSSHostname Property ([SFTPClient](#sftpclient-component) Component)

The GSS host name, in form of a FQDN (e.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) SSHSettingsGSSHostname() (string, error)func (obj *SFTPClient) SetSSHSettingsGSSHostname(value string) error
```

## Default Value

""

## Remarks

The GSS host name, in form of a FQDN (e.g. hostname.com), a principal name (e.g. 'host@hostname.com), or a cross-real ticket-granting ticket (e.g. krbtgt/test.com@example.com).

## Data Type

**string**

# SSHSettingsGSSLib Property ([SFTPClient](#sftpclient-component) Component)

A path to the GSS-API library (DLL or SO).

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) SSHSettingsGSSLib() (string, error)func (obj *SFTPClient) SetSSHSettingsGSSLib(value string) error
```

## Default Value

""

## Remarks

A path to the GSS-API library (DLL or SO).

## Data Type

**string**

# SSHSettingsGSSMechanisms Property ([SFTPClient](#sftpclient-component) Component)

A comma-separated list of GSS mechanisms to use.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) SSHSettingsGSSMechanisms() (string, error)func (obj *SFTPClient) SetSSHSettingsGSSMechanisms(value string) error
```

## Default Value

""

## Remarks

A comma-separated list of GSS mechanisms to use. Two values are currently supported: lib and SSPI.

## Data Type

**string**

# SSHSettingsGSSProtocols Property ([SFTPClient](#sftpclient-component) Component)

A comma-separated list of SSPI protocols.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) SSHSettingsGSSProtocols() (string, error)func (obj *SFTPClient) SetSSHSettingsGSSProtocols(value string) error
```

## Default Value

""

## Remarks

A comma-separated list of SSPI protocols. Two protocols are currently supported: kerberos and NTLM.

## Data Type

**string**

# SSHSettingsHandshakeTimeout Property ([SFTPClient](#sftpclient-component) Component)

Specifies the maximal time for the SSH handshake to proceed, in seconds.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) SSHSettingsHandshakeTimeout() (int32, error)func (obj *SFTPClient) SetSSHSettingsHandshakeTimeout(value int32) error
```

## Default Value

45

## Remarks

Specifies the maximal time for the SSH handshake to proceed, in seconds. If the handshake is not completed within this period, the session is aborted.

## Data Type

**int32**

# SSHSettingsKexAlgorithms Property ([SFTPClient](#sftpclient-component) Component)

A list of key exchange algorithms separated with commas or semicolons.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) SSHSettingsKexAlgorithms() (string, error)func (obj *SFTPClient) SetSSHSettingsKexAlgorithms(value string) error
```

## Default Value

""

## Remarks

A list of key exchange algorithms separated with commas or semicolons. Each algorithm in the list may be prefixed with a minus sign (-) to indicate that the algorithm should be disabled rather than enabled. Besides the specific algorithm names, this property supports the *all* (and *-all*) aliases that allow to blanketly enable or disable all key exchange algorithms at once.

Note: the list of algorithms provided to this property alters the baseline list of key exchange algorithms pre-configured for this component. Remember to start your algorithm string with -all; if you need to only enable a specific fixed set of algorithms. The list of supported kex algorithms is provided below:

- diffie-hellman-group-exchange-sha1
- diffie-hellman-group1-sha1
- diffie-hellman-group14-sha1
- diffie-hellman-group-exchange-sha256
- rsa1024-sha1
- rsa2048-sha256
- ecdh-sha2-nistp256
- ecdh-sha2-nistp384
- ecdh-sha2-nistp521
- ecdh-sha2-nistk163
- ecdh-sha2-nistp192
- ecdh-sha2-nistp224
- ecdh-sha2-nistk233
- ecdh-sha2-nistb233
- ecdh-sha2-nistk283
- ecdh-sha2-nistk409
- ecdh-sha2-nistb409
- ecdh-sha2-nistt571
- ecdh-sha2-curve25519
- curve25519-sha256@libssh.org
- curve448-sha512@libssh.org
- diffie-hellman-group14-sha256
- diffie-hellman-group15-sha512
- diffie-hellman-group16-sha512
- diffie-hellman-group17-sha512
- diffie-hellman-group18-sha512

## Data Type

**string**

# SSHSettingsMacAlgorithms Property ([SFTPClient](#sftpclient-component) Component)

A list of MAC (for message authentication code ) algorithms separated with commas or semicolons.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) SSHSettingsMacAlgorithms() (string, error)func (obj *SFTPClient) SetSSHSettingsMacAlgorithms(value string) error
```

## Default Value

""

## Remarks

A list of MAC (for *message authentication code*) algorithms separated with commas or semicolons. Each algorithm in the list may be prefixed with a minus sign (-) to indicate that the algorithm should be disabled rather than enabled. Besides the specific algorithm names, this property supports the *all* (and *-all*) aliases that allow to blanketly enable or disable all MAC algorithms at once.

Note: the list of algorithms provided to this property alters the baseline list of MAC algorithms pre-configured for this component. Remember to start your algorithm string with -all; if you need to only enable a specific fixed set of algorithms. The list of supported MAC algorithms is provided below:

- hmac-sha1
- hmac-sha1-96
- hmac-md5
- hmac-md5-96
- none
- hmac-ripemd160
- hmac-ripemd
- hmac-ripemd160@openssh.com
- hmac-sha256@ssh.com
- hmac-sha256-96@ssh.com
- umac-32@openssh.com
- umac-64@openssh.com
- umac-96@openssh.com
- umac-128@openssh.com
- hmac-sha2-256
- hmac-sha2-512
- aes128-gcm
- aes256-gcm
- chacha20-poly1305@openssh.com
- hmac-sha2-256-etm@openssh.com
- hmac-sha2-512-etm@openssh.com

## Data Type

**string**

# SSHSettingsMaxSSHPacketSize Property ([SFTPClient](#sftpclient-component) Component)

Specifies the maximum length of one SSH packet in bytes.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) SSHSettingsMaxSSHPacketSize() (int32, error)func (obj *SFTPClient) SetSSHSettingsMaxSSHPacketSize(value int32) error
```

## Default Value

262144

## Remarks

Specifies the maximum length of one SSH packet in bytes.

## Data Type

**int32**

# SSHSettingsMinWindowSize Property ([SFTPClient](#sftpclient-component) Component)

Specifies the minimal internal window size.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) SSHSettingsMinWindowSize() (int32, error)func (obj *SFTPClient) SetSSHSettingsMinWindowSize(value int32) error
```

## Default Value

2048

## Remarks

Specifies the minimal internal window size. When the minimal window size is reached, the 'window extension' request is sent to the server. This request notifies the server that the window was extended, and it can send more data.

## Data Type

**int32**

# SSHSettingsObfuscateHandshake Property ([SFTPClient](#sftpclient-component) Component)

Enables or disables handshake obfuscation.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) SSHSettingsObfuscateHandshake() (bool, error)func (obj *SFTPClient) SetSSHSettingsObfuscateHandshake(value bool) error
```

## Default Value

false

## Remarks

Enables or disables handshake obfuscation.

## Data Type

**bool**

# SSHSettingsObfuscationPassword Property ([SFTPClient](#sftpclient-component) Component)

Specifies the password used to encrypt the handshake when ObfuscateHandshake is set.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) SSHSettingsObfuscationPassword() (string, error)func (obj *SFTPClient) SetSSHSettingsObfuscationPassword(value string) error
```

## Default Value

""

## Remarks

Specifies the password used to encrypt the handshake when ObfuscateHandshake is set.

## Data Type

**string**

# SSHSettingsPublicKeyAlgorithms Property ([SFTPClient](#sftpclient-component) Component)

A list of public key algorithms separated with commas or semicolons.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) SSHSettingsPublicKeyAlgorithms() (string, error)func (obj *SFTPClient) SetSSHSettingsPublicKeyAlgorithms(value string) error
```

## Default Value

""

## Remarks

A list of public key algorithms separated with commas or semicolons. Each algorithm in the list may be prefixed with a minus sign (-) to indicate that the algorithm should be disabled rather than enabled. Besides the specific algorithm names, this property supports the *all* (and *-all*) aliases that allow to blanketly enable or disable all public key algorithms at once.

Note: the list of algorithms provided to this property alters the baseline list of public key algorithms pre-configured for this component. Remember to start your algorithm string with -all; if you need to only enable a specific fixed set of algorithms. The list of supported public key algorithms is provided below:

- ssh-dss
- ssh-rsa
- x509v3-sign-rsa
- x509v3-sign-dss
- spki-sign-rsa,
- spki-sign-dss
- pgp-sign-rsa
- pgp-sign-dss
- ecdsa-sha2-nistp256
- ecdsa-sha2-nistp384
- ecdsa-sha2-nistp521
- ecdsa-sha2-nistk163
- ecdsa-sha2-nistp192
- ecdsa-sha2-nistp224
- ecdsa-sha2-nistk233
- ecdsa-sha2-nistb233
- ecdsa-sha2-nistk283
- ecdsa-sha2-nistk409
- ecdsa-sha2-nistb409
- ecdsa-sha2-nistt571,
- ecdsa-sha2-curve25519
- x509v3-ssh-rsa
- x509v3-ssh-dss
- x509v3-rsa2048-sha256
- x509v3-ecdsa-sha2-nistp256
- x509v3-ecdsa-sha2-nistp384
- x509v3-ecdsa-sha2-nistp521
- x509v3-ecdsa-sha2-nistk163
- x509v3-ecdsa-sha2-nistp192
- x509v3-ecdsa-sha2-nistp224
- x509v3-ecdsa-sha2-nistk233
- x509v3-ecdsa-sha2-nistb233
- x509v3-ecdsa-sha2-nistk283
- x509v3-ecdsa-sha2-nistk409
- x509v3-ecdsa-sha2-nistb409
- x509v3-ecdsa-sha2-nistt571
- x509v3-ecdsa-sha2-curve25519
- ssh-ed25519
- ssh-ed448
- rsa-sha2-256
- rsa-sha2-512

## Data Type

**string**

# SSHSettingsRequestPasswordChange Property ([SFTPClient](#sftpclient-component) Component)

Whether to request a password change when connecting.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) SSHSettingsRequestPasswordChange() (bool, error)func (obj *SFTPClient) SetSSHSettingsRequestPasswordChange(value bool) error
```

## Default Value

false

## Remarks

Whether to request a password change when connecting.

## Data Type

**bool**

# SSHSettingsSoftwareName Property ([SFTPClient](#sftpclient-component) Component)

The name to be used by the class to identify itself.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) SSHSettingsSoftwareName() (string, error)func (obj *SFTPClient) SetSSHSettingsSoftwareName(value string) error
```

## Default Value

"SecureBlackbox"

## Remarks

The name to be used by the component to identify itself.

## Data Type

**string**

# SSHSettingsTrustAllKeys Property ([SFTPClient](#sftpclient-component) Component)

Enables or disables explicit trust to all server keys.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) SSHSettingsTrustAllKeys() (bool, error)func (obj *SFTPClient) SetSSHSettingsTrustAllKeys(value bool) error
```

## Default Value

false

## Remarks

Enables or disables explicit trust to all server keys. Use with care.

## Data Type

**bool**

# SSHSettingsUseAuthAgent Property ([SFTPClient](#sftpclient-component) Component)

Enables or disables the use of external key agent, such as Putty key agent.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) SSHSettingsUseAuthAgent() (bool, error)func (obj *SFTPClient) SetSSHSettingsUseAuthAgent(value bool) error
```

## Default Value

false

## Remarks

Enables or disables the use of external key agent, such as Putty key agent.

## Data Type

**bool**

# SSHSettingsVersions Property ([SFTPClient](#sftpclient-component) Component)

Specifies enabled SSH protocol versions (1 or 2).

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) SSHSettingsVersions() (int32, error)func (obj *SFTPClient) SetSSHSettingsVersions(value int32) error
```

## Default Value

1

## Remarks

Specifies enabled SSH protocol versions (1 or 2).

## Data Type

**int32**

# TrustedKeysFile Property ([SFTPClient](#sftpclient-component) Component)

A file containing the keys of authorized servers.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) TrustedKeysFile() (string, error)func (obj *SFTPClient) SetTrustedKeysFile(value string) error
```

## Default Value

""

## Remarks

Use this property to provide a path to the 'authorized_keys' file to be used by the client.

## Data Type

**string**

# UploadBlockSize Property ([SFTPClient](#sftpclient-component) Component)

The upload block size in bytes.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) UploadBlockSize() (int32, error)func (obj *SFTPClient) SetUploadBlockSize(value int32) error
```

## Default Value

32256

## Remarks

Use this property to manually control the size of upload blocks. Typically you will only need to adjust this property if the default transfer settings ([AutoAdjustTransferBlock](#autoadjusttransferblock-property-sftpclient-component)) don't work.

## Data Type

**int32**

# Username Property ([SFTPClient](#sftpclient-component) Component)

The client's username to authenticate to the server.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) Username() (string, error)func (obj *SFTPClient) SetUsername(value string) error
```

## Default Value

""

## Remarks

Use this property to provide an authentication username (login). This property is only applicable for password-based and keyboard-interactive authentication types.

## Data Type

**string**

# UseUTF8 Property ([SFTPClient](#sftpclient-component) Component)

Enables UTF8 for all string content.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) UseUTF8() (bool, error)func (obj *SFTPClient) SetUseUTF8(value bool) error
```

## Default Value

false

## Remarks

If *UseUTF8* is true, the struct expects all downloaded filenames to be encoded in UTF-8. Set *UseUTF8* to false if you connect to a server that does not support UTF8 (e.g., OpenSSH). In this case the file names will be interpreted in the default character set.

## Data Type

**bool**

# Version Property ([SFTPClient](#sftpclient-component) Component)

The SFTP version negotiated.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) Version() (int32, error)
```

## Default Value

0

## Remarks

Use this property to get the negotiated SFTP version.

This property is read-only.

## Data Type

**int32**

# AbsolutePath Method ([SFTPClient](#sftpclient-component) Component)

Requests the absolute path for a relative path.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) AbsolutePath(RemotePath string) (string, error)
```

## Remarks

Use this method to ask the SFTP server to convert a relative path to an absolute.

# ChangeDir Method ([SFTPClient](#sftpclient-component) Component)

Changes current working directory on the server.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) ChangeDir(RemoteDir string) error
```

## Remarks

Changes current working directory on the server to *RemoteDir*.

# Config Method ([SFTPClient](#sftpclient-component) Component)

Sets or retrieves a configuration setting.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) Config(ConfigurationString string) (string, error)
```

## Remarks

Config is a generic method available in every struct. It is used to set and retrieve [configuration settings](#config-settings-sftpclient-component) for the struct.

These settings are similar in functionality to properties, but they are rarely used. In order to avoid "polluting" the property namespace of the struct, access to these *internal properties* is provided through the Config method.

To set a configuration setting named *PROPERTY*, you must call *Config("PROPERTY=VALUE")*, where *VALUE* is the value of the setting expressed as a string. For boolean values, use the strings "True", "False", "0", "1", "Yes", or "No" (case does not matter).

To read (query) the value of a [configuration setting](#config-settings-sftpclient-component), you must call *Config("PROPERTY")*. The value will be returned as a string.

# Connect Method ([SFTPClient](#sftpclient-component) Component)

Connects to an SFTP server.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) Connect(Address string, Port int32) error
```

## Remarks

Use this method to connect to the SFTP server identified via its *Address* and *Port*.

# CreateLink Method ([SFTPClient](#sftpclient-component) Component)

Creates a symbolic or hard link to a remote file.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) CreateLink(LinkPath string, TargetPath string, HardLink bool) error
```

## Remarks

Use this method to create a symbolic or hard link on the server. Provide the name of the new link object via the *LinkPath* parameter, and the destination file or directory path via the *TargetPath* parameter. *HardLink* specifies whether the new link should be hard (true) or symbolic (false).

# DeleteDir Method ([SFTPClient](#sftpclient-component) Component)

Removes directory from the SFTP server.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) DeleteDir(RemoteDir string) error
```

## Remarks

Use *RemoteDir* to provide a path to the directory to be deleted.

# DeleteFile Method ([SFTPClient](#sftpclient-component) Component)

Deletes a file from the SFTP server.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) DeleteFile(RemoteFile string) error
```

## Remarks

Use the *RemoteFile* parameter to specify the name of the file to delete.

# DeleteFiles Method ([SFTPClient](#sftpclient-component) Component)

Deletes a group of files from the SFTP server.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) DeleteFiles(RemotePath string, Mask string, CaseSensitive bool, Recursive bool, ErrorHandling int32) error
```

## Remarks

Use this method to delete a group of files from the SFTP server. Specify the files to be deleted via *RemotePath* and *Mask* parameters. Use *CaseSensitive* and *Recursive* parameters to tune up the operation.

The *ErrorHandling* parameter specifies the error handling tactics.

|  |  |  |
| --- | --- | --- |
| ehStopOnFailure | 0 | Stop on the first failure and throw an exception |
| ehIgnoreErrors | 1 | Ignore individual processing errors, just proceed to the next item on the list |
| ehTryAllItems | 2 | Try to process all the items by ignoring any mid-way errors, but throw an exception at the end of the processing if any of the items failed to process |

This method is a more efficient way to delete a group of files than deleting them one by one.

# DirExists Method ([SFTPClient](#sftpclient-component) Component)

Checks if a directory exists on the SFTP server.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) DirExists(RemoteDir string) (bool, error)
```

## Remarks

*RemoteDir* specifies the name of the remote directory to check for existence.

# Disconnect Method ([SFTPClient](#sftpclient-component) Component)

Disconnects from the SFTP server.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) Disconnect() error
```

## Remarks

Call this method to disconnect from the SFTP server.

# DoAction Method ([SFTPClient](#sftpclient-component) Component)

Performs an additional action.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) DoAction(ActionID string, ActionParams string) (string, error)
```

## Remarks

DoAction is a generic method available in every struct. It is used to perform an additional action introduced after the product major release. The list of actions is not fixed, and may be flexibly extended over time.

The unique identifier (case insensitive) of the action is provided in the *ActionID* parameter.

*ActionParams* contains the value of a single parameter, or a list of multiple parameters for the action in the form of *PARAM1=VALUE1;PARAM2=VALUE2;...*.

Common ActionIDs:

|  |  |  |  |
| --- | --- | --- | --- |
| Action | Parameters | Returned value | Description |
| ResetTrustedListCache | none | none | Clears the cached list of trusted lists. |
| ResetCertificateCache | none | none | Clears the cached certificates. |
| ResetCRLCache | none | none | Clears the cached CRLs. |
| ResetOCSPResponseCache | none | none | Clears the cached OCSP responses. |

# DownloadBytes Method ([SFTPClient](#sftpclient-component) Component)

Downloads a file from the server into an array of bytes.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) DownloadBytes(RemoteFile string) ([]byte, error)
```

## Remarks

Use this method to download *RemoteFile* into a byte array.

# DownloadFile Method ([SFTPClient](#sftpclient-component) Component)

Downloads a file from the SFTP server.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) DownloadFile(RemoteFile string, LocalFile string) error
```

## Remarks

Use this method to download *RemoteFile* into the location specified by *LocalFile*.

# DownloadFiles Method ([SFTPClient](#sftpclient-component) Component)

Downloads multiple files from the SFTP server.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) DownloadFiles(RemotePath string, LocalDir string, Recursive bool, ErrorHandling int32) error
```

## Remarks

*RemotePath* contains a file mask or regular expression by which the files are selected for download.

*LocalDir* specifies the local folder where the files should be saved. The *Recursive* parameter tells the component whether it should navigate source directories recursively when downloading files. If set to false, only the files residing in the actual *RemotePath*, but not its subdirectories, will be downloaded.

The *ErrorHandling* parameter specifies the error handling tactics.

|  |  |  |
| --- | --- | --- |
| ehStopOnFailure | 0 | Stop on the first failure and throw an exception |
| ehIgnoreErrors | 1 | Ignore individual processing errors, just proceed to the next item on the list |
| ehTryAllItems | 2 | Try to process all the items by ignoring any mid-way errors, but throw an exception at the end of the processing if any of the items failed to process |

# ExecuteSSHCommand Method ([SFTPClient](#sftpclient-component) Component)

Sends an SSH command to the server in the middle of SFTP session.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) ExecuteSSHCommand(Command string) ([]byte, error)
```

## Remarks

Use this command to send an SSH command to the server in the middle of an SFTP session. The command is executed in a secondary channel, so the SFTP connection is not affected.

This method is suitable for simple commands that do not require interaction with the user. The call returns the command output.

# ExtensionCmd Method ([SFTPClient](#sftpclient-component) Component)

Sends an extension command to the server.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) ExtensionCmd(Extn string, DataBuffer []byte) ([]byte, error)
```

## Remarks

Use this method to send an extension command to the SFTP server. Provide the extension type via the *Extn* parameter, and the request body via the *DataBuffer* parameter.

Upon completion of the command, the method returns the response as received from the server.

# FileExists Method ([SFTPClient](#sftpclient-component) Component)

Checks whether a file exists on the server.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) FileExists(RemoteFile string) (bool, error)
```

## Remarks

Use this method to check if a *RemoteFile* exists on the server.

# GetCurrentDir Method ([SFTPClient](#sftpclient-component) Component)

Returns the current directory on the SFTP server.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) GetCurrentDir() (string, error)
```

## Remarks

Use this method to retrieve the current directory as stored by the struct. This is a virtualized current directory, as SFTP protocol does not maintain a concept of the current directory.

# GetFileSize Method ([SFTPClient](#sftpclient-component) Component)

Checks the size of a remote file.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) GetFileSize(RemoteFile string) (int64, error)
```

## Remarks

Returns the size of the *RemoteFile*.

# ListDir Method ([SFTPClient](#sftpclient-component) Component)

Lists the content of the current remote directory.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) ListDir(IncludeFiles bool, IncludeDirectories bool) (string, error)
```

## Remarks

*IncludeFiles* specifies whether file names and symlinks should be included in the results. *IncludeDirectories* specifies whether directory names should be included in the result.

Upon receiving the listing, the component will report each entry in it via [ListEntry](#listentry-event-sftpclient-component) event.

# MakeDir Method ([SFTPClient](#sftpclient-component) Component)

Creates a new directory on the server.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) MakeDir(RemoteDir string) error
```

## Remarks

*RemoteDir* specifies the name of the new directory.

# RenameFile Method ([SFTPClient](#sftpclient-component) Component)

Renames a file.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) RenameFile(SourceFile string, DestFile string) error
```

## Remarks

Use this method to rename a remote file. Provide the old and the new name via *SourceFile* and *DestFile* parameters.

# RequestAttributes Method ([SFTPClient](#sftpclient-component) Component)

Requests attributes of the remote file.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) RequestAttributes(RemotePath string, FollowSymLinks bool) (string, error)
```

## Remarks

Use this method to request attributes of a remote file. Pass the name of the file via the *RemotePath* parameter, and use *FollowSymLinks* to specify whether symbolic links should be resolved.

The method returns the list of attributes as a line of semicolon-separated entries: *Size=78220;Owner=user@system;Group=none@system;Permissions=432;ATime=2020-04-28 08:21:00.295;MTime=2020-04-28 08:21:00.302;CTime=2020-04-28 08:21:00.295;AttribBits=24;LinkCount=1*.

# Reset Method ([SFTPClient](#sftpclient-component) Component)

Resets the class settings.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) Reset() error
```

## Remarks

Reset is a generic method available in every struct.

# SetAttributes Method ([SFTPClient](#sftpclient-component) Component)

Sets the attributes upon a remote file.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) SetAttributes(RemotePath string, Attributes string) error
```

## Remarks

Use this method to set the attributes of a remote file.

# UploadBytes Method ([SFTPClient](#sftpclient-component) Component)

Uploads a byte array to the server.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) UploadBytes(Bytes []byte, RemoteFile string) error
```

## Remarks

Use this method to upload *Bytes* or its part to *RemoteFile* on the server.

# UploadFile Method ([SFTPClient](#sftpclient-component) Component)

Uploads a file to the server.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) UploadFile(LocalFile string, RemoteFile string) error
```

## Remarks

Use this method to upload *LocalFile* to the *RemoteFile* location on the server.

# UploadFiles Method ([SFTPClient](#sftpclient-component) Component)

Uploads multiple files to the server.

## Syntax

*Go Syntax*

```text
func (obj *SFTPClient) UploadFiles(LocalPath string, RemoteDir string, Recursive bool, ErrorHandling int32) error
```

## Remarks

Use this property to upload a batch of files to the server.

*LocalPath* specifies a wildcard or regular expression by which the local files are picked for uploading. *RemoteDir* specifies the location on the server where these files should be saved. The *Recursive* parameter tells the component whether it should navigate source directories recursively when uploading files. If set to false, only the files residing in the actual *LocalPath*, but not its subdirectories, will be uploaded.

The *ErrorHandling* parameter specifies one of the pre-defined error handling tactics:

|  |  |  |
| --- | --- | --- |
| ehStopOnFailure | 0 | Stop on the first failure and throw an exception |
| ehIgnoreErrors | 1 | Ignore individual processing errors, just proceed to the next item on the list |
| ehTryAllItems | 2 | Try to process all the items by ignoring any mid-way errors, but throw an exception at the end of the processing if any of the items failed to process |

# AuthAttempt Event ([SFTPClient](#sftpclient-component) Component)

Fires when an authentication attempt is performed.

## Syntax

*Go Syntax*

```text
// SFTPClientAuthAttemptEventArgs carries the SFTPClient AuthAttempt event's parameters.
type SFTPClientAuthAttemptEventArgs struct {...}

func (args *SFTPClientAuthAttemptEventArgs) AuthType() int32
// SFTPClientAuthAttemptEvent defines the signature of the SFTPClient AuthAttempt event's handler function.
type SFTPClientAuthAttemptEvent func(sender *SFTPClient, args *SFTPClientAuthAttemptEventArgs)

func (obj *SFTPClient) GetOnAuthAttemptHandler() SFTPClientAuthAttemptEvent
func (obj *SFTPClient) SetOnAuthAttemptHandler(handlerFunc SFTPClientAuthAttemptEvent)
```

## Remarks

This event signals the start of an authentication attempt. The *AuthType* parameter specifies the authentication type. This event may be fired more than once if the client tries different authentication methods one after another.

Supported authentication types:

|  |  |  |
| --- | --- | --- |
| atRhosts | 0x01 | RHOSTS file authentication. Rarely used today. |
| atPublicKey | 0x02 | Public key (sometimes called private key) authentication |
| atPassword | 0x04 | Password-based authentication |
| atHostbased | 0x08 | Hostbased authentication |
| atKeyboard | 0x10 | Keyboard-interactive authentication. This is often used in place of generic password authentication. |
| atGssWithMic | 0x20 | GSS authentication |
| atGssKeyex | 0x40 | GSS authentication with key exchange |
| atPublicKeyAgent | 0x80 | Public key agent authentication |

# AuthFailed Event ([SFTPClient](#sftpclient-component) Component)

Fires if an authentication attempt fails.

## Syntax

*Go Syntax*

```text
// SFTPClientAuthFailedEventArgs carries the SFTPClient AuthFailed event's parameters.
type SFTPClientAuthFailedEventArgs struct {...}

func (args *SFTPClientAuthFailedEventArgs) AuthType() int32
// SFTPClientAuthFailedEvent defines the signature of the SFTPClient AuthFailed event's handler function.
type SFTPClientAuthFailedEvent func(sender *SFTPClient, args *SFTPClientAuthFailedEventArgs)

func (obj *SFTPClient) GetOnAuthFailedHandler() SFTPClientAuthFailedEvent
func (obj *SFTPClient) SetOnAuthFailedHandler(handlerFunc SFTPClientAuthFailedEvent)
```

## Remarks

This event fires if an authentication attempt fails (for example, if a bad password had been provided). *AuthType* parameter indicates the authentication type.

AuthFailed may be fired more than once, depending on the configured authentication parameters and the value assigned to the [AuthAttempts](#authattempts-property-sftpclient-component) property.

This event does not necessarily lead to connection abortion, as the client may still have a chance of authenticating with a different method.

Supported authentication types:

|  |  |  |
| --- | --- | --- |
| atRhosts | 0x01 | RHOSTS file authentication. Rarely used today. |
| atPublicKey | 0x02 | Public key (sometimes called private key) authentication |
| atPassword | 0x04 | Password-based authentication |
| atHostbased | 0x08 | Hostbased authentication |
| atKeyboard | 0x10 | Keyboard-interactive authentication. This is often used in place of generic password authentication. |
| atGssWithMic | 0x20 | GSS authentication |
| atGssKeyex | 0x40 | GSS authentication with key exchange |
| atPublicKeyAgent | 0x80 | Public key agent authentication |

# AuthSucceeded Event ([SFTPClient](#sftpclient-component) Component)

Reports a successful authentication.

## Syntax

*Go Syntax*

```text
// SFTPClientAuthSucceededEventArgs carries the SFTPClient AuthSucceeded event's parameters.
type SFTPClientAuthSucceededEventArgs struct {...}

// SFTPClientAuthSucceededEvent defines the signature of the SFTPClient AuthSucceeded event's handler function.
type SFTPClientAuthSucceededEvent func(sender *SFTPClient, args *SFTPClientAuthSucceededEventArgs)

func (obj *SFTPClient) GetOnAuthSucceededHandler() SFTPClientAuthSucceededEvent
func (obj *SFTPClient) SetOnAuthSucceededHandler(handlerFunc SFTPClientAuthSucceededEvent)
```

## Remarks

This event marks the completion of the authentication procedure, and signifies transition to the SSH connection subprotocol.

# Banner Event ([SFTPClient](#sftpclient-component) Component)

Reports the receipt of the Welcome message from the server.

## Syntax

*Go Syntax*

```text
// SFTPClientBannerEventArgs carries the SFTPClient Banner event's parameters.
type SFTPClientBannerEventArgs struct {...}

func (args *SFTPClientBannerEventArgs) Text() []byte
func (args *SFTPClientBannerEventArgs) Language() []byte
// SFTPClientBannerEvent defines the signature of the SFTPClient Banner event's handler function.
type SFTPClientBannerEvent func(sender *SFTPClient, args *SFTPClientBannerEventArgs)

func (obj *SFTPClient) GetOnBannerHandler() SFTPClientBannerEvent
func (obj *SFTPClient) SetOnBannerHandler(handlerFunc SFTPClientBannerEvent)
```

## Remarks

The struct fires this event when it receives a welcome message from the server. Use the *Text* parameter to access the encoded message.

# Disconnect Event ([SFTPClient](#sftpclient-component) Component)

Reports SFTP connection closure.

## Syntax

*Go Syntax*

```text
// SFTPClientDisconnectEventArgs carries the SFTPClient Disconnect event's parameters.
type SFTPClientDisconnectEventArgs struct {...}

func (args *SFTPClientDisconnectEventArgs) CloseReason() int32
// SFTPClientDisconnectEvent defines the signature of the SFTPClient Disconnect event's handler function.
type SFTPClientDisconnectEvent func(sender *SFTPClient, args *SFTPClientDisconnectEventArgs)

func (obj *SFTPClient) GetOnDisconnectHandler() SFTPClientDisconnectEvent
func (obj *SFTPClient) SetOnDisconnectHandler(handlerFunc SFTPClientDisconnectEvent)
```

## Remarks

The struct fires this event to report connection closure. No more SFTP activity could be done after the disconnect.

# Error Event ([SFTPClient](#sftpclient-component) Component)

Information about errors during SFTP connection.

## Syntax

*Go Syntax*

```text
// SFTPClientErrorEventArgs carries the SFTPClient Error event's parameters.
type SFTPClientErrorEventArgs struct {...}

func (args *SFTPClientErrorEventArgs) ErrorCode() int32
func (args *SFTPClientErrorEventArgs) Description() string
// SFTPClientErrorEvent defines the signature of the SFTPClient Error event's handler function.
type SFTPClientErrorEvent func(sender *SFTPClient, args *SFTPClientErrorEventArgs)

func (obj *SFTPClient) GetOnErrorHandler() SFTPClientErrorEvent
func (obj *SFTPClient) SetOnErrorHandler(handlerFunc SFTPClientErrorEvent)
```

## Remarks

The event is fired in case of exceptional conditions during data transfer.

*ErrorCode* contains an error code and *Description* contains a textual description of the error. For a list of error codes please refer to [SFTP](#trappable-errors-sftpclient-component).

# ExternalSign Event ([SFTPClient](#sftpclient-component) Component)

Handles remote or external signing initiated by the SignExternal method or other source.

## Syntax

*Go Syntax*

```text
// SFTPClientExternalSignEventArgs carries the SFTPClient ExternalSign event's parameters.
type SFTPClientExternalSignEventArgs struct {...}

func (args *SFTPClientExternalSignEventArgs) OperationId() string
func (args *SFTPClientExternalSignEventArgs) HashAlgorithm() string
func (args *SFTPClientExternalSignEventArgs) Pars() string
func (args *SFTPClientExternalSignEventArgs) Data() string
func (args *SFTPClientExternalSignEventArgs) SignedData() string
func (args *SFTPClientExternalSignEventArgs) SetSignedData(value string)

// SFTPClientExternalSignEvent defines the signature of the SFTPClient ExternalSign event's handler function.
type SFTPClientExternalSignEvent func(sender *SFTPClient, args *SFTPClientExternalSignEventArgs)

func (obj *SFTPClient) GetOnExternalSignHandler() SFTPClientExternalSignEvent
func (obj *SFTPClient) SetOnExternalSignHandler(handlerFunc SFTPClientExternalSignEvent)
```

## Remarks

Assign a handler to this event if you need to delegate a low-level signing operation to an external, remote, or custom signing engine. Depending on the settings, the handler will receive a hashed or unhashed value to be signed.

The event handler must pass the value of *Data* to the signer, obtain the signature, and pass it back to the struct via the *SignedData* parameter.

*OperationId* provides a comment about the operation and its origin. It depends on the exact struct being used, and may be empty. *HashAlgorithm* specifies the hash algorithm being used for the operation, and *Pars* contains algorithm-dependent parameters.

The struct uses base16 (hex) encoding for the *Data*, *SignedData*, and *Pars* parameters. If your signing engine uses a different input and output encoding, you may need to decode and/or encode the data before and/or after the signing.

A sample MD5 hash encoded in base16: a0dee2a0382afbb09120ffa7ccd8a152 - lower case base16 A0DEE2A0382AFBB09120FFA7CCD8A152 - upper case base16

A sample event handler that uses the .NET RSACryptoServiceProvider class may look like the following:

```text
signer.OnExternalSign += (s, e) =>
{
       var cert = new X509Certificate2("cert.pfx", "", X509KeyStorageFlags.Exportable);
       var key = (RSACryptoServiceProvider)cert.PrivateKey;

       var dataToSign = e.Data.FromBase16String();
       var signedData = key.SignHash(dataToSign, "2.16.840.1.101.3.4.2.1");
       e.SignedData = signedData.ToBase16String();
};
```

# FileNameChangeNeeded Event ([SFTPClient](#sftpclient-component) Component)

Asks the application for a new file name.

## Syntax

*Go Syntax*

```text
// SFTPClientFileNameChangeNeededEventArgs carries the SFTPClient FileNameChangeNeeded event's parameters.
type SFTPClientFileNameChangeNeededEventArgs struct {...}

func (args *SFTPClientFileNameChangeNeededEventArgs) FileName() string
func (args *SFTPClientFileNameChangeNeededEventArgs) SetFileName(value string)

func (args *SFTPClientFileNameChangeNeededEventArgs) Force() bool
func (args *SFTPClientFileNameChangeNeededEventArgs) SetForce(value bool)

// SFTPClientFileNameChangeNeededEvent defines the signature of the SFTPClient FileNameChangeNeeded event's handler function.
type SFTPClientFileNameChangeNeededEvent func(sender *SFTPClient, args *SFTPClientFileNameChangeNeededEventArgs)

func (obj *SFTPClient) GetOnFileNameChangeNeededHandler() SFTPClientFileNameChangeNeededEvent
func (obj *SFTPClient) SetOnFileNameChangeNeededHandler(handlerFunc SFTPClientFileNameChangeNeededEvent)
```

## Remarks

The component uses this event to ask the application for a new file name in the case of a name conflict. Adjust the *FileName* as required to avoid the conflict, or set *Force* to true to go ahead with the current name (possibly overwriting an existing file).

# FileOperation Event ([SFTPClient](#sftpclient-component) Component)

Signifies the start of a file transfer operation.

## Syntax

*Go Syntax*

```text
// SFTPClientFileOperationEventArgs carries the SFTPClient FileOperation event's parameters.
type SFTPClientFileOperationEventArgs struct {...}

func (args *SFTPClientFileOperationEventArgs) Operation() int32
func (args *SFTPClientFileOperationEventArgs) RemotePath() string
func (args *SFTPClientFileOperationEventArgs) LocalPath() string
func (args *SFTPClientFileOperationEventArgs) Skip() bool
func (args *SFTPClientFileOperationEventArgs) SetSkip(value bool)

func (args *SFTPClientFileOperationEventArgs) Cancel() bool
func (args *SFTPClientFileOperationEventArgs) SetCancel(value bool)

// SFTPClientFileOperationEvent defines the signature of the SFTPClient FileOperation event's handler function.
type SFTPClientFileOperationEvent func(sender *SFTPClient, args *SFTPClientFileOperationEventArgs)

func (obj *SFTPClient) GetOnFileOperationHandler() SFTPClientFileOperationEvent
func (obj *SFTPClient) SetOnFileOperationHandler(handlerFunc SFTPClientFileOperationEvent)
```

## Remarks

This event is fired each time the struct starts an upload or download operation within a multi-file call. *Operation* defines the operation about to start, *RemotePath* specifies the name and path to the remote file, and *LocalPath* specifies the name and path to the local file.

If needed, set *Skip* to true to ignore the current file, or *Cancel* to abort the whole batch.

Supported operations:

|  |  |  |
| --- | --- | --- |
| cffoDownloadFile | 0 | Download file |
| cffoUploadFile | 1 | Upload file |
| cffoDeleteFile | 2 | Delete file |
| cffoMakeDir | 3 | Make directory |

# FileOperationResult Event ([SFTPClient](#sftpclient-component) Component)

Signifies the completion of a file transfer operation.

## Syntax

*Go Syntax*

```text
// SFTPClientFileOperationResultEventArgs carries the SFTPClient FileOperationResult event's parameters.
type SFTPClientFileOperationResultEventArgs struct {...}

func (args *SFTPClientFileOperationResultEventArgs) Operation() int32
func (args *SFTPClientFileOperationResultEventArgs) RemotePath() string
func (args *SFTPClientFileOperationResultEventArgs) LocalPath() string
func (args *SFTPClientFileOperationResultEventArgs) ErrorCode() int32
func (args *SFTPClientFileOperationResultEventArgs) Comment() string
func (args *SFTPClientFileOperationResultEventArgs) Cancel() bool
func (args *SFTPClientFileOperationResultEventArgs) SetCancel(value bool)

// SFTPClientFileOperationResultEvent defines the signature of the SFTPClient FileOperationResult event's handler function.
type SFTPClientFileOperationResultEvent func(sender *SFTPClient, args *SFTPClientFileOperationResultEventArgs)

func (obj *SFTPClient) GetOnFileOperationResultHandler() SFTPClientFileOperationResultEvent
func (obj *SFTPClient) SetOnFileOperationResultHandler(handlerFunc SFTPClientFileOperationResultEvent)
```

## Remarks

This event is fired each time the struct completes a file transfer within a multi-file call. *Operation* defines the operation performed on the file, *RemotePath* specifies the name and path to the remote file, and *LocalPath* specifies the name and path to the local file.

*ErrorCode* and *Comment* return the code and textual description of the error, if it was encountered.

Set *Cancel* to True to cancel the multi-file operation.

Supported operations:

|  |  |  |
| --- | --- | --- |
| cffoDownloadFile | 0 | Download file |
| cffoUploadFile | 1 | Upload file |
| cffoDeleteFile | 2 | Delete file |
| cffoMakeDir | 3 | Make directory |

# KnownKeyReceived Event ([SFTPClient](#sftpclient-component) Component)

Signals that the server has introduced itself with a known key.

## Syntax

*Go Syntax*

```text
// SFTPClientKnownKeyReceivedEventArgs carries the SFTPClient KnownKeyReceived event's parameters.
type SFTPClientKnownKeyReceivedEventArgs struct {...}

func (args *SFTPClientKnownKeyReceivedEventArgs) Algorithm() string
func (args *SFTPClientKnownKeyReceivedEventArgs) Bits() int32
func (args *SFTPClientKnownKeyReceivedEventArgs) FingerprintSHA256() string
// SFTPClientKnownKeyReceivedEvent defines the signature of the SFTPClient KnownKeyReceived event's handler function.
type SFTPClientKnownKeyReceivedEvent func(sender *SFTPClient, args *SFTPClientKnownKeyReceivedEventArgs)

func (obj *SFTPClient) GetOnKnownKeyReceivedHandler() SFTPClientKnownKeyReceivedEvent
func (obj *SFTPClient) SetOnKnownKeyReceivedHandler(handlerFunc SFTPClientKnownKeyReceivedEvent)
```

## Remarks

The struct fires this event to tell the application that the server has introduced itself with a known key from [TrustedKeysFile](#trustedkeysfile-property-sftpclient-component).

The details of the key are provided: *Algorithm* and *Bits* specify the key algorithm and the number of bits. *FingerprintSHA256* contains the key's fingerprint.

Use ServerKey to access more key details.

# ListEntry Event ([SFTPClient](#sftpclient-component) Component)

Reports a directory listing entry to the application.

## Syntax

*Go Syntax*

```text
// SFTPClientListEntryEventArgs carries the SFTPClient ListEntry event's parameters.
type SFTPClientListEntryEventArgs struct {...}

func (args *SFTPClientListEntryEventArgs) FileName() string
// SFTPClientListEntryEvent defines the signature of the SFTPClient ListEntry event's handler function.
type SFTPClientListEntryEvent func(sender *SFTPClient, args *SFTPClientListEntryEventArgs)

func (obj *SFTPClient) GetOnListEntryHandler() SFTPClientListEntryEvent
func (obj *SFTPClient) SetOnListEntryHandler(handlerFunc SFTPClientListEntryEvent)
```

## Remarks

The struct fires this event to report a directory listing entry to the application. *FileName* contains the entry name.

Use CurrentListEntry to access the details of the entry.

# Notification Event ([SFTPClient](#sftpclient-component) Component)

This event notifies the application about an underlying control flow event.

## Syntax

*Go Syntax*

```text
// SFTPClientNotificationEventArgs carries the SFTPClient Notification event's parameters.
type SFTPClientNotificationEventArgs struct {...}

func (args *SFTPClientNotificationEventArgs) EventID() string
func (args *SFTPClientNotificationEventArgs) EventParam() string
// SFTPClientNotificationEvent defines the signature of the SFTPClient Notification event's handler function.
type SFTPClientNotificationEvent func(sender *SFTPClient, args *SFTPClientNotificationEventArgs)

func (obj *SFTPClient) GetOnNotificationHandler() SFTPClientNotificationEvent
func (obj *SFTPClient) SetOnNotificationHandler(handlerFunc SFTPClientNotificationEvent)
```

## Remarks

The struct fires this event to let the application know about some event, occurrence, or milestone in the struct. For example, it may fire to report completion of the document processing. The list of events being reported is not fixed, and may be flexibly extended over time.

The unique identifier of the event is provided in the *EventID* parameter. *EventParam* contains any parameters accompanying the occurrence. Depending on the type of the struct, the exact action it is performing, or the document being processed, one or both may be omitted.

# PasswordChangeRequest Event ([SFTPClient](#sftpclient-component) Component)

Signals that the server requests a password change.

## Syntax

*Go Syntax*

```text
// SFTPClientPasswordChangeRequestEventArgs carries the SFTPClient PasswordChangeRequest event's parameters.
type SFTPClientPasswordChangeRequestEventArgs struct {...}

func (args *SFTPClientPasswordChangeRequestEventArgs) Prompt() string
func (args *SFTPClientPasswordChangeRequestEventArgs) NewPassword() string
func (args *SFTPClientPasswordChangeRequestEventArgs) SetNewPassword(value string)

func (args *SFTPClientPasswordChangeRequestEventArgs) Cancel() bool
func (args *SFTPClientPasswordChangeRequestEventArgs) SetCancel(value bool)

// SFTPClientPasswordChangeRequestEvent defines the signature of the SFTPClient PasswordChangeRequest event's handler function.
type SFTPClientPasswordChangeRequestEvent func(sender *SFTPClient, args *SFTPClientPasswordChangeRequestEventArgs)

func (obj *SFTPClient) GetOnPasswordChangeRequestHandler() SFTPClientPasswordChangeRequestEvent
func (obj *SFTPClient) SetOnPasswordChangeRequestHandler(handlerFunc SFTPClientPasswordChangeRequestEvent)
```

## Remarks

The struct fires this event to pass the password change request from the server to the application. This event is fired during the SSH handshake.

# PrivateKeyNeeded Event ([SFTPClient](#sftpclient-component) Component)

Asks the application for the client's private key.

## Syntax

*Go Syntax*

```text
// SFTPClientPrivateKeyNeededEventArgs carries the SFTPClient PrivateKeyNeeded event's parameters.
type SFTPClientPrivateKeyNeededEventArgs struct {...}

func (args *SFTPClientPrivateKeyNeededEventArgs) Skip() bool
func (args *SFTPClientPrivateKeyNeededEventArgs) SetSkip(value bool)

// SFTPClientPrivateKeyNeededEvent defines the signature of the SFTPClient PrivateKeyNeeded event's handler function.
type SFTPClientPrivateKeyNeededEvent func(sender *SFTPClient, args *SFTPClientPrivateKeyNeededEventArgs)

func (obj *SFTPClient) GetOnPrivateKeyNeededHandler() SFTPClientPrivateKeyNeededEvent
func (obj *SFTPClient) SetOnPrivateKeyNeededHandler(handlerFunc SFTPClientPrivateKeyNeededEvent)
```

## Remarks

The struct fires this event if the public key provided in Key was accepted by the server, but no private key is available for it.

Use this event handler to attach the private key to your Key. The component will pick the key up and continue the authentication.

# Progress Event ([SFTPClient](#sftpclient-component) Component)

Fires periodically during the data transfer.

## Syntax

*Go Syntax*

```text
// SFTPClientProgressEventArgs carries the SFTPClient Progress event's parameters.
type SFTPClientProgressEventArgs struct {...}

func (args *SFTPClientProgressEventArgs) Total() int64
func (args *SFTPClientProgressEventArgs) Current() int64
func (args *SFTPClientProgressEventArgs) Cancel() bool
func (args *SFTPClientProgressEventArgs) SetCancel(value bool)

// SFTPClientProgressEvent defines the signature of the SFTPClient Progress event's handler function.
type SFTPClientProgressEvent func(sender *SFTPClient, args *SFTPClientProgressEventArgs)

func (obj *SFTPClient) GetOnProgressHandler() SFTPClientProgressEvent
func (obj *SFTPClient) SetOnProgressHandler(handlerFunc SFTPClientProgressEvent)
```

## Remarks

Use this event to check the progress of an upload or download operation. *Total* indicates the total number of bytes to be transferred; *Current* specifies how much data has been transferred so far, and *Cancel* gives you a chance to cancel the operation.

# UnknownKeyReceived Event ([SFTPClient](#sftpclient-component) Component)

Signals that the server has introduced itself with an unknown key.

## Syntax

*Go Syntax*

```text
// SFTPClientUnknownKeyReceivedEventArgs carries the SFTPClient UnknownKeyReceived event's parameters.
type SFTPClientUnknownKeyReceivedEventArgs struct {...}

func (args *SFTPClientUnknownKeyReceivedEventArgs) Algorithm() string
func (args *SFTPClientUnknownKeyReceivedEventArgs) Bits() int32
func (args *SFTPClientUnknownKeyReceivedEventArgs) FingerprintSHA256() string
func (args *SFTPClientUnknownKeyReceivedEventArgs) Action() int32
func (args *SFTPClientUnknownKeyReceivedEventArgs) SetAction(value int32)

// SFTPClientUnknownKeyReceivedEvent defines the signature of the SFTPClient UnknownKeyReceived event's handler function.
type SFTPClientUnknownKeyReceivedEvent func(sender *SFTPClient, args *SFTPClientUnknownKeyReceivedEventArgs)

func (obj *SFTPClient) GetOnUnknownKeyReceivedHandler() SFTPClientUnknownKeyReceivedEvent
func (obj *SFTPClient) SetOnUnknownKeyReceivedHandler(handlerFunc SFTPClientUnknownKeyReceivedEvent)
```

## Remarks

The struct fires this event to tell the application that the server has introduced itself with a key not present in [TrustedKeysFile](#trustedkeysfile-property-sftpclient-component).

The details of the key are provided: *Algorithm* and *Bits* specify the key algorithm and the number of bits. *FingerprintSHA256* contains the key's fingerprint.

In this event handler, you need to make a decision whether to proceed with the connection. Use *Action* to tell the struct what it should do with the key:

|  |  |  |
| --- | --- | --- |
| catAcceptOnce | 1 | Accept the key for the current session only. |
| catAcceptPermanently | 2 | Accept the key for the current session and store the key to the trusted keys list. |
| catReject | 3 | Reject the key and close the connection. |

 Note that accepting an unknown and unchecked key may be risky.

# Config Settings ([SFTPClient](#sftpclient-component) Component)

 The struct accepts one or more of the following *configuration settings*. Configuration settings are similar in functionality to properties, but they are rarely used. In order to avoid "polluting" the property namespace of the struct, access to these *internal properties* is provided through the [Config](#config-method-sftpclient-component) method.

### SFTPClient Config Settings

**AdjustFileTimes**: Whether file times should be adjusted after upload/download.If this property value is True, file times (creation, access and last modification times) will be adjusted after upload/download operation.

**AllAlgorithms**: Returns the list of algorithms enabled in the component.Use this configuration setting to obtain the list of algorithms currently enabled in the component in the *kexinit* format.

**ASCIIMode**: Whether ASCII transfer mode is used.When this property is True, ASCII (text) transfer mode is used, otherwise the transfer is performed in binary mode.

**AvailableSpace**: Returns details of server disk space availability. This protocol extension must be supported by the server for this request to work.This config property returns the details of the server disk space. The information is provided in the form of semicolon-separated entries: BytesOnDevice, UnusedBytesOnDevice, BytesAvailableToUser, UnusedBytesAvailableToUser, BytesPerAllocationUnit. You can use this property without parameters, or provide a specific mounting point in brackets: AvailableSpace(./path).

**CaseConversion**: Whether file names and paths should be case-converted.Defines whether file names are converted (on the destination system) to: lowercase (1), uppercase (2).

**CaseSensitive**: Specifies if file paths are case-sensitive.Set this property to True if all file names, paths and file masks should be case-sensitive.

**CloseQuietly**: Controls the client's approach to session closure.The quiet closure entails the client shutting down the connection immediately without expecting graceful notifications from the other side. When closing non-quietly, the client will close the connection gradually, starting from the SSH session before proceeding to shutdown-based socket closure. Both options have their pros and cons; choose carefully the option that you want to use going forward.

**CommandTimeout**: Specifies the command timeout.Specifies the command timeout (the maximum time to expect the result from the SSH command), in milliseconds.

**CompressionAlgorithms**: Returns the list of compression algorithms enabled in the component.Use this configuration setting to get the list of compression algorithms currently enabled in the component, as a respective *kexinit* block line.

**CopyMode**: Tunes up the post-transfer action for batch uploads.Use this setting to adjust the post-transfer action for files that are uploaded or downloaded as part of a batch.

The following values are supported:

- 0 (the default setting) - no post-transfer action.
- 1 - delete each file immediately after it has been transferred to the destination system.
- 2 - delete all the original files after all the files have been transferred to the destination system.

 The difference between modes 1 and 2 is about error management. In the latter case, any (and all) files will only be deleted if the entire batch has been transferred successfully. Any transfer error that happens in the middle cancels the deletion.

In the former case, each file is deleted right after it has been transferred, independently of the outcome of transfer of other items in the batch.

Note that this setting only applies to batch (multi-file_ transfers. It has no effect on single-file transfers.

**DefaultTransferBlock**: Specifies the default transfer block size.This setting provides means to adjust the size of the SFTP transfer block (i.e. the size of the content of the write and read packets). It can be used to influence the transfer speed.

**DefOutboundBlockSize**: The default outbound block size.Use this property to configure the outbound data block size.

**DisablePacketFragmentation**: Enables or disables SSH packet fragmentation.Use this property to enable or disable SSH packet fragmentation. This is one of the settings that is worth a look if encountering unexplained transfer issues.

**EarlyIdString**: Enables the proactive approach to SSH handshake.The rule of thumb in the majority of SSH environments is for the server to initiate the handshake with its identification string (and for the client to respond). By setting this property to true you can tell the client to initiate the handshake by sending out the identification string proactively without waiting for the server to send one in. This setting may help in situations where your SSH or SFTP connection fails unexpectedly due to a timeout or network error.

**EncryptionAlgorithms**: Returns the list of encryption algorithms enabled in the component.Use this configuration setting to get the list of symmetric encryption algorithms currently enabled in the component, as a respective *kexinit* block line.

**ErrorOrigin**: Specifies whether the error is local or remote.Use this property to check where the error took place.

**ErrorSeverity**: Specifies whether the error is fatal.Use this property to check whether the error is fatal or not.

**FileHash**: Returns the hash of the specified file. This protocol extension must be supported by the server for this request to work.Use this property to request the hash of a remote file. Pass the file name in brackets: FileHash(./path/file.ext). You can adjust the hash algorithm using the HashAlgorithm configuration setting.

**HashAlgorithm**: The hash algorithm to use for the protocol operations.Specifies the hash algorithm to use for file protocol operations, such as FileHash.

**HomeDir**: Returns a user's home directory. This protocol extension must be supported by the server for this request to work.Use this property to request a specific user's home directory on the server. Provide the username in brackets: HomeDir(user2).

**IncomingSpeedLimit**: Specifies incoming speed limit.Use this property to limit the maximum number of bytes per second that client may receive. The value of 0 (zero) means "no limitation".

**KeepAlivePeriod**: The inactivity period after which a keep-alive signal will be sent.Use this property to specify tunnel inactivity period (in milliseconds) after which a keep-alive signal will be sent. The default value is 0 (no keep-alive signals).

**KexAlgorithms**: Returns the list of key exchange algorithms enabled in the component.Use this configuration setting to get the list of key exchange algorithms currently enabled in the component, as a respective *kexinit* block line.

**LocalCharset**: Charset used on the client machine.This property specifies the charset used on the local client computer.

**LocalNewLineConvention**: A character string for the end of line (EOL) indication on the local machine.This property contains a character string for the end of line (EOL) indication on the local machine.

**MacAlgorithms**: Returns the list of MAC algorithms enabled in the component.Use this configuration setting to get the list of MAC algorithms currently enabled in the component, as a respective *kexinit* block line.

**NewLineConvention**: A character string for the end of line (EOL) indication on the server.This property contains a character string for the end of line (EOL) indication used by the server. Usually its value is one of: 0x0d, 0x0d0x0a, 0x0a0x0d, or 0x0a, but it can differ for some servers.

**OutgoingSpeedLimit**: Specifies incoming speed limit.Use this property to limit the maximum number of bytes per second that client may send. The value of 0 (zero) means "no limitation".

**PreserveExistingFileTimes**: Whether original file times should be restored upon transfer.If the destination file exists and *PreserveExistingFileTimes* option is enabled, the struct will remember the file's times before transfer, and restore them after the file has been transferred. The default value is False.

**PublicKeyAlgorithms**: Returns the list of public key algorithms enabled in the component.Use this configuration setting to get the list of public key algorithms currently enabled in the component, as a respective *kexinit* block line.

**RedirectStdErr**: Whether to redirect output to StdErr.If this property is True, all output will be redirected to StdErr.

**RemoteCharset**: Charset used on the server.This property specifies the charset used on the server.

**SFTPBufferSize**: The size of internal buffer used for data transfer.Use this property to control the size of the internal buffers used for data transfer.

**SFTPServerExecutableLocations**: Location of the SFTP server executable.Specifies the location of the SFTP server executable.

**SocketRecvBufferSize**: The inbound socket buffer size.Use this property to adjust the size of the inbound socket buffer.

**SocketSendBufferSize**: The outbound socket buffer size.Use this property to adjust the size of the outbound socket buffer.

**StatVFS**: Returns VFS details. This protocol extension must be supported by the server for this request to work.This config property returns the VFS details of the server file system. The information is provided in the form of semicolon-separated entries. You can use this property without parameters, or provide a specific mounting point in brackets: StatVFS(./).

**StdErrData**: The buffer for writing StdErr data.This property represents a buffer where StdErr data is written by the struct.

**SuppressAuxTransferOps**: TBD.TBD

**TempFolder**: Returns the temporary directory offered by the server. This protocol extension must be supported by the server for this request to work.Use this property to request a path to the temporary directory maintained by the server.

**TempPath**: Path for storing temporary files.This setting specifies an absolute path to the location on disk where temporary files are stored. This setting is supported only in the Java edition for all applicable signing components except [PDFSigner](PDFSigner.md#PDFSigner), where this limitation does not apply.

**TreatZeroSizeAsUndefined**: Whether zero size returned by STAT should be considered as undefined.This property specifies if the size of zero returned by the STAT command for a particular file should be considered as undefined. It makes sense to set this property to True, because some operating systems (e.g. Unix-based) return zero size for the files of certain type. For instance, most of the files contained in the /proc directory are reported as 0-sized, while actually not being empty.

**TryPasswordAuth**: Specifies whether the component should attempt the password-based authentication if no password is set.If the Password property is not set, the component disables the password-based authentication. Set this property to true to make it try the empty password instead.

**UseStrictKeyExchange**: Specifies how strict key exchange is supported.This setting controls whether strict key exchange (strict kex) is enabled to mitigate the Terrapin attack. When enabled, the struct will indicate support for strict key exchange by automatically including the pseudo-algorithm *kex-strict-c-v00@openssh.com* for client structs and *kex-strict-s-v00@openssh.com* for server structs in the list of supported key exchange algorithms.

Since both client and server must implement strict key exchange to effectively mitigate the Terrapin attack, the struct provides options to further control the behavior in different scenarios. Possible values for this setting are:

|  |  |
| --- | --- |
| 0 | Disabled. Strict key exchange is not supported in the struct. |
| 1 (default) | Enabled, but not enforced. This setting enables strict key exchange, but if the remote host does not support strict key exchange the connection is still allowed to continue. |
| 2 | Enabled, but reject affected algorithms if the remote host does not support strict key exchange. If the remote host supports strict key exchange all algorithms may be used. If the remote host does not support strict key exchange the connection will only continue if the selected encryption and MAC algorithms are not affected by the Terrapin attack. |
| 3 | Required. If the remote host does not support strict key exchange the connection will fail. |

**UseTruncateFlagOnUpload**: whether to use the 'truncate' flag on file upload.If this property is True, the existing files are opened truncated on upload, otherwise new files are created. The default value is True.

**UseUTF8OnV3**: Whether to apply UTF-8 conversion for SFTP protocol versions 3 and lower.If this property is True, UTF-8 encoding will be applied to file names for SFTP protocol versions 3 and lower.

### Base Config Settings

**ASN1UseGlobalTagCache**: Controls whether ASN.1 module should use a global object cache.This is a performance setting. It is unlikely that you will ever need to adjust it.

**AssignSystemSmartCardPins**: Specifies whether CSP-level PINs should be assigned to CNG keys.This is a low-level tweak for certain cryptographic providers. It is unlikely that you will ever need to adjust it.

**CheckKeyIntegrityBeforeUse**: Enables or disable private key integrity check before use.This global property enables or disables private key material check before each signing operation. This slows down performance a bit, but prevents a selection of attacks on RSA keys where keys with unknown origins are used.

You can switch this property off to improve performance if your project only uses known, good private keys.

**CookieCaching**: Specifies whether a cookie cache should be used for HTTP(S) transports.Set this property to enable or disable cookies caching for the struct.

Supported values are:

|  |  |  |
| --- | --- | --- |
| off |  | No caching (default) |
| local |  | Local caching |
| global |  | Global caching |

**Cookies**: Gets or sets local cookies for the struct.Use this property to get cookies from the internal cookie storage of the struct and/or restore them back between application sessions.

**DefDeriveKeyIterations**: Specifies the default key derivation algorithm iteration count.This global property sets the default number of iterations for all supported key derivation algorithms. Note that you can provide the required number of iterations by using properties of the relevant key generation component; this global setting is used in scenarios where specific iteration count is not or cannot be provided.

**DNSLocalSuffix**: The suffix to assign for TLD names.Use this global setting to adjust the default suffix to assign to top-level domain names. The default is *.local*.

**EnableClientSideSSLFFDHE**: Enables or disables finite field DHE key exchange support in TLS clients.This global property enables or disables support for finite field DHE key exchange methods in TLS clients. FF DHE is a slower algorithm if compared to EC DHE; enabling it may result in slower connections.

This setting only applies to sessions negotiated with TLS version 1.3.

**EnableSSHMLKEM**: Enables support for ML-KEM/hybrid key exchange algorithms in SSH client and server components.Use this setting to enable hybrid key exchange algorithms in client and server SSH and SFTP components. This is a global setting that enables ML-KEM blanketly in all SSH-dependent components.

**EnableTLSMLKEM**: Enables support for ML-KEM and hybrid groups in TLS client and server components.Use this setting to enable ML-KEM and hybrid key exchange groups in client and server TLS components. This is a global setting that enables ML-KEM blanketly in all TLS-dependent components.

**GlobalCookies**: Gets or sets global cookies for all the HTTP transports.Use this property to get cookies from the GLOBAL cookie storage or restore them back between application sessions. These cookies will be used by all the structs that have its *CookieCaching* property set to "global".

**HardwareCryptoUsePolicy**: The hardware crypto usage policy.This global setting controls the hardware cryptography usage policy.

Supported Values:

|  |  |
| --- | --- |
| auto | Use hardware cryptography if available; otherwise, fall back to software-based cryptography (default). |
| enable | Always attempt to use hardware cryptography. If unavailable, exception will be thrown. |
| disable | Do not use hardware cryptography. |

**HttpUserAgent**: Specifies the user agent name to be used by all HTTP clients.This global setting defines the User-Agent field of the HTTP request provides information about the software that initiates the request. This value will be used by all the HTTP clients including the ones used internally in other structs.

**HttpVersion**: The HTTP version to use in any inner HTTP client components created.Set this property to 1.0 or 1.1 to indicate the HTTP version that any internal HTTP clients should use.

**IgnoreExpiredMSCTLSigningCert**: Whether to tolerate the expired Windows Update signing certificate.It is not uncommon for Microsoft Windows Update Certificate Trust List to be signed with an expired Microsoft certificate. Setting this global property to true makes SBB ignore the expired factor and take the Trust List into account.

**ListDelimiter**: The delimiter character for multi-element lists.Allows to set the delimiter for any multi-entry values returned by the component as a string object, such as file lists. For most of the components, this property is set to a newline sequence.

**LogDestination**: Specifies the debug log destination.Contains a comma-separated list of values that specifies where debug log should be dumped.

Supported values are:

|  |  |  |
| --- | --- | --- |
| file |  | File |
| console |  | Console |
| systemlog |  | System Log (supported for Android only) |
| debugger |  | Debugger (supported for VCL for Windows and .Net) |

**LogDetails**: Specifies the debug log details to dump.Contains a comma-separated list of values that specifies which debug log details to dump.

Supported values are:

|  |  |  |
| --- | --- | --- |
| time |  | Current time |
| level |  | Level |
| package |  | Package name |
| module |  | Module name |
| class |  | Class name |
| method |  | Method name |
| threadid |  | Thread Id |
| contenttype |  | Content type |
| content |  | Content |
| all |  | All details |

**LogFile**: Specifies the debug log filename.Use this property to provide a path to the log file.

**LogFilters**: Specifies the debug log filters.Contains a comma-separated list of value pairs ("name:value") that describe filters.

Supported filter names are:

|  |  |  |
| --- | --- | --- |
| exclude-package |  | Exclude a package specified in the value |
| exclude-module |  | Exclude a module specified in the value |
| exclude-class |  | Exclude a class specified in the value |
| exclude-method |  | Exclude a method specified in the value |
| include-package |  | Include a package specified in the value |
| include-module |  | Include a module specified in the value |
| include-class |  | Include a class specified in the value |
| include-method |  | Include a method specified in the value |

**LogFlushMode**: Specifies the log flush mode.Use this property to set the log flush mode. The following values are defined:

|  |  |  |
| --- | --- | --- |
| none |  | No flush (caching only) |
| immediate |  | Immediate flush (real-time logging) |
| maxcount |  | Flush cached entries upon reaching LogMaxEventCount entries in the cache. |

**LogLevel**: Specifies the debug log level.Use this property to provide the desired debug log level.

Supported values are:

|  |  |  |
| --- | --- | --- |
| none |  | None (by default) |
| fatal |  | Severe errors that cause premature termination. |
| error |  | Other runtime errors or unexpected conditions. |
| warning |  | Use of deprecated APIs, poor use of API, 'almost' errors, other runtime situations that are undesirable or unexpected, but not necessarily "wrong". |
| info |  | Interesting runtime events (startup/shutdown). |
| debug |  | Detailed information on flow of through the system. |
| trace |  | More detailed information. |

**LogMaxEventCount**: Specifies the maximum number of events to cache before further action is taken.Use this property to specify the log event number threshold. This threshold may have different effects, depending on the rotation setting and/or the flush mode.

The default value of this setting is 100.

**LogRotationMode**: Specifies the log rotation mode.Use this property to set the log rotation mode. The following values are defined:

|  |  |  |
| --- | --- | --- |
| none |  | No rotation |
| deleteolder |  | Delete older entries from the cache upon reaching LogMaxEventCount |
| keepolder |  | Keep older entries in the cache upon reaching LogMaxEventCount (newer entries are discarded) |

**MaxASN1BufferLength**: Specifies the maximal allowed length for ASN.1 primitive tag data.This global property limits the maximal allowed length for ASN.1 tag data for non-content-carrying structures, such as certificates, CRLs, or timestamps. It does not affect structures that can carry content, such as CMS/CAdES messages. This is a security property aiming at preventing DoS attacks.

**MaxASN1TreeDepth**: Specifies the maximal depth for processed ASN.1 trees.This global property limits the maximal depth of ASN.1 trees that the component can handle without throwing an error. This is a security property aiming at preventing DoS attacks.

**OCSPHashAlgorithm**: Specifies the hash algorithm to be used to identify certificates in OCSP requests.This global setting defines the hash algorithm to use in OCSP requests during chain validation. Some OCSP responders can only use older algorithms, in which case setting this property to SHA1 may be helpful.

**OldClientSideRSAFallback**: Specifies whether the SSH client should use a SHA1 fallback.Tells the SSH client to use a legacy ssh-rsa authentication even if the server indicates support for newer algorithms, such as rsa-sha-256. This is a backward-compatibility tweak.

**PKICache**: Specifies which PKI elements (certificates, CRLs, OCSP responses) should be cached.The PKICache setting specifies which Public Key Infrastructure (PKI) elements should be cached to optimize performance and reduce retrieval times. It supports comma-separated values to indicate the specific types of PKI data that should be cached.

Supported Values:

|  |  |
| --- | --- |
| certificate | Enables caching of certificates. |
| crl | Enables caching of Certificate Revocation Lists (CRLs). |
| ocsp | Enables caching of OCSP (Online Certificate Status Protocol) responses. |

Example (default value):

```text
PKICache=certificate,crl,ocsp
```

 In this example, the component caches certificates, CRLs, and OCSP responses.

**PKICachePath**: Specifies the file system path where cached PKI data is stored.The PKICachePath setting defines the file system path where cached PKI data (e.g., certificates, CRLs, OCSP responses and Trusted Lists) will be stored. This allows the system to persistently save and retrieve PKI cache data, even across application restarts.

The default value is an empty string - no cached PKI data is stored on disk.

Example:

```text
PKICachePath=C:\Temp\cache
```

 In this example, the cached PKI data is stored in the C:\Temp\cache directory.

**ProductVersion**: Returns the version of the SecureBlackbox library.This property returns the long version string of the SecureBlackbox library being used (major.minor.build.revision).

**ServerSSLDHKeyLength**: Sets the size of the TLS DHE key exchange group.Use this property to adjust the length, in bits, of the DHE prime to be used by the TLS server.

**StaticDNS**: Specifies whether static DNS rules should be used.Set this property to enable or disable static DNS rules for the struct. Works only if *UseOwnDNSResolver* is set to *true*.

Supported values are:

|  |  |  |
| --- | --- | --- |
| none |  | No static DNS rules (default) |
| local |  | Local static DNS rules |
| global |  | Global static DNS rules |

**StaticIPAddress[domain]**: Gets or sets an IP address for the specified domain name.Use this property to get or set an IP address for the specified domain name in the internal (of the struct) or global DNS rules storage depending on the *StaticDNS* value. The type of the IP address (IPv4 or IPv6) is determined automatically. If both addresses are available, they are divided by the | (pipe) character.

**StaticIPAddresses**: Gets or sets all the static DNS rules.Use this property to get static DNS rules from the current rules storage or restore them back between application sessions. If *StaticDNS* of the struct is set to "*local*", the property returns/restores the rules from/to the internal storage of the struct. If *StaticDNS* of the struct is set to "*global*", the property returns/restores the rules from/to the GLOBAL storage. The rules list is returned and accepted in JSON format.

**Tag**: Allows to store any custom data.Use this config property to store any custom data.

**TLSSessionGroup**: Specifies the group name of TLS sessions to be used for session resumption.Use this property to limit the search of cached TLS sessions to the specified group. Sessions from other groups will be ignored. By default, all sessions are cached with an empty group name and available to all the structs.

**TLSSessionLifetime**: Specifies lifetime in seconds of the cached TLS session.Use this property to specify how much time the TLS session should be kept in the session cache. After this time, the session expires and will be automatically removed from the cache. Default value is 300 seconds (5 minutes).

**TLSSessionPurgeInterval**: Specifies how often the session cache should remove the expired TLS sessions.Use this property to specify the time interval of purging the expired TLS sessions from the session cache. Default value is 60 seconds (1 minute).

**UseCRLObjectCaching**: Specifies whether reuse of loaded CRL objects is enabled.This setting enables or disables the caching of CRL objects. When set to true (the default value), the system checks if a CRL object is already loaded in memory before attempting to load a new instance. If the object is found, the existing instance is reused, and its reference count is incremented to track its usage. When the reference count reaches zero, indicating that no references to the object remain, the system will free the object from memory. This setting enhances performance by minimizing unnecessary object instantiation and promotes efficient memory management, particularly in scenarios where CRL objects are frequently used.

**UseInternalRandom**: Switches between SecureBlackbox-own and platform PRNGs.Allows to switch between internal/native PRNG implementation and the one provided by the platform.

**UseLegacyAdESValidation**: Enables legacy AdES validation mode.Use this setting to switch the AdES component to the validation approach that was used in SBB 2020/SBB 2022 (less attention to temporal details).

**UseOCSPResponseObjectCaching**: Specifies whether reuse of loaded OCSP response objects is enabled.This setting enables or disables the caching of OCSP response objects. When set to true (the default value), the system checks if a OCSP response object is already loaded in memory before attempting to load a new instance. If the object is found, the existing instance is reused, and its reference count is incremented to track its usage. When the reference count reaches zero, indicating that no references to the object remain, the system will free the object from memory. This setting enhances performance by minimizing unnecessary object instantiation and promotes efficient memory management, particularly in scenarios where OCSP response objects are frequently used.

**UseOwnDNSResolver**: Specifies whether the client components should use own DNS resolver.Set this global property to false to force all the client components to use the DNS resolver provided by the target OS instead of using own one.

**UseSharedSystemStorages**: Specifies whether the validation engine should use a global per-process copy of the system certificate stores.Set this global property to false to make each validation run use its own copy of system certificate stores.

**UseSystemNativeSizeCalculation**: An internal CryptoAPI access tweak.This is an internal setting. Please do not use it unless instructed by the support team.

**UseSystemOAEPAndPSS**: Enforces or disables the use of system-driven RSA OAEP and PSS computations.This global setting defines who is responsible for performing RSA-OAEP and RSA-PSS computations where the private key is stored in a Windows system store and is exportable. If set to true, SBB will delegate the computations to Windows via a CryptoAPI call. Otherwise, it will export the key material and perform the computations using its own OAEP/PSS implementation.

This setting only applies to certificates originating from a Windows system store.

**UseSystemRandom**: Enables or disables the use of the OS PRNG.Use this global property to enable or disable the use of operating system-driven pseudorandom number generation.

**XMLRDNDescriptorName[OID]**: Defines an OID mapping to descriptor names for the certificate's IssuerRDN or SubjectRDN.This property defines custom mappings between Object Identifiers (OIDs) and descriptor names. This mapping specifies how the certificate's issuer and subject information (ds:IssuerRDN and ds:SubjectRDN elements respectively) are represented in XML signatures.

The property accepts comma-separated values where the first descriptor name is used when the OID is mapped, and subsequent values act as aliases for parsing.

Syntax:

```text
Config("XMLRDNDescriptorName[OID]=PrimaryName,Alias1,Alias2");
```

Where:

OID: The Object Identifier from the certificate's IssuerRDN or SubjectRDN that you want to map.

PrimaryName: The main descriptor name used in the XML signature when the OID is encountered.

Alias1, Alias2, ...: Optional alternative names recognized during parsing.

Usage Examples:

Map OID 2.5.4.5 to SERIALNUMBER:

```text
Config("XMLRDNDescriptorName[2.5.4.5]=SERIALNUMBER");
```

Map OID 1.2.840.113549.1.9.1 to E, with aliases EMAIL and EMAILADDRESS:

```text
Config("XMLRDNDescriptorName[1.2.840.113549.1.9.1]=E,EMAIL,EMAILADDRESS");
```

**XMLRDNDescriptorPriority[OID]**: Specifies the priority of descriptor names associated with a specific OID.This property specifies the priority of descriptor names associated with a specific OID that allows to reorder descriptors in the ds:IssuerRDN and ds:SubjectRDN elements during signing.

**XMLRDNDescriptorReverseOrder**: Specifies whether to reverse the order of descriptors in RDN.Specifies whether to reverse the order of descriptors in the ds:IssuerRDN and ds:SubjectRDN elements during XML signing. By default, this property is set to true (as specified in RFC 2253, 2.1).

**XMLRDNDescriptorSeparator**: Specifies the separator used between descriptors in RDN.Specifies the separator used between descriptors in the ds:IssuerRDN and ds:SubjectRDN elements during XML signing. By default, this property is set to ", " value.

# Trappable Errors ([SFTPClient](#sftpclient-component) Component)

### SFTPClient Errors

|  |  |
| --- | --- |
| 1048577 | Invalid parameter ([SB_ERROR_INVALID_PARAMETER](constants.md#const_SBERRORINVALIDPARAMETER)) |
| 1048578 | Invalid configuration ([SB_ERROR_INVALID_SETUP](constants.md#const_SBERRORINVALIDSETUP)) |
| 1048579 | Invalid state ([SB_ERROR_INVALID_STATE](constants.md#const_SBERRORINVALIDSTATE)) |
| 1048580 | Invalid value ([SB_ERROR_INVALID_VALUE](constants.md#const_SBERRORINVALIDVALUE)) |
| 1048581 | Private key not found ([SB_ERROR_NO_PRIVATE_KEY](constants.md#const_SBERRORNOPRIVATEKEY)) |
| 1048582 | Cancelled by the user ([SB_ERROR_CANCELLED_BY_USER](constants.md#const_SBERRORCANCELLEDBYUSER)) |
| 1048583 | The file was not found ([SB_ERROR_NO_SUCH_FILE](constants.md#const_SBERRORNOSUCHFILE)) |
| 1048584 | Unsupported feature or operation ([SB_ERROR_UNSUPPORTED_FEATURE](constants.md#const_SBERRORUNSUPPORTEDFEATURE)) |
| 1048585 | General error ([SB_ERROR_GENERAL_ERROR](constants.md#const_SBERRORGENERALERROR)) |
| 31457281 | Unsupported file operation ([SB_ERROR_SFTP_UNSUPPORTED_FILE_OPERATION](constants.md#const_SBERRORSFTPUNSUPPORTEDFILEOPERATION)) |
| 31457282 | Invalid authentication type ([SB_ERROR_SFTP_INVALID_AUTH_TYPE](constants.md#const_SBERRORSFTPINVALIDAUTHTYPE)) |
