SFTPServer Class
Properties Methods Events Config Settings Errors
The SFTPServer class provides server-side functionality for SFTP connections.
Syntax
SFTPServer
Remarks
SFTPServer is an implementation for SSH File Transfer Protocol server. It works over a secure SSH channel, and should not be confused with the FTP/FTPS protocol.
Property List
The following is the full list of the properties of the class with short descriptions. Click on the links for further details.
Active | Specifies whether the SFTP server has started and ready to accept connections. |
AuthTypes | Defines allowed authentication types. |
BaseDir | Specifies the server's base (root) directory. |
ClientFileEntryATime | Contains the last access time for this file, in UTC. |
ClientFileEntryCTime | Contains this file's creation time, in UTC. |
ClientFileEntryDirectory | Specifies whether this entry is a directory. |
ClientFileEntryFileType | Specifies the type of this entry, one of the following: cftFile 0 cftDirectory 1 cftSymblink 2 cftSpecial 3 cftUnknown 4 cftSocket 5 cftCharDevice 6 cftBlockDevice 7 cftFIFO 8 . |
ClientFileEntryGroupExecute | Controls file execution permission for the group users. |
ClientFileEntryGroupRead | Controls file read permission for the group users. |
ClientFileEntryGroupWrite | Controls file write permission for the group users. |
ClientFileEntryHandle | Allows to get or set a 'handle', a unique identifier of the underlying property object. |
ClientFileEntryLongName | Contains the long name of the file (human-readable, ftp-like). |
ClientFileEntryMTime | Specifies the last modification time, in UTC. |
ClientFileEntryName | Specifies the file name. |
ClientFileEntryOtherExecute | Controls file execution permission for other users (users that are neither owners, nor belong to the same group). |
ClientFileEntryOtherRead | Controls file read permission for other users (users that are neither owners, nor belong to the same group). |
ClientFileEntryOtherWrite | Controls file write permission for other users (users that are neither owners, nor belong to the same group). |
ClientFileEntryOwner | Specifies the owner of the file/directory. |
ClientFileEntryPath | Contains the full path to the file. |
ClientFileEntrySize | The size of the file in bytes. |
ClientFileEntryUserExecute | Controls file execution permission for the file owner. |
ClientFileEntryUserRead | Controls file read permission for the file owner. |
ClientFileEntryUserWrite | Controls file write permission for the file owner. |
CompressionLevel | Specifies the preferable compression level. |
ExternalCryptoAsyncDocumentID | Specifies an optional document ID for SignAsyncBegin() and SignAsyncEnd() calls. |
ExternalCryptoCustomParams | Custom parameters to be passed to the signing service (uninterpreted). |
ExternalCryptoData | Additional data to be included in the async state and mirrored back by the requestor. |
ExternalCryptoExternalHashCalculation | Specifies whether the message hash is to be calculated at the external endpoint. |
ExternalCryptoHashAlgorithm | Specifies the request's signature hash algorithm. |
ExternalCryptoKeyID | The ID of the pre-shared key used for DC request authentication. |
ExternalCryptoKeySecret | The pre-shared key used for DC request authentication. |
ExternalCryptoMethod | Specifies the asynchronous signing method. |
ExternalCryptoMode | Specifies the external cryptography mode. |
ExternalCryptoPublicKeyAlgorithm | Provide the public key algorithm here if the certificate is not available on the pre-signing stage. |
FIPSMode | Reserved. |
ForceCompression | This property specifies whether server explicitly requires data compression. |
Host | Specifies server's host name. |
KeyFingerprintSHA1 | Contains the SHA-1 fingerprint (hash) of the key. |
KeyFingerprintSHA256 | Contains the SHA-256 fingerprint (hash) of the key. |
KeyHandle | Allows to get or set a 'handle', a unique identifier of the underlying property object. |
MaxSFTPVersion | Maximum SFTP version supported. |
MinSFTPVersion | Minimum SFTP version supported. |
PinnedClientAddress | The client's IP address. |
PinnedClientClientKeyAlgorithm | Specifies the client's key algorithm. |
PinnedClientClientKeyBits | Specifies the length of the client's key. |
PinnedClientClientKeyFingerprint | The fingerprint (hash value) of the client's public key. |
PinnedClientClientSoftwareName | Returns the name of the SSH software running on the client side. |
PinnedClientCloseReason | Contains the line sent by the client just before closing the connection. |
PinnedClientCompressionAlgorithmInbound | Compression algorithm for the incoming traffic. |
PinnedClientCompressionAlgorithmOutbound | Compression algorithm for the outgoing traffic. |
PinnedClientEncryptionAlgorithmInbound | Encryption algorithm for the incoming traffic. |
PinnedClientEncryptionAlgorithmOutbound | Encryption algorithm for the outgoing traffic. |
PinnedClientID | The client connection's unique identifier. |
PinnedClientInboundEncryptionKeyBits | Specifies the length of the key used to encrypt the incoming traffic. |
PinnedClientKexAlgorithm | The key exchange algorithm used during the SSH handshake. |
PinnedClientKexBits | The number of bits used by the key exchange algorithm. |
PinnedClientKexLines | The contents of the received KexInit packet. |
PinnedClientMacAlgorithmInbound | MAC algorithm used for the incoming connection. |
PinnedClientMacAlgorithmOutbound | MAC algorithm used for outbound connection. |
PinnedClientOutboundEncryptionKeyBits | Specifies the length of the key used to encrypt the outgoing traffic. |
PinnedClientPort | The remote port of the client connection. |
PinnedClientPublicKeyAlgorithm | Specifies the public key algorithm which was used during the SSH handshake. |
PinnedClientServerKeyBits | Specifies the number of bits in the server's key. |
PinnedClientServerKeyFingerprint | The fingerprint (hash value) of the server's public key. |
PinnedClientTotalBytesReceived | Returns the total number of bytes received over this connection. |
PinnedClientTotalBytesSent | Returns the total number of bytes sent over this connection. |
PinnedClientVersion | Specifies SSH protocol version. |
Port | Specifies the listening port number. |
ReadOnly | Specifies whether files on the server are read-only. |
ServerKeyCount | The number of records in the ServerKey arrays. |
ServerKeyAlgorithm | Specifies the key algorithm. |
ServerKeyBits | The number of bits in the key: the more the better, 2048 or 4096 are typical values. |
ServerKeyFingerprintMD5 | Contains the MD5 fingerprint (hash) of the key. |
ServerKeyFingerprintSHA1 | Contains the SHA-1 fingerprint (hash) of the key. |
ServerKeyHandle | Allows to get or set a 'handle', a unique identifier of the underlying property object. |
SocketIncomingSpeedLimit | The maximum number of bytes to read from the socket, per second. |
SocketLocalAddress | The local network interface to bind the socket to. |
SocketLocalPort | The local port number to bind the socket to. |
SocketOutgoingSpeedLimit | The maximum number of bytes to write to the socket, per second. |
SocketTimeout | The maximum period of waiting, in milliseconds, after which the socket operation is considered unsuccessful. |
SocketUseIPv6 | Enables or disables IP protocol version 6. |
SSHSettingsAutoAdjustCiphers | 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 | Allows to choose base configuration of SSH settings, tuned up for different purposes such as high security or higher compatibility. |
SSHSettingsCompressionAlgorithms | A list of session compression algorithms separated with commas or semicolons. |
SSHSettingsCompressionLevel | Possible values for the Compression Level range from 0 (minimum compression) to 9 (maximum compression). |
SSHSettingsDefaultWindowSize | 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 | A list of session encryption algorithms separated with commas or semicolons. |
SSHSettingsForceCompression | Whether the SSH client should explicitly request compression. |
SSHSettingsGSSAuthTypes | A comma-separated list of authentication types. |
SSHSettingsGSSDelegateCreds | Switches credential delegation on or off. |
SSHSettingsGSSHostname | The GSS host name, in form of a FQDN (e. |
SSHSettingsGSSLib | A path to the GSS-API library (DLL or SO). |
SSHSettingsGSSMechanisms | A comma-separated list of GSS mechanisms to use. |
SSHSettingsGSSProtocols | A comma-separated list of SSPI protocols. |
SSHSettingsHandshakeTimeout | Specifies the maximal time for the SSH handshake to proceed, in seconds. |
SSHSettingsKexAlgorithms | A list of key exchange algorithms separated with commas or semicolons. |
SSHSettingsMacAlgorithms | A list of MAC (for message authentication code ) algorithms separated with commas or semicolons. |
SSHSettingsMaxSSHPacketSize | Specifies the maximum length of one SSH packet in bytes. |
SSHSettingsMinWindowSize | Specifies the minimal internal window size. |
SSHSettingsObfuscateHandshake | Enables or disables handshake obfuscation. |
SSHSettingsObfuscationPassword | Specifies the password used to encrypt the handshake when ObfuscateHandshake is set. |
SSHSettingsPublicKeyAlgorithms | A list of public key algorithms separated with commas or semicolons. |
SSHSettingsRequestPasswordChange | Whether to request a password change when connecting. |
SSHSettingsSoftwareName | The name to be used by the class to identify itself. |
SSHSettingsTrustAllKeys | Enables or disables explicit trust to all server keys. |
SSHSettingsUseAuthAgent | Enables or disables the use of external key agent, such as Putty key agent. |
SSHSettingsVersions | Specifies enabled SSH protocol versions (1 or 2). |
UserCount | The number of records in the User arrays. |
UserAssociatedData | Contains the user's Associated Data when SSH AEAD (Authenticated Encryption with Associated Data) algorithm is used. |
UserBasePath | Base path for this user in the server's file system. |
UserCert | Contains the user's certificate. |
UserData | Contains uninterpreted user-defined data that should be associated with the user account, such as comments or custom settings. |
UserHandle | Allows to get or set a 'handle', a unique identifier of the underlying property object. |
UserHashAlgorithm | Specifies the hash algorithm used to generate TOTP (Time-based One-Time Passwords) passwords for this user. |
UserIncomingSpeedLimit | Specifies the incoming speed limit for this user. |
UserOtpAlgorithm | The algorithm used to generate one-time passwords (OTP) for this user, either HOTP (Hash-based OTP) or TOTP (Time-based OTP). |
UserOtpValue | The user's time interval (TOTP) or Counter (HOTP). |
UserOutgoingSpeedLimit | Specifies the outgoing speed limit for this user. |
UserPassword | The user's authentication password. |
UserPasswordLen | Specifies the length of the user's OTP password. |
UserSharedSecret | Contains the user's secret key, which is essentially a shared secret between the client and server. |
UserSSHKey | Contains the user's SSH key. |
UserUsername | The registered name (login) of the user. |
UseUTF8 | Specifies whether UTF8 conversion is to be used when parsing file names. |
Method List
The following is the full list of the methods of the class with short descriptions. Click on the links for further details.
Config | Sets or retrieves a configuration setting. |
DoAction | Performs an additional action. |
DropClient | Terminates a client connection. |
GetClientBuffer | Acquires a piece of operation data. |
GetClientFileEntry | Acquires file entry details from the class. |
ListClients | Enumerates the connected clients. |
PinClient | Takes a snapshot of the connection's properties. |
SetClientBuffer | Commits a data buffer to the server class. |
SetClientFileEntry | Commits the file entry details to the class. |
Start | Starts SFTP server operation. |
Stop | Stops SFTP server. |
Event List
The following is the full list of the events fired by the class with short descriptions. Click on the links for further details.
Accept | This event is fired when new incoming connection is accepted. |
AfterCreateDirectory | This event indicates completion of directory creation request. |
AfterRemove | This event indicates completion of file removal request. |
AfterRenameFile | This event indicates completion of a file rename operation. |
AfterRequestAttributes | This event indicates completion of file attributes request. |
AfterSetAttributes | This event indicates completion of a set attributes request. |
AuthAttempt | Reports a user authentication attempt. |
AuthFailed | Reports user authentication failure. |
AuthPassword | This event is fired on password authentication attempt from a client. |
AuthPublicKey | This event is fired on public key authentication attempt from a client. |
AuthSucceeded | Reports a successful user authentication. |
BeforeCreateDirectory | This event is fired when a client requests to create a directory. |
BeforeDownloadFile | This event is fired when a download file request is received. |
BeforeFind | This event is fired when a client requests to find files and folders in Path. |
BeforeRemove | This event is fired when a client requests to delete a file or directory. |
BeforeRenameFile | This event is fired when a client requests to rename a file. |
BeforeRequestAttributes | This event is fired when a client requests to get file attributes. |
BeforeSetAttributes | This event is fired when a client requests to set file attributes. |
BeforeUploadFile | This event is fired when an upload file request is received. |
CloseFile | This event instructs the application to close an opened file. |
Connect | This event is fired when a remote connection has been established. |
CreateDirectory | This event instructs the application to create a directory. |
Disconnect | This event is fired when a client has disconnected. |
Error | Information about errors during data delivery. |
ExternalSign | Handles remote or external signing initiated by the server protocol. |
FindClose | This event signifies the completion of a custom file listing operation. |
FindFirst | This event signifies the start of the custom file listing retrieval mechanism. |
FindNext | This event retrieves the next entry of a custom file listing. |
Notification | This event notifies the application about an underlying control flow event. |
OpenFile | This event instructs the application to handle the file open request. |
ReadFile | This event is fired when a file read request is received. |
Remove | This event is fired when a client requests to delete a file or directory. |
RenameFile | This event is fired when a client requests to rename a file. |
RequestAttributes | This event is fired when a get file attributes request is received. |
SessionClosed | Reports session closure. |
SessionEstablished | This event is fired when a new session is established. |
SetAttributes | This event is fired when an set file attributes request is received. |
TranslatePath | This event is fired when a client requests the server to translate a path to its absolute form. |
WriteFile | This event is fired when a file write request is received. |
Config Settings
The following is a list of config settings for the class with short descriptions. Click on the links for further details.
AuthMode | Controls dual/multi-type authentication mode. |
CustomDHGroupIndex | Sets a specific Diffie-Hellman group index to enforce. |
DualStack | Allows the use of ip4 and ip6 simultaneously. |
MaxDHGroupSize | Sets the maximal Diffie-Hellman group size. |
MinDHGroupSize | Sets the minimal Diffie-Hellman group size. |
NotifyOnFileOperations | Enables low-level file operation notifications. |
UseStrictKeyExchange | Specifies how strict key exchange is supported. |
CheckKeyIntegrityBeforeUse | Enables or disable private key integrity check before use. |
CookieCaching | Specifies whether a cookie cache should be used for HTTP(S) transports. |
Cookies | Gets or sets local cookies for the class. |
DefDeriveKeyIterations | Specifies the default key derivation algorithm iteration count. |
EnableClientSideSSLFFDHE | Enables or disables finite field DHE key exchange support in TLS clients. |
GlobalCookies | Gets or sets global cookies for all the HTTP transports. |
HttpUserAgent | Specifies the user agent name to be used by all HTTP clients. |
LogDestination | Specifies the debug log destination. |
LogDetails | Specifies the debug log details to dump. |
LogFile | Specifies the debug log filename. |
LogFilters | Specifies the debug log filters. |
LogFlushMode | Specifies the log flush mode. |
LogLevel | Specifies the debug log level. |
LogMaxEventCount | Specifies the maximum number of events to cache before further action is taken. |
LogRotationMode | Specifies the log rotation mode. |
MaxASN1BufferLength | Specifies the maximal allowed length for ASN.1 primitive tag data. |
MaxASN1TreeDepth | Specifies the maximal depth for processed ASN.1 trees. |
OCSPHashAlgorithm | Specifies the hash algorithm to be used to identify certificates in OCSP requests. |
StaticDNS | Specifies whether static DNS rules should be used. |
StaticIPAddress[domain] | Gets or sets an IP address for the specified domain name. |
StaticIPAddresses | Gets or sets all the static DNS rules. |
Tag | Allows to store any custom data. |
TLSSessionGroup | Specifies the group name of TLS sessions to be used for session resumption. |
TLSSessionLifetime | Specifies lifetime in seconds of the cached TLS session. |
TLSSessionPurgeInterval | Specifies how often the session cache should remove the expired TLS sessions. |
UseOwnDNSResolver | Specifies whether the client classes should use own DNS resolver. |
UseSharedSystemStorages | Specifies whether the validation engine should use a global per-process copy of the system certificate stores. |
UseSystemOAEPAndPSS | Enforces or disables the use of system-driven RSA OAEP and PSS computations. |
UseSystemRandom | Enables or disables the use of the OS PRNG. |
Active Property (SFTPServer Class)
Specifies whether the SFTP server has started and ready to accept connections.
Syntax
ANSI (Cross Platform) int GetActive(); Unicode (Windows) BOOL GetActive();
int secureblackbox_sftpserver_getactive(void* lpObj);
bool GetActive();
Default Value
FALSE
Remarks
Check this property to find out whether the SFTP server is in active mode. Use Start and Stop methods to activate or deactivate the server.
This property is read-only and not available at design time.
Data Type
Boolean
AuthTypes Property (SFTPServer Class)
Defines allowed authentication types.
Syntax
ANSI (Cross Platform) int GetAuthTypes();
int SetAuthTypes(int iAuthTypes); Unicode (Windows) INT GetAuthTypes();
INT SetAuthTypes(INT iAuthTypes);
int secureblackbox_sftpserver_getauthtypes(void* lpObj);
int secureblackbox_sftpserver_setauthtypes(void* lpObj, int iAuthTypes);
int GetAuthTypes();
int SetAuthTypes(int iAuthTypes);
Default Value
30
Remarks
Use this property to define which authentication types are allowed on the server, set of
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 |
Data Type
Integer
BaseDir Property (SFTPServer Class)
Specifies the server's base (root) directory.
Syntax
ANSI (Cross Platform) char* GetBaseDir();
int SetBaseDir(const char* lpszBaseDir); Unicode (Windows) LPWSTR GetBaseDir();
INT SetBaseDir(LPCWSTR lpszBaseDir);
char* secureblackbox_sftpserver_getbasedir(void* lpObj);
int secureblackbox_sftpserver_setbasedir(void* lpObj, const char* lpszBaseDir);
QString GetBaseDir();
int SetBaseDir(QString qsBaseDir);
Default Value
""
Remarks
Use this property to set the base (root) directory on the server.
Data Type
String
ClientFileEntryATime Property (SFTPServer Class)
Contains the last access time for this file, in UTC.
Syntax
ANSI (Cross Platform) char* GetClientFileEntryATime();
int SetClientFileEntryATime(const char* lpszClientFileEntryATime); Unicode (Windows) LPWSTR GetClientFileEntryATime();
INT SetClientFileEntryATime(LPCWSTR lpszClientFileEntryATime);
char* secureblackbox_sftpserver_getclientfileentryatime(void* lpObj);
int secureblackbox_sftpserver_setclientfileentryatime(void* lpObj, const char* lpszClientFileEntryATime);
QString GetClientFileEntryATime();
int SetClientFileEntryATime(QString qsClientFileEntryATime);
Default Value
""
Remarks
Contains the last access time for this file, in UTC.
This property is not available at design time.
Data Type
String
ClientFileEntryCTime Property (SFTPServer Class)
Contains this file's creation time, in UTC.
Syntax
ANSI (Cross Platform) char* GetClientFileEntryCTime();
int SetClientFileEntryCTime(const char* lpszClientFileEntryCTime); Unicode (Windows) LPWSTR GetClientFileEntryCTime();
INT SetClientFileEntryCTime(LPCWSTR lpszClientFileEntryCTime);
char* secureblackbox_sftpserver_getclientfileentryctime(void* lpObj);
int secureblackbox_sftpserver_setclientfileentryctime(void* lpObj, const char* lpszClientFileEntryCTime);
QString GetClientFileEntryCTime();
int SetClientFileEntryCTime(QString qsClientFileEntryCTime);
Default Value
""
Remarks
Contains this file's creation time, in UTC.
This property is not available at design time.
Data Type
String
ClientFileEntryDirectory Property (SFTPServer Class)
Specifies whether this entry is a directory.
Syntax
ANSI (Cross Platform) int GetClientFileEntryDirectory();
int SetClientFileEntryDirectory(int bClientFileEntryDirectory); Unicode (Windows) BOOL GetClientFileEntryDirectory();
INT SetClientFileEntryDirectory(BOOL bClientFileEntryDirectory);
int secureblackbox_sftpserver_getclientfileentrydirectory(void* lpObj);
int secureblackbox_sftpserver_setclientfileentrydirectory(void* lpObj, int bClientFileEntryDirectory);
bool GetClientFileEntryDirectory();
int SetClientFileEntryDirectory(bool bClientFileEntryDirectory);
Default Value
FALSE
Remarks
Specifies whether this entry is a directory.
This property is not available at design time.
Data Type
Boolean
ClientFileEntryFileType Property (SFTPServer Class)
Specifies the type of this entry, one of the following: cftFile 0 cftDirectory 1 cftSymblink 2 cftSpecial 3 cftUnknown 4 cftSocket 5 cftCharDevice 6 cftBlockDevice 7 cftFIFO 8 .
Syntax
ANSI (Cross Platform) int GetClientFileEntryFileType();
int SetClientFileEntryFileType(int iClientFileEntryFileType); Unicode (Windows) INT GetClientFileEntryFileType();
INT SetClientFileEntryFileType(INT iClientFileEntryFileType);
Possible Values
CFT_FILE(0),
CFT_DIRECTORY(1),
CFT_SYMBLINK(2),
CFT_SPECIAL(3),
CFT_UNKNOWN(4),
CFT_SOCKET(5),
CFT_CHAR_DEVICE(6),
CFT_BLOCK_DEVICE(7),
CFT_FIFO(8)
int secureblackbox_sftpserver_getclientfileentryfiletype(void* lpObj);
int secureblackbox_sftpserver_setclientfileentryfiletype(void* lpObj, int iClientFileEntryFileType);
int GetClientFileEntryFileType();
int SetClientFileEntryFileType(int iClientFileEntryFileType);
Default Value
4
Remarks
Specifies the type of this entry, one of the following:
cftFile | 0 | |
cftDirectory | 1 | |
cftSymblink | 2 | |
cftSpecial | 3 | |
cftUnknown | 4 | |
cftSocket | 5 | |
cftCharDevice | 6 | |
cftBlockDevice | 7 | |
cftFIFO | 8 |
This property is not available at design time.
Data Type
Integer
ClientFileEntryGroupExecute Property (SFTPServer Class)
Controls file execution permission for the group users.
Syntax
ANSI (Cross Platform) int GetClientFileEntryGroupExecute();
int SetClientFileEntryGroupExecute(int bClientFileEntryGroupExecute); Unicode (Windows) BOOL GetClientFileEntryGroupExecute();
INT SetClientFileEntryGroupExecute(BOOL bClientFileEntryGroupExecute);
int secureblackbox_sftpserver_getclientfileentrygroupexecute(void* lpObj);
int secureblackbox_sftpserver_setclientfileentrygroupexecute(void* lpObj, int bClientFileEntryGroupExecute);
bool GetClientFileEntryGroupExecute();
int SetClientFileEntryGroupExecute(bool bClientFileEntryGroupExecute);
Default Value
FALSE
Remarks
Controls file execution permission for the group users.
This property is not available at design time.
Data Type
Boolean
ClientFileEntryGroupRead Property (SFTPServer Class)
Controls file read permission for the group users.
Syntax
ANSI (Cross Platform) int GetClientFileEntryGroupRead();
int SetClientFileEntryGroupRead(int bClientFileEntryGroupRead); Unicode (Windows) BOOL GetClientFileEntryGroupRead();
INT SetClientFileEntryGroupRead(BOOL bClientFileEntryGroupRead);
int secureblackbox_sftpserver_getclientfileentrygroupread(void* lpObj);
int secureblackbox_sftpserver_setclientfileentrygroupread(void* lpObj, int bClientFileEntryGroupRead);
bool GetClientFileEntryGroupRead();
int SetClientFileEntryGroupRead(bool bClientFileEntryGroupRead);
Default Value
FALSE
Remarks
Controls file read permission for the group users.
This property is not available at design time.
Data Type
Boolean
ClientFileEntryGroupWrite Property (SFTPServer Class)
Controls file write permission for the group users.
Syntax
ANSI (Cross Platform) int GetClientFileEntryGroupWrite();
int SetClientFileEntryGroupWrite(int bClientFileEntryGroupWrite); Unicode (Windows) BOOL GetClientFileEntryGroupWrite();
INT SetClientFileEntryGroupWrite(BOOL bClientFileEntryGroupWrite);
int secureblackbox_sftpserver_getclientfileentrygroupwrite(void* lpObj);
int secureblackbox_sftpserver_setclientfileentrygroupwrite(void* lpObj, int bClientFileEntryGroupWrite);
bool GetClientFileEntryGroupWrite();
int SetClientFileEntryGroupWrite(bool bClientFileEntryGroupWrite);
Default Value
FALSE
Remarks
Controls file write permission for the group users.
This property is not available at design time.
Data Type
Boolean
ClientFileEntryHandle Property (SFTPServer Class)
Allows to get or set a 'handle', a unique identifier of the underlying property object.
Syntax
ANSI (Cross Platform) int64 GetClientFileEntryHandle();
int SetClientFileEntryHandle(int64 lClientFileEntryHandle); Unicode (Windows) LONG64 GetClientFileEntryHandle();
INT SetClientFileEntryHandle(LONG64 lClientFileEntryHandle);
int64 secureblackbox_sftpserver_getclientfileentryhandle(void* lpObj);
int secureblackbox_sftpserver_setclientfileentryhandle(void* lpObj, int64 lClientFileEntryHandle);
qint64 GetClientFileEntryHandle();
int SetClientFileEntryHandle(qint64 lClientFileEntryHandle);
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.
pdfSigner.setSigningCertHandle(certMgr.getCertHandle());
This property is not available at design time.
Data Type
Long64
ClientFileEntryLongName Property (SFTPServer Class)
Contains the long name of the file (human-readable, ftp-like).
Syntax
ANSI (Cross Platform) char* GetClientFileEntryLongName();
int SetClientFileEntryLongName(const char* lpszClientFileEntryLongName); Unicode (Windows) LPWSTR GetClientFileEntryLongName();
INT SetClientFileEntryLongName(LPCWSTR lpszClientFileEntryLongName);
char* secureblackbox_sftpserver_getclientfileentrylongname(void* lpObj);
int secureblackbox_sftpserver_setclientfileentrylongname(void* lpObj, const char* lpszClientFileEntryLongName);
QString GetClientFileEntryLongName();
int SetClientFileEntryLongName(QString qsClientFileEntryLongName);
Default Value
""
Remarks
Contains the long name of the file (human-readable, ftp-like).
This property is not available at design time.
Data Type
String
ClientFileEntryMTime Property (SFTPServer Class)
Specifies the last modification time, in UTC.
Syntax
ANSI (Cross Platform) char* GetClientFileEntryMTime();
int SetClientFileEntryMTime(const char* lpszClientFileEntryMTime); Unicode (Windows) LPWSTR GetClientFileEntryMTime();
INT SetClientFileEntryMTime(LPCWSTR lpszClientFileEntryMTime);
char* secureblackbox_sftpserver_getclientfileentrymtime(void* lpObj);
int secureblackbox_sftpserver_setclientfileentrymtime(void* lpObj, const char* lpszClientFileEntryMTime);
QString GetClientFileEntryMTime();
int SetClientFileEntryMTime(QString qsClientFileEntryMTime);
Default Value
""
Remarks
Specifies the last modification time, in UTC.
This property is not available at design time.
Data Type
String
ClientFileEntryName Property (SFTPServer Class)
Specifies the file name.
Syntax
ANSI (Cross Platform) char* GetClientFileEntryName();
int SetClientFileEntryName(const char* lpszClientFileEntryName); Unicode (Windows) LPWSTR GetClientFileEntryName();
INT SetClientFileEntryName(LPCWSTR lpszClientFileEntryName);
char* secureblackbox_sftpserver_getclientfileentryname(void* lpObj);
int secureblackbox_sftpserver_setclientfileentryname(void* lpObj, const char* lpszClientFileEntryName);
QString GetClientFileEntryName();
int SetClientFileEntryName(QString qsClientFileEntryName);
Default Value
""
Remarks
Specifies the file name.
This property is not available at design time.
Data Type
String
ClientFileEntryOtherExecute Property (SFTPServer Class)
Controls file execution permission for other users (users that are neither owners, nor belong to the same group).
Syntax
ANSI (Cross Platform) int GetClientFileEntryOtherExecute();
int SetClientFileEntryOtherExecute(int bClientFileEntryOtherExecute); Unicode (Windows) BOOL GetClientFileEntryOtherExecute();
INT SetClientFileEntryOtherExecute(BOOL bClientFileEntryOtherExecute);
int secureblackbox_sftpserver_getclientfileentryotherexecute(void* lpObj);
int secureblackbox_sftpserver_setclientfileentryotherexecute(void* lpObj, int bClientFileEntryOtherExecute);
bool GetClientFileEntryOtherExecute();
int SetClientFileEntryOtherExecute(bool bClientFileEntryOtherExecute);
Default Value
FALSE
Remarks
Controls file execution permission for other users (users that are neither owners, nor belong to the same group).
This property is not available at design time.
Data Type
Boolean
ClientFileEntryOtherRead Property (SFTPServer Class)
Controls file read permission for other users (users that are neither owners, nor belong to the same group).
Syntax
ANSI (Cross Platform) int GetClientFileEntryOtherRead();
int SetClientFileEntryOtherRead(int bClientFileEntryOtherRead); Unicode (Windows) BOOL GetClientFileEntryOtherRead();
INT SetClientFileEntryOtherRead(BOOL bClientFileEntryOtherRead);
int secureblackbox_sftpserver_getclientfileentryotherread(void* lpObj);
int secureblackbox_sftpserver_setclientfileentryotherread(void* lpObj, int bClientFileEntryOtherRead);
bool GetClientFileEntryOtherRead();
int SetClientFileEntryOtherRead(bool bClientFileEntryOtherRead);
Default Value
FALSE
Remarks
Controls file read permission for other users (users that are neither owners, nor belong to the same group).
This property is not available at design time.
Data Type
Boolean
ClientFileEntryOtherWrite Property (SFTPServer Class)
Controls file write permission for other users (users that are neither owners, nor belong to the same group).
Syntax
ANSI (Cross Platform) int GetClientFileEntryOtherWrite();
int SetClientFileEntryOtherWrite(int bClientFileEntryOtherWrite); Unicode (Windows) BOOL GetClientFileEntryOtherWrite();
INT SetClientFileEntryOtherWrite(BOOL bClientFileEntryOtherWrite);
int secureblackbox_sftpserver_getclientfileentryotherwrite(void* lpObj);
int secureblackbox_sftpserver_setclientfileentryotherwrite(void* lpObj, int bClientFileEntryOtherWrite);
bool GetClientFileEntryOtherWrite();
int SetClientFileEntryOtherWrite(bool bClientFileEntryOtherWrite);
Default Value
FALSE
Remarks
Controls file write permission for other users (users that are neither owners, nor belong to the same group).
This property is not available at design time.
Data Type
Boolean
ClientFileEntryOwner Property (SFTPServer Class)
Specifies the owner of the file/directory.
Syntax
ANSI (Cross Platform) char* GetClientFileEntryOwner();
int SetClientFileEntryOwner(const char* lpszClientFileEntryOwner); Unicode (Windows) LPWSTR GetClientFileEntryOwner();
INT SetClientFileEntryOwner(LPCWSTR lpszClientFileEntryOwner);
char* secureblackbox_sftpserver_getclientfileentryowner(void* lpObj);
int secureblackbox_sftpserver_setclientfileentryowner(void* lpObj, const char* lpszClientFileEntryOwner);
QString GetClientFileEntryOwner();
int SetClientFileEntryOwner(QString qsClientFileEntryOwner);
Default Value
""
Remarks
Specifies the owner of the file/directory.
This property is not available at design time.
Data Type
String
ClientFileEntryPath Property (SFTPServer Class)
Contains the full path to the file.
Syntax
ANSI (Cross Platform) char* GetClientFileEntryPath();
int SetClientFileEntryPath(const char* lpszClientFileEntryPath); Unicode (Windows) LPWSTR GetClientFileEntryPath();
INT SetClientFileEntryPath(LPCWSTR lpszClientFileEntryPath);
char* secureblackbox_sftpserver_getclientfileentrypath(void* lpObj);
int secureblackbox_sftpserver_setclientfileentrypath(void* lpObj, const char* lpszClientFileEntryPath);
QString GetClientFileEntryPath();
int SetClientFileEntryPath(QString qsClientFileEntryPath);
Default Value
""
Remarks
Contains the full path to the file.
This property is not available at design time.
Data Type
String
ClientFileEntrySize Property (SFTPServer Class)
The size of the file in bytes.
Syntax
ANSI (Cross Platform) int64 GetClientFileEntrySize();
int SetClientFileEntrySize(int64 lClientFileEntrySize); Unicode (Windows) LONG64 GetClientFileEntrySize();
INT SetClientFileEntrySize(LONG64 lClientFileEntrySize);
int64 secureblackbox_sftpserver_getclientfileentrysize(void* lpObj);
int secureblackbox_sftpserver_setclientfileentrysize(void* lpObj, int64 lClientFileEntrySize);
qint64 GetClientFileEntrySize();
int SetClientFileEntrySize(qint64 lClientFileEntrySize);
Default Value
0
Remarks
The size of the file in bytes.
This property is not available at design time.
Data Type
Long64
ClientFileEntryUserExecute Property (SFTPServer Class)
Controls file execution permission for the file owner.
Syntax
ANSI (Cross Platform) int GetClientFileEntryUserExecute();
int SetClientFileEntryUserExecute(int bClientFileEntryUserExecute); Unicode (Windows) BOOL GetClientFileEntryUserExecute();
INT SetClientFileEntryUserExecute(BOOL bClientFileEntryUserExecute);
int secureblackbox_sftpserver_getclientfileentryuserexecute(void* lpObj);
int secureblackbox_sftpserver_setclientfileentryuserexecute(void* lpObj, int bClientFileEntryUserExecute);
bool GetClientFileEntryUserExecute();
int SetClientFileEntryUserExecute(bool bClientFileEntryUserExecute);
Default Value
FALSE
Remarks
Controls file execution permission for the file owner.
This property is not available at design time.
Data Type
Boolean
ClientFileEntryUserRead Property (SFTPServer Class)
Controls file read permission for the file owner.
Syntax
ANSI (Cross Platform) int GetClientFileEntryUserRead();
int SetClientFileEntryUserRead(int bClientFileEntryUserRead); Unicode (Windows) BOOL GetClientFileEntryUserRead();
INT SetClientFileEntryUserRead(BOOL bClientFileEntryUserRead);
int secureblackbox_sftpserver_getclientfileentryuserread(void* lpObj);
int secureblackbox_sftpserver_setclientfileentryuserread(void* lpObj, int bClientFileEntryUserRead);
bool GetClientFileEntryUserRead();
int SetClientFileEntryUserRead(bool bClientFileEntryUserRead);
Default Value
FALSE
Remarks
Controls file read permission for the file owner.
This property is not available at design time.
Data Type
Boolean
ClientFileEntryUserWrite Property (SFTPServer Class)
Controls file write permission for the file owner.
Syntax
ANSI (Cross Platform) int GetClientFileEntryUserWrite();
int SetClientFileEntryUserWrite(int bClientFileEntryUserWrite); Unicode (Windows) BOOL GetClientFileEntryUserWrite();
INT SetClientFileEntryUserWrite(BOOL bClientFileEntryUserWrite);
int secureblackbox_sftpserver_getclientfileentryuserwrite(void* lpObj);
int secureblackbox_sftpserver_setclientfileentryuserwrite(void* lpObj, int bClientFileEntryUserWrite);
bool GetClientFileEntryUserWrite();
int SetClientFileEntryUserWrite(bool bClientFileEntryUserWrite);
Default Value
FALSE
Remarks
Controls file write permission for the file owner.
This property is not available at design time.
Data Type
Boolean
CompressionLevel Property (SFTPServer Class)
Specifies the preferable compression level.
Syntax
ANSI (Cross Platform) int GetCompressionLevel();
int SetCompressionLevel(int iCompressionLevel); Unicode (Windows) INT GetCompressionLevel();
INT SetCompressionLevel(INT iCompressionLevel);
int secureblackbox_sftpserver_getcompressionlevel(void* lpObj);
int secureblackbox_sftpserver_setcompressionlevel(void* lpObj, int iCompressionLevel);
int GetCompressionLevel();
int SetCompressionLevel(int iCompressionLevel);
Default Value
9
Remarks
Set this property before starting the server. Possible values range from 0 (lowest compression) to 9 (maximum compression). This property is ignored if compression wasn't accepted.
Data Type
Integer
ExternalCryptoAsyncDocumentID Property (SFTPServer Class)
Specifies an optional document ID for SignAsyncBegin() and SignAsyncEnd() calls.
Syntax
ANSI (Cross Platform) char* GetExternalCryptoAsyncDocumentID();
int SetExternalCryptoAsyncDocumentID(const char* lpszExternalCryptoAsyncDocumentID); Unicode (Windows) LPWSTR GetExternalCryptoAsyncDocumentID();
INT SetExternalCryptoAsyncDocumentID(LPCWSTR lpszExternalCryptoAsyncDocumentID);
char* secureblackbox_sftpserver_getexternalcryptoasyncdocumentid(void* lpObj);
int secureblackbox_sftpserver_setexternalcryptoasyncdocumentid(void* lpObj, const char* lpszExternalCryptoAsyncDocumentID);
QString GetExternalCryptoAsyncDocumentID();
int SetExternalCryptoAsyncDocumentID(QString qsExternalCryptoAsyncDocumentID);
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 (SFTPServer Class)
Custom parameters to be passed to the signing service (uninterpreted).
Syntax
ANSI (Cross Platform) char* GetExternalCryptoCustomParams();
int SetExternalCryptoCustomParams(const char* lpszExternalCryptoCustomParams); Unicode (Windows) LPWSTR GetExternalCryptoCustomParams();
INT SetExternalCryptoCustomParams(LPCWSTR lpszExternalCryptoCustomParams);
char* secureblackbox_sftpserver_getexternalcryptocustomparams(void* lpObj);
int secureblackbox_sftpserver_setexternalcryptocustomparams(void* lpObj, const char* lpszExternalCryptoCustomParams);
QString GetExternalCryptoCustomParams();
int SetExternalCryptoCustomParams(QString qsExternalCryptoCustomParams);
Default Value
""
Remarks
Custom parameters to be passed to the signing service (uninterpreted).
This property is not available at design time.
Data Type
String
ExternalCryptoData Property (SFTPServer Class)
Additional data to be included in the async state and mirrored back by the requestor.
Syntax
ANSI (Cross Platform) char* GetExternalCryptoData();
int SetExternalCryptoData(const char* lpszExternalCryptoData); Unicode (Windows) LPWSTR GetExternalCryptoData();
INT SetExternalCryptoData(LPCWSTR lpszExternalCryptoData);
char* secureblackbox_sftpserver_getexternalcryptodata(void* lpObj);
int secureblackbox_sftpserver_setexternalcryptodata(void* lpObj, const char* lpszExternalCryptoData);
QString GetExternalCryptoData();
int SetExternalCryptoData(QString qsExternalCryptoData);
Default Value
""
Remarks
Additional data to be included in the async state and mirrored back by the requestor.
This property is not available at design time.
Data Type
String
ExternalCryptoExternalHashCalculation Property (SFTPServer Class)
Specifies whether the message hash is to be calculated at the external endpoint.
Syntax
ANSI (Cross Platform) int GetExternalCryptoExternalHashCalculation();
int SetExternalCryptoExternalHashCalculation(int bExternalCryptoExternalHashCalculation); Unicode (Windows) BOOL GetExternalCryptoExternalHashCalculation();
INT SetExternalCryptoExternalHashCalculation(BOOL bExternalCryptoExternalHashCalculation);
int secureblackbox_sftpserver_getexternalcryptoexternalhashcalculation(void* lpObj);
int secureblackbox_sftpserver_setexternalcryptoexternalhashcalculation(void* lpObj, int bExternalCryptoExternalHashCalculation);
bool GetExternalCryptoExternalHashCalculation();
int SetExternalCryptoExternalHashCalculation(bool bExternalCryptoExternalHashCalculation);
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 class.
If set to true, the class 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
Boolean
ExternalCryptoHashAlgorithm Property (SFTPServer Class)
Specifies the request's signature hash algorithm.
Syntax
ANSI (Cross Platform) char* GetExternalCryptoHashAlgorithm();
int SetExternalCryptoHashAlgorithm(const char* lpszExternalCryptoHashAlgorithm); Unicode (Windows) LPWSTR GetExternalCryptoHashAlgorithm();
INT SetExternalCryptoHashAlgorithm(LPCWSTR lpszExternalCryptoHashAlgorithm);
char* secureblackbox_sftpserver_getexternalcryptohashalgorithm(void* lpObj);
int secureblackbox_sftpserver_setexternalcryptohashalgorithm(void* lpObj, const char* lpszExternalCryptoHashAlgorithm);
QString GetExternalCryptoHashAlgorithm();
int SetExternalCryptoHashAlgorithm(QString qsExternalCryptoHashAlgorithm);
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 (SFTPServer Class)
The ID of the pre-shared key used for DC request authentication.
Syntax
ANSI (Cross Platform) char* GetExternalCryptoKeyID();
int SetExternalCryptoKeyID(const char* lpszExternalCryptoKeyID); Unicode (Windows) LPWSTR GetExternalCryptoKeyID();
INT SetExternalCryptoKeyID(LPCWSTR lpszExternalCryptoKeyID);
char* secureblackbox_sftpserver_getexternalcryptokeyid(void* lpObj);
int secureblackbox_sftpserver_setexternalcryptokeyid(void* lpObj, const char* lpszExternalCryptoKeyID);
QString GetExternalCryptoKeyID();
int SetExternalCryptoKeyID(QString qsExternalCryptoKeyID);
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 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:
signer.ExternalCrypto.KeyID = "MainSigningKey";
signer.ExternalCrypto.KeySecret = "abcdef0123456789";
Data Type
String
ExternalCryptoKeySecret Property (SFTPServer Class)
The pre-shared key used for DC request authentication.
Syntax
ANSI (Cross Platform) char* GetExternalCryptoKeySecret();
int SetExternalCryptoKeySecret(const char* lpszExternalCryptoKeySecret); Unicode (Windows) LPWSTR GetExternalCryptoKeySecret();
INT SetExternalCryptoKeySecret(LPCWSTR lpszExternalCryptoKeySecret);
char* secureblackbox_sftpserver_getexternalcryptokeysecret(void* lpObj);
int secureblackbox_sftpserver_setexternalcryptokeysecret(void* lpObj, const char* lpszExternalCryptoKeySecret);
QString GetExternalCryptoKeySecret();
int SetExternalCryptoKeySecret(QString qsExternalCryptoKeySecret);
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 topic.
Data Type
String
ExternalCryptoMethod Property (SFTPServer Class)
Specifies the asynchronous signing method.
Syntax
ANSI (Cross Platform) int GetExternalCryptoMethod();
int SetExternalCryptoMethod(int iExternalCryptoMethod); Unicode (Windows) INT GetExternalCryptoMethod();
INT SetExternalCryptoMethod(INT iExternalCryptoMethod);
Possible Values
ASMD_PKCS1(0),
ASMD_PKCS7(1)
int secureblackbox_sftpserver_getexternalcryptomethod(void* lpObj);
int secureblackbox_sftpserver_setexternalcryptomethod(void* lpObj, int iExternalCryptoMethod);
int GetExternalCryptoMethod();
int SetExternalCryptoMethod(int iExternalCryptoMethod);
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
Integer
ExternalCryptoMode Property (SFTPServer Class)
Specifies the external cryptography mode.
Syntax
ANSI (Cross Platform) int GetExternalCryptoMode();
int SetExternalCryptoMode(int iExternalCryptoMode); Unicode (Windows) INT GetExternalCryptoMode();
INT SetExternalCryptoMode(INT iExternalCryptoMode);
Possible Values
ECM_DEFAULT(0),
ECM_DISABLED(1),
ECM_GENERIC(2),
ECM_DCAUTH(3),
ECM_DCAUTH_JSON(4)
int secureblackbox_sftpserver_getexternalcryptomode(void* lpObj);
int secureblackbox_sftpserver_setexternalcryptomode(void* lpObj, int iExternalCryptoMode);
int GetExternalCryptoMode();
int SetExternalCryptoMode(int iExternalCryptoMode);
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) |
This property is not available at design time.
Data Type
Integer
ExternalCryptoPublicKeyAlgorithm Property (SFTPServer Class)
Provide the public key algorithm here if the certificate is not available on the pre-signing stage.
Syntax
ANSI (Cross Platform) char* GetExternalCryptoPublicKeyAlgorithm();
int SetExternalCryptoPublicKeyAlgorithm(const char* lpszExternalCryptoPublicKeyAlgorithm); Unicode (Windows) LPWSTR GetExternalCryptoPublicKeyAlgorithm();
INT SetExternalCryptoPublicKeyAlgorithm(LPCWSTR lpszExternalCryptoPublicKeyAlgorithm);
char* secureblackbox_sftpserver_getexternalcryptopublickeyalgorithm(void* lpObj);
int secureblackbox_sftpserver_setexternalcryptopublickeyalgorithm(void* lpObj, const char* lpszExternalCryptoPublicKeyAlgorithm);
QString GetExternalCryptoPublicKeyAlgorithm();
int SetExternalCryptoPublicKeyAlgorithm(QString qsExternalCryptoPublicKeyAlgorithm);
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 |
Data Type
String
FIPSMode Property (SFTPServer Class)
Reserved.
Syntax
ANSI (Cross Platform) int GetFIPSMode();
int SetFIPSMode(int bFIPSMode); Unicode (Windows) BOOL GetFIPSMode();
INT SetFIPSMode(BOOL bFIPSMode);
int secureblackbox_sftpserver_getfipsmode(void* lpObj);
int secureblackbox_sftpserver_setfipsmode(void* lpObj, int bFIPSMode);
bool GetFIPSMode();
int SetFIPSMode(bool bFIPSMode);
Default Value
FALSE
Remarks
This property is reserved for future use.
Data Type
Boolean
ForceCompression Property (SFTPServer Class)
This property specifies whether server explicitly requires data compression.
Syntax
ANSI (Cross Platform) int GetForceCompression();
int SetForceCompression(int bForceCompression); Unicode (Windows) BOOL GetForceCompression();
INT SetForceCompression(BOOL bForceCompression);
int secureblackbox_sftpserver_getforcecompression(void* lpObj);
int secureblackbox_sftpserver_setforcecompression(void* lpObj, int bForceCompression);
bool GetForceCompression();
int SetForceCompression(bool bForceCompression);
Default Value
FALSE
Remarks
Set this property before starting the server. If it is set to true, the class will explicitly request data compression. If it is set to False, the class will support compression, although compression will be used only if the remote party doesn't support algorithms without compression.
Data Type
Boolean
Host Property (SFTPServer Class)
Specifies server's host name.
Syntax
ANSI (Cross Platform) char* GetHost();
int SetHost(const char* lpszHost); Unicode (Windows) LPWSTR GetHost();
INT SetHost(LPCWSTR lpszHost);
char* secureblackbox_sftpserver_gethost(void* lpObj);
int secureblackbox_sftpserver_sethost(void* lpObj, const char* lpszHost);
QString GetHost();
int SetHost(QString qsHost);
Default Value
""
Remarks
Use this property to set the host name for this server.
Data Type
String
KeyFingerprintSHA1 Property (SFTPServer Class)
Contains the SHA-1 fingerprint (hash) of the key.
Syntax
ANSI (Cross Platform) char* GetKeyFingerprintSHA1(); Unicode (Windows) LPWSTR GetKeyFingerprintSHA1();
char* secureblackbox_sftpserver_getkeyfingerprintsha1(void* lpObj);
QString GetKeyFingerprintSHA1();
Default Value
""
Remarks
Contains the SHA-1 fingerprint (hash) of the key.
This property is read-only and not available at design time.
Data Type
String
KeyFingerprintSHA256 Property (SFTPServer Class)
Contains the SHA-256 fingerprint (hash) of the key.
Syntax
ANSI (Cross Platform) char* GetKeyFingerprintSHA256(); Unicode (Windows) LPWSTR GetKeyFingerprintSHA256();
char* secureblackbox_sftpserver_getkeyfingerprintsha256(void* lpObj);
QString GetKeyFingerprintSHA256();
Default Value
""
Remarks
Contains the SHA-256 fingerprint (hash) of the key.
This property is read-only and not available at design time.
Data Type
String
KeyHandle Property (SFTPServer Class)
Allows to get or set a 'handle', a unique identifier of the underlying property object.
Syntax
ANSI (Cross Platform) int64 GetKeyHandle(); Unicode (Windows) LONG64 GetKeyHandle();
int64 secureblackbox_sftpserver_getkeyhandle(void* lpObj);
qint64 GetKeyHandle();
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.
pdfSigner.setSigningCertHandle(certMgr.getCertHandle());
This property is read-only and not available at design time.
Data Type
Long64
MaxSFTPVersion Property (SFTPServer Class)
Maximum SFTP version supported.
Syntax
ANSI (Cross Platform) int GetMaxSFTPVersion();
int SetMaxSFTPVersion(int iMaxSFTPVersion); Unicode (Windows) INT GetMaxSFTPVersion();
INT SetMaxSFTPVersion(INT iMaxSFTPVersion);
int secureblackbox_sftpserver_getmaxsftpversion(void* lpObj);
int secureblackbox_sftpserver_setmaxsftpversion(void* lpObj, int iMaxSFTPVersion);
int GetMaxSFTPVersion();
int SetMaxSFTPVersion(int iMaxSFTPVersion);
Default Value
6
Remarks
MaxSFTPVersion and MinSFTPVersion properties control the range of SFTP protocol versions supported by this server.
Data Type
Integer
MinSFTPVersion Property (SFTPServer Class)
Minimum SFTP version supported.
Syntax
ANSI (Cross Platform) int GetMinSFTPVersion();
int SetMinSFTPVersion(int iMinSFTPVersion); Unicode (Windows) INT GetMinSFTPVersion();
INT SetMinSFTPVersion(INT iMinSFTPVersion);
int secureblackbox_sftpserver_getminsftpversion(void* lpObj);
int secureblackbox_sftpserver_setminsftpversion(void* lpObj, int iMinSFTPVersion);
int GetMinSFTPVersion();
int SetMinSFTPVersion(int iMinSFTPVersion);
Default Value
0
Remarks
MaxSFTPVersion and MinSFTPVersion properties control the range of SFTP protocol versions supported by this server.
Data Type
Integer
PinnedClientAddress Property (SFTPServer Class)
The client's IP address.
Syntax
ANSI (Cross Platform) char* GetPinnedClientAddress(); Unicode (Windows) LPWSTR GetPinnedClientAddress();
char* secureblackbox_sftpserver_getpinnedclientaddress(void* lpObj);
QString GetPinnedClientAddress();
Default Value
""
Remarks
The client's IP address.
This property is read-only and not available at design time.
Data Type
String
PinnedClientClientKeyAlgorithm Property (SFTPServer Class)
Specifies the client's key algorithm.
Syntax
ANSI (Cross Platform) char* GetPinnedClientClientKeyAlgorithm(); Unicode (Windows) LPWSTR GetPinnedClientClientKeyAlgorithm();
char* secureblackbox_sftpserver_getpinnedclientclientkeyalgorithm(void* lpObj);
QString GetPinnedClientClientKeyAlgorithm();
Default Value
""
Remarks
Specifies the client's key algorithm.
This property is read-only and not available at design time.
Data Type
String
PinnedClientClientKeyBits Property (SFTPServer Class)
Specifies the length of the client's key.
Syntax
ANSI (Cross Platform) int GetPinnedClientClientKeyBits(); Unicode (Windows) INT GetPinnedClientClientKeyBits();
int secureblackbox_sftpserver_getpinnedclientclientkeybits(void* lpObj);
int GetPinnedClientClientKeyBits();
Default Value
0
Remarks
Specifies the length of the client's key.
This property is read-only and not available at design time.
Data Type
Integer
PinnedClientClientKeyFingerprint Property (SFTPServer Class)
The fingerprint (hash value) of the client's public key.
Syntax
ANSI (Cross Platform) char* GetPinnedClientClientKeyFingerprint(); Unicode (Windows) LPWSTR GetPinnedClientClientKeyFingerprint();
char* secureblackbox_sftpserver_getpinnedclientclientkeyfingerprint(void* lpObj);
QString GetPinnedClientClientKeyFingerprint();
Default Value
""
Remarks
The fingerprint (hash value) of the client's public key.
This property is read-only and not available at design time.
Data Type
String
PinnedClientClientSoftwareName Property (SFTPServer Class)
Returns the name of the SSH software running on the client side.
Syntax
ANSI (Cross Platform) char* GetPinnedClientClientSoftwareName(); Unicode (Windows) LPWSTR GetPinnedClientClientSoftwareName();
char* secureblackbox_sftpserver_getpinnedclientclientsoftwarename(void* lpObj);
QString GetPinnedClientClientSoftwareName();
Default Value
""
Remarks
Returns the name of the SSH software running on the client side.
This property is read-only and not available at design time.
Data Type
String
PinnedClientCloseReason Property (SFTPServer Class)
Contains the line sent by the client just before closing the connection.
Syntax
ANSI (Cross Platform) char* GetPinnedClientCloseReason(); Unicode (Windows) LPWSTR GetPinnedClientCloseReason();
char* secureblackbox_sftpserver_getpinnedclientclosereason(void* lpObj);
QString GetPinnedClientCloseReason();
Default Value
""
Remarks
Contains the line sent by the client just before closing the connection. It might contain the error description if the connection was not closed gracefully.
This property is read-only and not available at design time.
Data Type
String
PinnedClientCompressionAlgorithmInbound Property (SFTPServer Class)
Compression algorithm for the incoming traffic.
Syntax
ANSI (Cross Platform) char* GetPinnedClientCompressionAlgorithmInbound(); Unicode (Windows) LPWSTR GetPinnedClientCompressionAlgorithmInbound();
char* secureblackbox_sftpserver_getpinnedclientcompressionalgorithminbound(void* lpObj);
QString GetPinnedClientCompressionAlgorithmInbound();
Default Value
""
Remarks
Compression algorithm for the incoming traffic.
This property is read-only and not available at design time.
Data Type
String
PinnedClientCompressionAlgorithmOutbound Property (SFTPServer Class)
Compression algorithm for the outgoing traffic.
Syntax
ANSI (Cross Platform) char* GetPinnedClientCompressionAlgorithmOutbound(); Unicode (Windows) LPWSTR GetPinnedClientCompressionAlgorithmOutbound();
char* secureblackbox_sftpserver_getpinnedclientcompressionalgorithmoutbound(void* lpObj);
QString GetPinnedClientCompressionAlgorithmOutbound();
Default Value
""
Remarks
Compression algorithm for the outgoing traffic.
This property is read-only and not available at design time.
Data Type
String
PinnedClientEncryptionAlgorithmInbound Property (SFTPServer Class)
Encryption algorithm for the incoming traffic.
Syntax
ANSI (Cross Platform) char* GetPinnedClientEncryptionAlgorithmInbound(); Unicode (Windows) LPWSTR GetPinnedClientEncryptionAlgorithmInbound();
char* secureblackbox_sftpserver_getpinnedclientencryptionalgorithminbound(void* lpObj);
QString GetPinnedClientEncryptionAlgorithmInbound();
Default Value
""
Remarks
Encryption algorithm for the incoming traffic.
This property is read-only and not available at design time.
Data Type
String
PinnedClientEncryptionAlgorithmOutbound Property (SFTPServer Class)
Encryption algorithm for the outgoing traffic.
Syntax
ANSI (Cross Platform) char* GetPinnedClientEncryptionAlgorithmOutbound(); Unicode (Windows) LPWSTR GetPinnedClientEncryptionAlgorithmOutbound();
char* secureblackbox_sftpserver_getpinnedclientencryptionalgorithmoutbound(void* lpObj);
QString GetPinnedClientEncryptionAlgorithmOutbound();
Default Value
""
Remarks
Encryption algorithm for the outgoing traffic.
This property is read-only and not available at design time.
Data Type
String
PinnedClientID Property (SFTPServer Class)
The client connection's unique identifier.
Syntax
ANSI (Cross Platform) int64 GetPinnedClientID(); Unicode (Windows) LONG64 GetPinnedClientID();
int64 secureblackbox_sftpserver_getpinnedclientid(void* lpObj);
qint64 GetPinnedClientID();
Default Value
-1
Remarks
The client connection's unique identifier. This value is used throughout to refer to a particular client connection.
This property is read-only and not available at design time.
Data Type
Long64
PinnedClientInboundEncryptionKeyBits Property (SFTPServer Class)
Specifies the length of the key used to encrypt the incoming traffic.
Syntax
ANSI (Cross Platform) int GetPinnedClientInboundEncryptionKeyBits(); Unicode (Windows) INT GetPinnedClientInboundEncryptionKeyBits();
int secureblackbox_sftpserver_getpinnedclientinboundencryptionkeybits(void* lpObj);
int GetPinnedClientInboundEncryptionKeyBits();
Default Value
0
Remarks
Specifies the length of the key used to encrypt the incoming traffic.
This property is read-only and not available at design time.
Data Type
Integer
PinnedClientKexAlgorithm Property (SFTPServer Class)
The key exchange algorithm used during the SSH handshake.
Syntax
ANSI (Cross Platform) char* GetPinnedClientKexAlgorithm(); Unicode (Windows) LPWSTR GetPinnedClientKexAlgorithm();
char* secureblackbox_sftpserver_getpinnedclientkexalgorithm(void* lpObj);
QString GetPinnedClientKexAlgorithm();
Default Value
""
Remarks
The key exchange algorithm used during the SSH handshake.
This property is read-only and not available at design time.
Data Type
String
PinnedClientKexBits Property (SFTPServer Class)
The number of bits used by the key exchange algorithm.
Syntax
ANSI (Cross Platform) int GetPinnedClientKexBits(); Unicode (Windows) INT GetPinnedClientKexBits();
int secureblackbox_sftpserver_getpinnedclientkexbits(void* lpObj);
int GetPinnedClientKexBits();
Default Value
0
Remarks
The number of bits used by the key exchange algorithm.
This property is read-only and not available at design time.
Data Type
Integer
PinnedClientKexLines Property (SFTPServer Class)
The contents of the received KexInit packet.
Syntax
ANSI (Cross Platform) char* GetPinnedClientKexLines(); Unicode (Windows) LPWSTR GetPinnedClientKexLines();
char* secureblackbox_sftpserver_getpinnedclientkexlines(void* lpObj);
QString GetPinnedClientKexLines();
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 and not available at design time.
Data Type
String
PinnedClientMacAlgorithmInbound Property (SFTPServer Class)
MAC algorithm used for the incoming connection.
Syntax
ANSI (Cross Platform) char* GetPinnedClientMacAlgorithmInbound(); Unicode (Windows) LPWSTR GetPinnedClientMacAlgorithmInbound();
char* secureblackbox_sftpserver_getpinnedclientmacalgorithminbound(void* lpObj);
QString GetPinnedClientMacAlgorithmInbound();
Default Value
""
Remarks
MAC algorithm used for the incoming connection.
This property is read-only and not available at design time.
Data Type
String
PinnedClientMacAlgorithmOutbound Property (SFTPServer Class)
MAC algorithm used for outbound connection.
Syntax
ANSI (Cross Platform) char* GetPinnedClientMacAlgorithmOutbound(); Unicode (Windows) LPWSTR GetPinnedClientMacAlgorithmOutbound();
char* secureblackbox_sftpserver_getpinnedclientmacalgorithmoutbound(void* lpObj);
QString GetPinnedClientMacAlgorithmOutbound();
Default Value
""
Remarks
MAC algorithm used for outbound connection.
This property is read-only and not available at design time.
Data Type
String
PinnedClientOutboundEncryptionKeyBits Property (SFTPServer Class)
Specifies the length of the key used to encrypt the outgoing traffic.
Syntax
ANSI (Cross Platform) int GetPinnedClientOutboundEncryptionKeyBits(); Unicode (Windows) INT GetPinnedClientOutboundEncryptionKeyBits();
int secureblackbox_sftpserver_getpinnedclientoutboundencryptionkeybits(void* lpObj);
int GetPinnedClientOutboundEncryptionKeyBits();
Default Value
0
Remarks
Specifies the length of the key used to encrypt the outgoing traffic.
This property is read-only and not available at design time.
Data Type
Integer
PinnedClientPort Property (SFTPServer Class)
The remote port of the client connection.
Syntax
ANSI (Cross Platform) int GetPinnedClientPort(); Unicode (Windows) INT GetPinnedClientPort();
int secureblackbox_sftpserver_getpinnedclientport(void* lpObj);
int GetPinnedClientPort();
Default Value
0
Remarks
The remote port of the client connection.
This property is read-only and not available at design time.
Data Type
Integer
PinnedClientPublicKeyAlgorithm Property (SFTPServer Class)
Specifies the public key algorithm which was used during the SSH handshake.
Syntax
ANSI (Cross Platform) char* GetPinnedClientPublicKeyAlgorithm(); Unicode (Windows) LPWSTR GetPinnedClientPublicKeyAlgorithm();
char* secureblackbox_sftpserver_getpinnedclientpublickeyalgorithm(void* lpObj);
QString GetPinnedClientPublicKeyAlgorithm();
Default Value
""
Remarks
Specifies the public key algorithm which was used during the SSH handshake.
This property is read-only and not available at design time.
Data Type
String
PinnedClientServerKeyBits Property (SFTPServer Class)
Specifies the number of bits in the server's key.
Syntax
ANSI (Cross Platform) int GetPinnedClientServerKeyBits(); Unicode (Windows) INT GetPinnedClientServerKeyBits();
int secureblackbox_sftpserver_getpinnedclientserverkeybits(void* lpObj);
int GetPinnedClientServerKeyBits();
Default Value
0
Remarks
Specifies the number of bits in the server's key.
This property is read-only and not available at design time.
Data Type
Integer
PinnedClientServerKeyFingerprint Property (SFTPServer Class)
The fingerprint (hash value) of the server's public key.
Syntax
ANSI (Cross Platform) char* GetPinnedClientServerKeyFingerprint(); Unicode (Windows) LPWSTR GetPinnedClientServerKeyFingerprint();
char* secureblackbox_sftpserver_getpinnedclientserverkeyfingerprint(void* lpObj);
QString GetPinnedClientServerKeyFingerprint();
Default Value
""
Remarks
The fingerprint (hash value) of the server's public key.
This property is read-only and not available at design time.
Data Type
String
PinnedClientTotalBytesReceived Property (SFTPServer Class)
Returns the total number of bytes received over this connection.
Syntax
ANSI (Cross Platform) int64 GetPinnedClientTotalBytesReceived(); Unicode (Windows) LONG64 GetPinnedClientTotalBytesReceived();
int64 secureblackbox_sftpserver_getpinnedclienttotalbytesreceived(void* lpObj);
qint64 GetPinnedClientTotalBytesReceived();
Default Value
0
Remarks
Returns the total number of bytes received over this connection.
This property is read-only and not available at design time.
Data Type
Long64
PinnedClientTotalBytesSent Property (SFTPServer Class)
Returns the total number of bytes sent over this connection.
Syntax
ANSI (Cross Platform) int64 GetPinnedClientTotalBytesSent(); Unicode (Windows) LONG64 GetPinnedClientTotalBytesSent();
int64 secureblackbox_sftpserver_getpinnedclienttotalbytessent(void* lpObj);
qint64 GetPinnedClientTotalBytesSent();
Default Value
0
Remarks
Returns the total number of bytes sent over this connection.
This property is read-only and not available at design time.
Data Type
Long64
PinnedClientVersion Property (SFTPServer Class)
Specifies SSH protocol version.
Syntax
ANSI (Cross Platform) int GetPinnedClientVersion(); Unicode (Windows) INT GetPinnedClientVersion();
int secureblackbox_sftpserver_getpinnedclientversion(void* lpObj);
int GetPinnedClientVersion();
Default Value
2
Remarks
Specifies SSH protocol version.
This property is read-only and not available at design time.
Data Type
Integer
Port Property (SFTPServer Class)
Specifies the listening port number.
Syntax
ANSI (Cross Platform) int GetPort();
int SetPort(int iPort); Unicode (Windows) INT GetPort();
INT SetPort(INT iPort);
int secureblackbox_sftpserver_getport(void* lpObj);
int secureblackbox_sftpserver_setport(void* lpObj, int iPort);
int GetPort();
int SetPort(int iPort);
Default Value
22
Remarks
Use this property to specify on which port the class will be listening to client connections.
Data Type
Integer
ReadOnly Property (SFTPServer Class)
Specifies whether files on the server are read-only.
Syntax
ANSI (Cross Platform) int GetReadOnly();
int SetReadOnly(int bReadOnly); Unicode (Windows) BOOL GetReadOnly();
INT SetReadOnly(BOOL bReadOnly);
int secureblackbox_sftpserver_getreadonly(void* lpObj);
int secureblackbox_sftpserver_setreadonly(void* lpObj, int bReadOnly);
bool GetReadOnly();
int SetReadOnly(bool bReadOnly);
Default Value
FALSE
Remarks
Set this property to true to deny all client requests to change files on the server.
Data Type
Boolean
ServerKeyCount Property (SFTPServer Class)
The number of records in the ServerKey arrays.
Syntax
ANSI (Cross Platform) int GetServerKeyCount();
int SetServerKeyCount(int iServerKeyCount); Unicode (Windows) INT GetServerKeyCount();
INT SetServerKeyCount(INT iServerKeyCount);
int secureblackbox_sftpserver_getserverkeycount(void* lpObj);
int secureblackbox_sftpserver_setserverkeycount(void* lpObj, int iServerKeyCount);
int GetServerKeyCount();
int SetServerKeyCount(int iServerKeyCount);
Default Value
0
Remarks
This property controls the size of the following arrays:
The array indices start at 0 and end at ServerKeyCount - 1.
This property is not available at design time.
Data Type
Integer
ServerKeyAlgorithm Property (SFTPServer Class)
Specifies the key algorithm.
Syntax
ANSI (Cross Platform) char* GetServerKeyAlgorithm(int iServerKeyIndex); Unicode (Windows) LPWSTR GetServerKeyAlgorithm(INT iServerKeyIndex);
char* secureblackbox_sftpserver_getserverkeyalgorithm(void* lpObj, int serverkeyindex);
QString GetServerKeyAlgorithm(int iServerKeyIndex);
Default Value
""
Remarks
Specifies the key algorithm.
The ServerKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the ServerKeyCount property.
This property is read-only and not available at design time.
Data Type
String
ServerKeyBits Property (SFTPServer Class)
The number of bits in the key: the more the better, 2048 or 4096 are typical values.
Syntax
ANSI (Cross Platform) int GetServerKeyBits(int iServerKeyIndex); Unicode (Windows) INT GetServerKeyBits(INT iServerKeyIndex);
int secureblackbox_sftpserver_getserverkeybits(void* lpObj, int serverkeyindex);
int GetServerKeyBits(int iServerKeyIndex);
Default Value
0
Remarks
The number of bits in the key: the more the better, 2048 or 4096 are typical values.
The ServerKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the ServerKeyCount property.
This property is read-only and not available at design time.
Data Type
Integer
ServerKeyFingerprintMD5 Property (SFTPServer Class)
Contains the MD5 fingerprint (hash) of the key.
Syntax
ANSI (Cross Platform) char* GetServerKeyFingerprintMD5(int iServerKeyIndex); Unicode (Windows) LPWSTR GetServerKeyFingerprintMD5(INT iServerKeyIndex);
char* secureblackbox_sftpserver_getserverkeyfingerprintmd5(void* lpObj, int serverkeyindex);
QString GetServerKeyFingerprintMD5(int iServerKeyIndex);
Default Value
""
Remarks
Contains the MD5 fingerprint (hash) of the key.
The ServerKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the ServerKeyCount property.
This property is read-only and not available at design time.
Data Type
String
ServerKeyFingerprintSHA1 Property (SFTPServer Class)
Contains the SHA-1 fingerprint (hash) of the key.
Syntax
ANSI (Cross Platform) char* GetServerKeyFingerprintSHA1(int iServerKeyIndex); Unicode (Windows) LPWSTR GetServerKeyFingerprintSHA1(INT iServerKeyIndex);
char* secureblackbox_sftpserver_getserverkeyfingerprintsha1(void* lpObj, int serverkeyindex);
QString GetServerKeyFingerprintSHA1(int iServerKeyIndex);
Default Value
""
Remarks
Contains the SHA-1 fingerprint (hash) of the key.
The ServerKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the ServerKeyCount property.
This property is read-only and not available at design time.
Data Type
String
ServerKeyHandle Property (SFTPServer Class)
Allows to get or set a 'handle', a unique identifier of the underlying property object.
Syntax
ANSI (Cross Platform) int64 GetServerKeyHandle(int iServerKeyIndex);
int SetServerKeyHandle(int iServerKeyIndex, int64 lServerKeyHandle); Unicode (Windows) LONG64 GetServerKeyHandle(INT iServerKeyIndex);
INT SetServerKeyHandle(INT iServerKeyIndex, LONG64 lServerKeyHandle);
int64 secureblackbox_sftpserver_getserverkeyhandle(void* lpObj, int serverkeyindex);
int secureblackbox_sftpserver_setserverkeyhandle(void* lpObj, int serverkeyindex, int64 lServerKeyHandle);
qint64 GetServerKeyHandle(int iServerKeyIndex);
int SetServerKeyHandle(int iServerKeyIndex, qint64 lServerKeyHandle);
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.
pdfSigner.setSigningCertHandle(certMgr.getCertHandle());
The ServerKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the ServerKeyCount property.
This property is not available at design time.
Data Type
Long64
SocketIncomingSpeedLimit Property (SFTPServer Class)
The maximum number of bytes to read from the socket, per second.
Syntax
ANSI (Cross Platform) int GetSocketIncomingSpeedLimit();
int SetSocketIncomingSpeedLimit(int iSocketIncomingSpeedLimit); Unicode (Windows) INT GetSocketIncomingSpeedLimit();
INT SetSocketIncomingSpeedLimit(INT iSocketIncomingSpeedLimit);
int secureblackbox_sftpserver_getsocketincomingspeedlimit(void* lpObj);
int secureblackbox_sftpserver_setsocketincomingspeedlimit(void* lpObj, int iSocketIncomingSpeedLimit);
int GetSocketIncomingSpeedLimit();
int SetSocketIncomingSpeedLimit(int iSocketIncomingSpeedLimit);
Default Value
0
Remarks
The maximum number of bytes to read from the socket, per second.
Data Type
Integer
SocketLocalAddress Property (SFTPServer Class)
The local network interface to bind the socket to.
Syntax
ANSI (Cross Platform) char* GetSocketLocalAddress();
int SetSocketLocalAddress(const char* lpszSocketLocalAddress); Unicode (Windows) LPWSTR GetSocketLocalAddress();
INT SetSocketLocalAddress(LPCWSTR lpszSocketLocalAddress);
char* secureblackbox_sftpserver_getsocketlocaladdress(void* lpObj);
int secureblackbox_sftpserver_setsocketlocaladdress(void* lpObj, const char* lpszSocketLocalAddress);
QString GetSocketLocalAddress();
int SetSocketLocalAddress(QString qsSocketLocalAddress);
Default Value
""
Remarks
The local network interface to bind the socket to.
Data Type
String
SocketLocalPort Property (SFTPServer Class)
The local port number to bind the socket to.
Syntax
ANSI (Cross Platform) int GetSocketLocalPort();
int SetSocketLocalPort(int iSocketLocalPort); Unicode (Windows) INT GetSocketLocalPort();
INT SetSocketLocalPort(INT iSocketLocalPort);
int secureblackbox_sftpserver_getsocketlocalport(void* lpObj);
int secureblackbox_sftpserver_setsocketlocalport(void* lpObj, int iSocketLocalPort);
int GetSocketLocalPort();
int SetSocketLocalPort(int iSocketLocalPort);
Default Value
0
Remarks
The local port number to bind the socket to.
Data Type
Integer
SocketOutgoingSpeedLimit Property (SFTPServer Class)
The maximum number of bytes to write to the socket, per second.
Syntax
ANSI (Cross Platform) int GetSocketOutgoingSpeedLimit();
int SetSocketOutgoingSpeedLimit(int iSocketOutgoingSpeedLimit); Unicode (Windows) INT GetSocketOutgoingSpeedLimit();
INT SetSocketOutgoingSpeedLimit(INT iSocketOutgoingSpeedLimit);
int secureblackbox_sftpserver_getsocketoutgoingspeedlimit(void* lpObj);
int secureblackbox_sftpserver_setsocketoutgoingspeedlimit(void* lpObj, int iSocketOutgoingSpeedLimit);
int GetSocketOutgoingSpeedLimit();
int SetSocketOutgoingSpeedLimit(int iSocketOutgoingSpeedLimit);
Default Value
0
Remarks
The maximum number of bytes to write to the socket, per second.
Data Type
Integer
SocketTimeout Property (SFTPServer Class)
The maximum period of waiting, in milliseconds, after which the socket operation is considered unsuccessful.
Syntax
ANSI (Cross Platform) int GetSocketTimeout();
int SetSocketTimeout(int iSocketTimeout); Unicode (Windows) INT GetSocketTimeout();
INT SetSocketTimeout(INT iSocketTimeout);
int secureblackbox_sftpserver_getsockettimeout(void* lpObj);
int secureblackbox_sftpserver_setsockettimeout(void* lpObj, int iSocketTimeout);
int GetSocketTimeout();
int SetSocketTimeout(int iSocketTimeout);
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
Integer
SocketUseIPv6 Property (SFTPServer Class)
Enables or disables IP protocol version 6.
Syntax
ANSI (Cross Platform) int GetSocketUseIPv6();
int SetSocketUseIPv6(int bSocketUseIPv6); Unicode (Windows) BOOL GetSocketUseIPv6();
INT SetSocketUseIPv6(BOOL bSocketUseIPv6);
int secureblackbox_sftpserver_getsocketuseipv6(void* lpObj);
int secureblackbox_sftpserver_setsocketuseipv6(void* lpObj, int bSocketUseIPv6);
bool GetSocketUseIPv6();
int SetSocketUseIPv6(bool bSocketUseIPv6);
Default Value
FALSE
Remarks
Enables or disables IP protocol version 6.
Data Type
Boolean
SSHSettingsAutoAdjustCiphers Property (SFTPServer Class)
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
ANSI (Cross Platform) int GetSSHSettingsAutoAdjustCiphers();
int SetSSHSettingsAutoAdjustCiphers(int bSSHSettingsAutoAdjustCiphers); Unicode (Windows) BOOL GetSSHSettingsAutoAdjustCiphers();
INT SetSSHSettingsAutoAdjustCiphers(BOOL bSSHSettingsAutoAdjustCiphers);
int secureblackbox_sftpserver_getsshsettingsautoadjustciphers(void* lpObj);
int secureblackbox_sftpserver_setsshsettingsautoadjustciphers(void* lpObj, int bSSHSettingsAutoAdjustCiphers);
bool GetSSHSettingsAutoAdjustCiphers();
int SetSSHSettingsAutoAdjustCiphers(bool bSSHSettingsAutoAdjustCiphers);
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
Boolean
SSHSettingsBaseConfiguration Property (SFTPServer Class)
Allows to choose base configuration of SSH settings, tuned up for different purposes such as high security or higher compatibility.
Syntax
ANSI (Cross Platform) int GetSSHSettingsBaseConfiguration();
int SetSSHSettingsBaseConfiguration(int iSSHSettingsBaseConfiguration); Unicode (Windows) INT GetSSHSettingsBaseConfiguration();
INT SetSSHSettingsBaseConfiguration(INT iSSHSettingsBaseConfiguration);
Possible Values
STPC_DEFAULT(0),
STPC_COMPATIBLE(1),
STPC_COMPREHENSIVE_INSECURE(2),
STPC_HIGHLY_SECURE(3)
int secureblackbox_sftpserver_getsshsettingsbaseconfiguration(void* lpObj);
int secureblackbox_sftpserver_setsshsettingsbaseconfiguration(void* lpObj, int iSSHSettingsBaseConfiguration);
int GetSSHSettingsBaseConfiguration();
int SetSSHSettingsBaseConfiguration(int iSSHSettingsBaseConfiguration);
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
Integer
SSHSettingsCompressionAlgorithms Property (SFTPServer Class)
A list of session compression algorithms separated with commas or semicolons.
Syntax
ANSI (Cross Platform) char* GetSSHSettingsCompressionAlgorithms();
int SetSSHSettingsCompressionAlgorithms(const char* lpszSSHSettingsCompressionAlgorithms); Unicode (Windows) LPWSTR GetSSHSettingsCompressionAlgorithms();
INT SetSSHSettingsCompressionAlgorithms(LPCWSTR lpszSSHSettingsCompressionAlgorithms);
char* secureblackbox_sftpserver_getsshsettingscompressionalgorithms(void* lpObj);
int secureblackbox_sftpserver_setsshsettingscompressionalgorithms(void* lpObj, const char* lpszSSHSettingsCompressionAlgorithms);
QString GetSSHSettingsCompressionAlgorithms();
int SetSSHSettingsCompressionAlgorithms(QString qsSSHSettingsCompressionAlgorithms);
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 (SFTPServer Class)
Possible values for the Compression Level range from 0 (minimum compression) to 9 (maximum compression).
Syntax
ANSI (Cross Platform) int GetSSHSettingsCompressionLevel();
int SetSSHSettingsCompressionLevel(int iSSHSettingsCompressionLevel); Unicode (Windows) INT GetSSHSettingsCompressionLevel();
INT SetSSHSettingsCompressionLevel(INT iSSHSettingsCompressionLevel);
int secureblackbox_sftpserver_getsshsettingscompressionlevel(void* lpObj);
int secureblackbox_sftpserver_setsshsettingscompressionlevel(void* lpObj, int iSSHSettingsCompressionLevel);
int GetSSHSettingsCompressionLevel();
int SetSSHSettingsCompressionLevel(int iSSHSettingsCompressionLevel);
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
Integer
SSHSettingsDefaultWindowSize Property (SFTPServer Class)
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
ANSI (Cross Platform) int GetSSHSettingsDefaultWindowSize();
int SetSSHSettingsDefaultWindowSize(int iSSHSettingsDefaultWindowSize); Unicode (Windows) INT GetSSHSettingsDefaultWindowSize();
INT SetSSHSettingsDefaultWindowSize(INT iSSHSettingsDefaultWindowSize);
int secureblackbox_sftpserver_getsshsettingsdefaultwindowsize(void* lpObj);
int secureblackbox_sftpserver_setsshsettingsdefaultwindowsize(void* lpObj, int iSSHSettingsDefaultWindowSize);
int GetSSHSettingsDefaultWindowSize();
int SetSSHSettingsDefaultWindowSize(int iSSHSettingsDefaultWindowSize);
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
Integer
SSHSettingsEncryptionAlgorithms Property (SFTPServer Class)
A list of session encryption algorithms separated with commas or semicolons.
Syntax
ANSI (Cross Platform) char* GetSSHSettingsEncryptionAlgorithms();
int SetSSHSettingsEncryptionAlgorithms(const char* lpszSSHSettingsEncryptionAlgorithms); Unicode (Windows) LPWSTR GetSSHSettingsEncryptionAlgorithms();
INT SetSSHSettingsEncryptionAlgorithms(LPCWSTR lpszSSHSettingsEncryptionAlgorithms);
char* secureblackbox_sftpserver_getsshsettingsencryptionalgorithms(void* lpObj);
int secureblackbox_sftpserver_setsshsettingsencryptionalgorithms(void* lpObj, const char* lpszSSHSettingsEncryptionAlgorithms);
QString GetSSHSettingsEncryptionAlgorithms();
int SetSSHSettingsEncryptionAlgorithms(QString qsSSHSettingsEncryptionAlgorithms);
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 (SFTPServer Class)
Whether the SSH client should explicitly request compression.
Syntax
ANSI (Cross Platform) int GetSSHSettingsForceCompression();
int SetSSHSettingsForceCompression(int bSSHSettingsForceCompression); Unicode (Windows) BOOL GetSSHSettingsForceCompression();
INT SetSSHSettingsForceCompression(BOOL bSSHSettingsForceCompression);
int secureblackbox_sftpserver_getsshsettingsforcecompression(void* lpObj);
int secureblackbox_sftpserver_setsshsettingsforcecompression(void* lpObj, int bSSHSettingsForceCompression);
bool GetSSHSettingsForceCompression();
int SetSSHSettingsForceCompression(bool bSSHSettingsForceCompression);
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
Boolean
SSHSettingsGSSAuthTypes Property (SFTPServer Class)
A comma-separated list of authentication types.
Syntax
ANSI (Cross Platform) char* GetSSHSettingsGSSAuthTypes();
int SetSSHSettingsGSSAuthTypes(const char* lpszSSHSettingsGSSAuthTypes); Unicode (Windows) LPWSTR GetSSHSettingsGSSAuthTypes();
INT SetSSHSettingsGSSAuthTypes(LPCWSTR lpszSSHSettingsGSSAuthTypes);
char* secureblackbox_sftpserver_getsshsettingsgssauthtypes(void* lpObj);
int secureblackbox_sftpserver_setsshsettingsgssauthtypes(void* lpObj, const char* lpszSSHSettingsGSSAuthTypes);
QString GetSSHSettingsGSSAuthTypes();
int SetSSHSettingsGSSAuthTypes(QString qsSSHSettingsGSSAuthTypes);
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 (SFTPServer Class)
Switches credential delegation on or off.
Syntax
ANSI (Cross Platform) int GetSSHSettingsGSSDelegateCreds();
int SetSSHSettingsGSSDelegateCreds(int bSSHSettingsGSSDelegateCreds); Unicode (Windows) BOOL GetSSHSettingsGSSDelegateCreds();
INT SetSSHSettingsGSSDelegateCreds(BOOL bSSHSettingsGSSDelegateCreds);
int secureblackbox_sftpserver_getsshsettingsgssdelegatecreds(void* lpObj);
int secureblackbox_sftpserver_setsshsettingsgssdelegatecreds(void* lpObj, int bSSHSettingsGSSDelegateCreds);
bool GetSSHSettingsGSSDelegateCreds();
int SetSSHSettingsGSSDelegateCreds(bool bSSHSettingsGSSDelegateCreds);
Default Value
FALSE
Remarks
Switches credential delegation on or off.
Data Type
Boolean
SSHSettingsGSSHostname Property (SFTPServer Class)
The GSS host name, in form of a FQDN (e.
Syntax
ANSI (Cross Platform) char* GetSSHSettingsGSSHostname();
int SetSSHSettingsGSSHostname(const char* lpszSSHSettingsGSSHostname); Unicode (Windows) LPWSTR GetSSHSettingsGSSHostname();
INT SetSSHSettingsGSSHostname(LPCWSTR lpszSSHSettingsGSSHostname);
char* secureblackbox_sftpserver_getsshsettingsgsshostname(void* lpObj);
int secureblackbox_sftpserver_setsshsettingsgsshostname(void* lpObj, const char* lpszSSHSettingsGSSHostname);
QString GetSSHSettingsGSSHostname();
int SetSSHSettingsGSSHostname(QString qsSSHSettingsGSSHostname);
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 (SFTPServer Class)
A path to the GSS-API library (DLL or SO).
Syntax
ANSI (Cross Platform) char* GetSSHSettingsGSSLib();
int SetSSHSettingsGSSLib(const char* lpszSSHSettingsGSSLib); Unicode (Windows) LPWSTR GetSSHSettingsGSSLib();
INT SetSSHSettingsGSSLib(LPCWSTR lpszSSHSettingsGSSLib);
char* secureblackbox_sftpserver_getsshsettingsgsslib(void* lpObj);
int secureblackbox_sftpserver_setsshsettingsgsslib(void* lpObj, const char* lpszSSHSettingsGSSLib);
QString GetSSHSettingsGSSLib();
int SetSSHSettingsGSSLib(QString qsSSHSettingsGSSLib);
Default Value
""
Remarks
A path to the GSS-API library (DLL or SO).
Data Type
String
SSHSettingsGSSMechanisms Property (SFTPServer Class)
A comma-separated list of GSS mechanisms to use.
Syntax
ANSI (Cross Platform) char* GetSSHSettingsGSSMechanisms();
int SetSSHSettingsGSSMechanisms(const char* lpszSSHSettingsGSSMechanisms); Unicode (Windows) LPWSTR GetSSHSettingsGSSMechanisms();
INT SetSSHSettingsGSSMechanisms(LPCWSTR lpszSSHSettingsGSSMechanisms);
char* secureblackbox_sftpserver_getsshsettingsgssmechanisms(void* lpObj);
int secureblackbox_sftpserver_setsshsettingsgssmechanisms(void* lpObj, const char* lpszSSHSettingsGSSMechanisms);
QString GetSSHSettingsGSSMechanisms();
int SetSSHSettingsGSSMechanisms(QString qsSSHSettingsGSSMechanisms);
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 (SFTPServer Class)
A comma-separated list of SSPI protocols.
Syntax
ANSI (Cross Platform) char* GetSSHSettingsGSSProtocols();
int SetSSHSettingsGSSProtocols(const char* lpszSSHSettingsGSSProtocols); Unicode (Windows) LPWSTR GetSSHSettingsGSSProtocols();
INT SetSSHSettingsGSSProtocols(LPCWSTR lpszSSHSettingsGSSProtocols);
char* secureblackbox_sftpserver_getsshsettingsgssprotocols(void* lpObj);
int secureblackbox_sftpserver_setsshsettingsgssprotocols(void* lpObj, const char* lpszSSHSettingsGSSProtocols);
QString GetSSHSettingsGSSProtocols();
int SetSSHSettingsGSSProtocols(QString qsSSHSettingsGSSProtocols);
Default Value
""
Remarks
A comma-separated list of SSPI protocols. Two protocols are currently supported: kerberos and NTLM.
Data Type
String
SSHSettingsHandshakeTimeout Property (SFTPServer Class)
Specifies the maximal time for the SSH handshake to proceed, in seconds.
Syntax
ANSI (Cross Platform) int GetSSHSettingsHandshakeTimeout();
int SetSSHSettingsHandshakeTimeout(int iSSHSettingsHandshakeTimeout); Unicode (Windows) INT GetSSHSettingsHandshakeTimeout();
INT SetSSHSettingsHandshakeTimeout(INT iSSHSettingsHandshakeTimeout);
int secureblackbox_sftpserver_getsshsettingshandshaketimeout(void* lpObj);
int secureblackbox_sftpserver_setsshsettingshandshaketimeout(void* lpObj, int iSSHSettingsHandshakeTimeout);
int GetSSHSettingsHandshakeTimeout();
int SetSSHSettingsHandshakeTimeout(int iSSHSettingsHandshakeTimeout);
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
Integer
SSHSettingsKexAlgorithms Property (SFTPServer Class)
A list of key exchange algorithms separated with commas or semicolons.
Syntax
ANSI (Cross Platform) char* GetSSHSettingsKexAlgorithms();
int SetSSHSettingsKexAlgorithms(const char* lpszSSHSettingsKexAlgorithms); Unicode (Windows) LPWSTR GetSSHSettingsKexAlgorithms();
INT SetSSHSettingsKexAlgorithms(LPCWSTR lpszSSHSettingsKexAlgorithms);
char* secureblackbox_sftpserver_getsshsettingskexalgorithms(void* lpObj);
int secureblackbox_sftpserver_setsshsettingskexalgorithms(void* lpObj, const char* lpszSSHSettingsKexAlgorithms);
QString GetSSHSettingsKexAlgorithms();
int SetSSHSettingsKexAlgorithms(QString qsSSHSettingsKexAlgorithms);
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 (SFTPServer Class)
A list of MAC (for message authentication code ) algorithms separated with commas or semicolons.
Syntax
ANSI (Cross Platform) char* GetSSHSettingsMacAlgorithms();
int SetSSHSettingsMacAlgorithms(const char* lpszSSHSettingsMacAlgorithms); Unicode (Windows) LPWSTR GetSSHSettingsMacAlgorithms();
INT SetSSHSettingsMacAlgorithms(LPCWSTR lpszSSHSettingsMacAlgorithms);
char* secureblackbox_sftpserver_getsshsettingsmacalgorithms(void* lpObj);
int secureblackbox_sftpserver_setsshsettingsmacalgorithms(void* lpObj, const char* lpszSSHSettingsMacAlgorithms);
QString GetSSHSettingsMacAlgorithms();
int SetSSHSettingsMacAlgorithms(QString qsSSHSettingsMacAlgorithms);
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 (SFTPServer Class)
Specifies the maximum length of one SSH packet in bytes.
Syntax
ANSI (Cross Platform) int GetSSHSettingsMaxSSHPacketSize();
int SetSSHSettingsMaxSSHPacketSize(int iSSHSettingsMaxSSHPacketSize); Unicode (Windows) INT GetSSHSettingsMaxSSHPacketSize();
INT SetSSHSettingsMaxSSHPacketSize(INT iSSHSettingsMaxSSHPacketSize);
int secureblackbox_sftpserver_getsshsettingsmaxsshpacketsize(void* lpObj);
int secureblackbox_sftpserver_setsshsettingsmaxsshpacketsize(void* lpObj, int iSSHSettingsMaxSSHPacketSize);
int GetSSHSettingsMaxSSHPacketSize();
int SetSSHSettingsMaxSSHPacketSize(int iSSHSettingsMaxSSHPacketSize);
Default Value
262144
Remarks
Specifies the maximum length of one SSH packet in bytes.
Data Type
Integer
SSHSettingsMinWindowSize Property (SFTPServer Class)
Specifies the minimal internal window size.
Syntax
ANSI (Cross Platform) int GetSSHSettingsMinWindowSize();
int SetSSHSettingsMinWindowSize(int iSSHSettingsMinWindowSize); Unicode (Windows) INT GetSSHSettingsMinWindowSize();
INT SetSSHSettingsMinWindowSize(INT iSSHSettingsMinWindowSize);
int secureblackbox_sftpserver_getsshsettingsminwindowsize(void* lpObj);
int secureblackbox_sftpserver_setsshsettingsminwindowsize(void* lpObj, int iSSHSettingsMinWindowSize);
int GetSSHSettingsMinWindowSize();
int SetSSHSettingsMinWindowSize(int iSSHSettingsMinWindowSize);
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
Integer
SSHSettingsObfuscateHandshake Property (SFTPServer Class)
Enables or disables handshake obfuscation.
Syntax
ANSI (Cross Platform) int GetSSHSettingsObfuscateHandshake();
int SetSSHSettingsObfuscateHandshake(int bSSHSettingsObfuscateHandshake); Unicode (Windows) BOOL GetSSHSettingsObfuscateHandshake();
INT SetSSHSettingsObfuscateHandshake(BOOL bSSHSettingsObfuscateHandshake);
int secureblackbox_sftpserver_getsshsettingsobfuscatehandshake(void* lpObj);
int secureblackbox_sftpserver_setsshsettingsobfuscatehandshake(void* lpObj, int bSSHSettingsObfuscateHandshake);
bool GetSSHSettingsObfuscateHandshake();
int SetSSHSettingsObfuscateHandshake(bool bSSHSettingsObfuscateHandshake);
Default Value
FALSE
Remarks
Enables or disables handshake obfuscation.
Data Type
Boolean
SSHSettingsObfuscationPassword Property (SFTPServer Class)
Specifies the password used to encrypt the handshake when ObfuscateHandshake is set.
Syntax
ANSI (Cross Platform) char* GetSSHSettingsObfuscationPassword();
int SetSSHSettingsObfuscationPassword(const char* lpszSSHSettingsObfuscationPassword); Unicode (Windows) LPWSTR GetSSHSettingsObfuscationPassword();
INT SetSSHSettingsObfuscationPassword(LPCWSTR lpszSSHSettingsObfuscationPassword);
char* secureblackbox_sftpserver_getsshsettingsobfuscationpassword(void* lpObj);
int secureblackbox_sftpserver_setsshsettingsobfuscationpassword(void* lpObj, const char* lpszSSHSettingsObfuscationPassword);
QString GetSSHSettingsObfuscationPassword();
int SetSSHSettingsObfuscationPassword(QString qsSSHSettingsObfuscationPassword);
Default Value
""
Remarks
Specifies the password used to encrypt the handshake when ObfuscateHandshake is set.
Data Type
String
SSHSettingsPublicKeyAlgorithms Property (SFTPServer Class)
A list of public key algorithms separated with commas or semicolons.
Syntax
ANSI (Cross Platform) char* GetSSHSettingsPublicKeyAlgorithms();
int SetSSHSettingsPublicKeyAlgorithms(const char* lpszSSHSettingsPublicKeyAlgorithms); Unicode (Windows) LPWSTR GetSSHSettingsPublicKeyAlgorithms();
INT SetSSHSettingsPublicKeyAlgorithms(LPCWSTR lpszSSHSettingsPublicKeyAlgorithms);
char* secureblackbox_sftpserver_getsshsettingspublickeyalgorithms(void* lpObj);
int secureblackbox_sftpserver_setsshsettingspublickeyalgorithms(void* lpObj, const char* lpszSSHSettingsPublicKeyAlgorithms);
QString GetSSHSettingsPublicKeyAlgorithms();
int SetSSHSettingsPublicKeyAlgorithms(QString qsSSHSettingsPublicKeyAlgorithms);
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 (SFTPServer Class)
Whether to request a password change when connecting.
Syntax
ANSI (Cross Platform) int GetSSHSettingsRequestPasswordChange();
int SetSSHSettingsRequestPasswordChange(int bSSHSettingsRequestPasswordChange); Unicode (Windows) BOOL GetSSHSettingsRequestPasswordChange();
INT SetSSHSettingsRequestPasswordChange(BOOL bSSHSettingsRequestPasswordChange);
int secureblackbox_sftpserver_getsshsettingsrequestpasswordchange(void* lpObj);
int secureblackbox_sftpserver_setsshsettingsrequestpasswordchange(void* lpObj, int bSSHSettingsRequestPasswordChange);
bool GetSSHSettingsRequestPasswordChange();
int SetSSHSettingsRequestPasswordChange(bool bSSHSettingsRequestPasswordChange);
Default Value
FALSE
Remarks
Whether to request a password change when connecting.
Data Type
Boolean
SSHSettingsSoftwareName Property (SFTPServer Class)
The name to be used by the class to identify itself.
Syntax
ANSI (Cross Platform) char* GetSSHSettingsSoftwareName();
int SetSSHSettingsSoftwareName(const char* lpszSSHSettingsSoftwareName); Unicode (Windows) LPWSTR GetSSHSettingsSoftwareName();
INT SetSSHSettingsSoftwareName(LPCWSTR lpszSSHSettingsSoftwareName);
char* secureblackbox_sftpserver_getsshsettingssoftwarename(void* lpObj);
int secureblackbox_sftpserver_setsshsettingssoftwarename(void* lpObj, const char* lpszSSHSettingsSoftwareName);
QString GetSSHSettingsSoftwareName();
int SetSSHSettingsSoftwareName(QString qsSSHSettingsSoftwareName);
Default Value
"SecureBlackbox"
Remarks
The name to be used by the component to identify itself.
Data Type
String
SSHSettingsTrustAllKeys Property (SFTPServer Class)
Enables or disables explicit trust to all server keys.
Syntax
ANSI (Cross Platform) int GetSSHSettingsTrustAllKeys();
int SetSSHSettingsTrustAllKeys(int bSSHSettingsTrustAllKeys); Unicode (Windows) BOOL GetSSHSettingsTrustAllKeys();
INT SetSSHSettingsTrustAllKeys(BOOL bSSHSettingsTrustAllKeys);
int secureblackbox_sftpserver_getsshsettingstrustallkeys(void* lpObj);
int secureblackbox_sftpserver_setsshsettingstrustallkeys(void* lpObj, int bSSHSettingsTrustAllKeys);
bool GetSSHSettingsTrustAllKeys();
int SetSSHSettingsTrustAllKeys(bool bSSHSettingsTrustAllKeys);
Default Value
FALSE
Remarks
Enables or disables explicit trust to all server keys. Use with care.
Data Type
Boolean
SSHSettingsUseAuthAgent Property (SFTPServer Class)
Enables or disables the use of external key agent, such as Putty key agent.
Syntax
ANSI (Cross Platform) int GetSSHSettingsUseAuthAgent();
int SetSSHSettingsUseAuthAgent(int bSSHSettingsUseAuthAgent); Unicode (Windows) BOOL GetSSHSettingsUseAuthAgent();
INT SetSSHSettingsUseAuthAgent(BOOL bSSHSettingsUseAuthAgent);
int secureblackbox_sftpserver_getsshsettingsuseauthagent(void* lpObj);
int secureblackbox_sftpserver_setsshsettingsuseauthagent(void* lpObj, int bSSHSettingsUseAuthAgent);
bool GetSSHSettingsUseAuthAgent();
int SetSSHSettingsUseAuthAgent(bool bSSHSettingsUseAuthAgent);
Default Value
FALSE
Remarks
Enables or disables the use of external key agent, such as Putty key agent.
Data Type
Boolean
SSHSettingsVersions Property (SFTPServer Class)
Specifies enabled SSH protocol versions (1 or 2).
Syntax
ANSI (Cross Platform) int GetSSHSettingsVersions();
int SetSSHSettingsVersions(int iSSHSettingsVersions); Unicode (Windows) INT GetSSHSettingsVersions();
INT SetSSHSettingsVersions(INT iSSHSettingsVersions);
int secureblackbox_sftpserver_getsshsettingsversions(void* lpObj);
int secureblackbox_sftpserver_setsshsettingsversions(void* lpObj, int iSSHSettingsVersions);
int GetSSHSettingsVersions();
int SetSSHSettingsVersions(int iSSHSettingsVersions);
Default Value
1
Remarks
Specifies enabled SSH protocol versions (1 or 2).
Data Type
Integer
UserCount Property (SFTPServer Class)
The number of records in the User arrays.
Syntax
ANSI (Cross Platform) int GetUserCount();
int SetUserCount(int iUserCount); Unicode (Windows) INT GetUserCount();
INT SetUserCount(INT iUserCount);
int secureblackbox_sftpserver_getusercount(void* lpObj);
int secureblackbox_sftpserver_setusercount(void* lpObj, int iUserCount);
int GetUserCount();
int SetUserCount(int iUserCount);
Default Value
0
Remarks
This property controls the size of the following arrays:
- UserAssociatedData
- UserBasePath
- UserCert
- UserData
- UserHandle
- UserHashAlgorithm
- UserIncomingSpeedLimit
- UserOtpAlgorithm
- UserOtpValue
- UserOutgoingSpeedLimit
- UserPassword
- UserPasswordLen
- UserSharedSecret
- UserSSHKey
- UserUsername
The array indices start at 0 and end at UserCount - 1.
This property is not available at design time.
Data Type
Integer
UserAssociatedData Property (SFTPServer Class)
Contains the user's Associated Data when SSH AEAD (Authenticated Encryption with Associated Data) algorithm is used.
Syntax
ANSI (Cross Platform) int GetUserAssociatedData(int iUserIndex, char* &lpUserAssociatedData, int &lenUserAssociatedData);
int SetUserAssociatedData(int iUserIndex, const char* lpUserAssociatedData, int lenUserAssociatedData); Unicode (Windows) INT GetUserAssociatedData(INT iUserIndex, LPSTR &lpUserAssociatedData, INT &lenUserAssociatedData);
INT SetUserAssociatedData(INT iUserIndex, LPCSTR lpUserAssociatedData, INT lenUserAssociatedData);
int secureblackbox_sftpserver_getuserassociateddata(void* lpObj, int userindex, char** lpUserAssociatedData, int* lenUserAssociatedData);
int secureblackbox_sftpserver_setuserassociateddata(void* lpObj, int userindex, const char* lpUserAssociatedData, int lenUserAssociatedData);
QByteArray GetUserAssociatedData(int iUserIndex);
int SetUserAssociatedData(int iUserIndex, QByteArray qbaUserAssociatedData);
Remarks
Contains the user's Associated Data when SSH AEAD (Authenticated Encryption with Associated Data) algorithm is used.
The UserIndex parameter specifies the index of the item in the array. The size of the array is controlled by the UserCount property.
This property is not available at design time.
Data Type
Byte Array
UserBasePath Property (SFTPServer Class)
Base path for this user in the server's file system.
Syntax
ANSI (Cross Platform) char* GetUserBasePath(int iUserIndex);
int SetUserBasePath(int iUserIndex, const char* lpszUserBasePath); Unicode (Windows) LPWSTR GetUserBasePath(INT iUserIndex);
INT SetUserBasePath(INT iUserIndex, LPCWSTR lpszUserBasePath);
char* secureblackbox_sftpserver_getuserbasepath(void* lpObj, int userindex);
int secureblackbox_sftpserver_setuserbasepath(void* lpObj, int userindex, const char* lpszUserBasePath);
QString GetUserBasePath(int iUserIndex);
int SetUserBasePath(int iUserIndex, QString qsUserBasePath);
Default Value
""
Remarks
Base path for this user in the server's file system.
The UserIndex parameter specifies the index of the item in the array. The size of the array is controlled by the UserCount property.
This property is not available at design time.
Data Type
String
UserCert Property (SFTPServer Class)
Contains the user's certificate.
Syntax
ANSI (Cross Platform) int GetUserCert(int iUserIndex, char* &lpUserCert, int &lenUserCert);
int SetUserCert(int iUserIndex, const char* lpUserCert, int lenUserCert); Unicode (Windows) INT GetUserCert(INT iUserIndex, LPSTR &lpUserCert, INT &lenUserCert);
INT SetUserCert(INT iUserIndex, LPCSTR lpUserCert, INT lenUserCert);
int secureblackbox_sftpserver_getusercert(void* lpObj, int userindex, char** lpUserCert, int* lenUserCert);
int secureblackbox_sftpserver_setusercert(void* lpObj, int userindex, const char* lpUserCert, int lenUserCert);
QByteArray GetUserCert(int iUserIndex);
int SetUserCert(int iUserIndex, QByteArray qbaUserCert);
Remarks
Contains the user's certificate.
The UserIndex parameter specifies the index of the item in the array. The size of the array is controlled by the UserCount property.
This property is not available at design time.
Data Type
Byte Array
UserData Property (SFTPServer Class)
Contains uninterpreted user-defined data that should be associated with the user account, such as comments or custom settings.
Syntax
ANSI (Cross Platform) char* GetUserData(int iUserIndex);
int SetUserData(int iUserIndex, const char* lpszUserData); Unicode (Windows) LPWSTR GetUserData(INT iUserIndex);
INT SetUserData(INT iUserIndex, LPCWSTR lpszUserData);
char* secureblackbox_sftpserver_getuserdata(void* lpObj, int userindex);
int secureblackbox_sftpserver_setuserdata(void* lpObj, int userindex, const char* lpszUserData);
QString GetUserData(int iUserIndex);
int SetUserData(int iUserIndex, QString qsUserData);
Default Value
""
Remarks
Contains uninterpreted user-defined data that should be associated with the user account, such as comments or custom settings.
The UserIndex parameter specifies the index of the item in the array. The size of the array is controlled by the UserCount property.
This property is not available at design time.
Data Type
String
UserHandle Property (SFTPServer Class)
Allows to get or set a 'handle', a unique identifier of the underlying property object.
Syntax
ANSI (Cross Platform) int64 GetUserHandle(int iUserIndex);
int SetUserHandle(int iUserIndex, int64 lUserHandle); Unicode (Windows) LONG64 GetUserHandle(INT iUserIndex);
INT SetUserHandle(INT iUserIndex, LONG64 lUserHandle);
int64 secureblackbox_sftpserver_getuserhandle(void* lpObj, int userindex);
int secureblackbox_sftpserver_setuserhandle(void* lpObj, int userindex, int64 lUserHandle);
qint64 GetUserHandle(int iUserIndex);
int SetUserHandle(int iUserIndex, qint64 lUserHandle);
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.
pdfSigner.setSigningCertHandle(certMgr.getCertHandle());
The UserIndex parameter specifies the index of the item in the array. The size of the array is controlled by the UserCount property.
This property is not available at design time.
Data Type
Long64
UserHashAlgorithm Property (SFTPServer Class)
Specifies the hash algorithm used to generate TOTP (Time-based One-Time Passwords) passwords for this user.
Syntax
ANSI (Cross Platform) char* GetUserHashAlgorithm(int iUserIndex);
int SetUserHashAlgorithm(int iUserIndex, const char* lpszUserHashAlgorithm); Unicode (Windows) LPWSTR GetUserHashAlgorithm(INT iUserIndex);
INT SetUserHashAlgorithm(INT iUserIndex, LPCWSTR lpszUserHashAlgorithm);
char* secureblackbox_sftpserver_getuserhashalgorithm(void* lpObj, int userindex);
int secureblackbox_sftpserver_setuserhashalgorithm(void* lpObj, int userindex, const char* lpszUserHashAlgorithm);
QString GetUserHashAlgorithm(int iUserIndex);
int SetUserHashAlgorithm(int iUserIndex, QString qsUserHashAlgorithm);
Default Value
""
Remarks
Specifies the hash algorithm used to generate TOTP (Time-based One-Time Passwords) passwords for this user. Three HMAC algorithms are supported, with SHA-1, SHA-256, and SHA-512 digests:
SB_MAC_ALGORITHM_HMAC_SHA1 | SHA1 | |
SB_MAC_ALGORITHM_HMAC_SHA256 | SHA256 | |
SB_MAC_ALGORITHM_HMAC_SHA512 | SHA512 |
The UserIndex parameter specifies the index of the item in the array. The size of the array is controlled by the UserCount property.
This property is not available at design time.
Data Type
String
UserIncomingSpeedLimit Property (SFTPServer Class)
Specifies the incoming speed limit for this user.
Syntax
ANSI (Cross Platform) int GetUserIncomingSpeedLimit(int iUserIndex);
int SetUserIncomingSpeedLimit(int iUserIndex, int iUserIncomingSpeedLimit); Unicode (Windows) INT GetUserIncomingSpeedLimit(INT iUserIndex);
INT SetUserIncomingSpeedLimit(INT iUserIndex, INT iUserIncomingSpeedLimit);
int secureblackbox_sftpserver_getuserincomingspeedlimit(void* lpObj, int userindex);
int secureblackbox_sftpserver_setuserincomingspeedlimit(void* lpObj, int userindex, int iUserIncomingSpeedLimit);
int GetUserIncomingSpeedLimit(int iUserIndex);
int SetUserIncomingSpeedLimit(int iUserIndex, int iUserIncomingSpeedLimit);
Default Value
0
Remarks
Specifies the incoming speed limit for this user. The value of 0 (zero) means "no limitation".
The UserIndex parameter specifies the index of the item in the array. The size of the array is controlled by the UserCount property.
This property is not available at design time.
Data Type
Integer
UserOtpAlgorithm Property (SFTPServer Class)
The algorithm used to generate one-time passwords (OTP) for this user, either HOTP (Hash-based OTP) or TOTP (Time-based OTP).
Syntax
ANSI (Cross Platform) int GetUserOtpAlgorithm(int iUserIndex);
int SetUserOtpAlgorithm(int iUserIndex, int iUserOtpAlgorithm); Unicode (Windows) INT GetUserOtpAlgorithm(INT iUserIndex);
INT SetUserOtpAlgorithm(INT iUserIndex, INT iUserOtpAlgorithm);
Possible Values
OA_NONE(0),
OA_HMAC(1),
OA_TIME(2)
int secureblackbox_sftpserver_getuserotpalgorithm(void* lpObj, int userindex);
int secureblackbox_sftpserver_setuserotpalgorithm(void* lpObj, int userindex, int iUserOtpAlgorithm);
int GetUserOtpAlgorithm(int iUserIndex);
int SetUserOtpAlgorithm(int iUserIndex, int iUserOtpAlgorithm);
Default Value
0
Remarks
The algorithm used to generate one-time passwords (OTP) for this user, either HOTP (Hash-based OTP) or TOTP (Time-based OTP). In the former case, a value of a dedicated counter is used to generate a unique password, while in the latter the password is generated on the basis of the current time value.
oaHmac | 0 | |
oaTime | 1 |
The UserIndex parameter specifies the index of the item in the array. The size of the array is controlled by the UserCount property.
This property is not available at design time.
Data Type
Integer
UserOtpValue Property (SFTPServer Class)
The user's time interval (TOTP) or Counter (HOTP).
Syntax
ANSI (Cross Platform) int GetUserOtpValue(int iUserIndex);
int SetUserOtpValue(int iUserIndex, int iUserOtpValue); Unicode (Windows) INT GetUserOtpValue(INT iUserIndex);
INT SetUserOtpValue(INT iUserIndex, INT iUserOtpValue);
int secureblackbox_sftpserver_getuserotpvalue(void* lpObj, int userindex);
int secureblackbox_sftpserver_setuserotpvalue(void* lpObj, int userindex, int iUserOtpValue);
int GetUserOtpValue(int iUserIndex);
int SetUserOtpValue(int iUserIndex, int iUserOtpValue);
Default Value
0
Remarks
The user's time interval (TOTP) or Counter (HOTP).
The UserIndex parameter specifies the index of the item in the array. The size of the array is controlled by the UserCount property.
This property is not available at design time.
Data Type
Integer
UserOutgoingSpeedLimit Property (SFTPServer Class)
Specifies the outgoing speed limit for this user.
Syntax
ANSI (Cross Platform) int GetUserOutgoingSpeedLimit(int iUserIndex);
int SetUserOutgoingSpeedLimit(int iUserIndex, int iUserOutgoingSpeedLimit); Unicode (Windows) INT GetUserOutgoingSpeedLimit(INT iUserIndex);
INT SetUserOutgoingSpeedLimit(INT iUserIndex, INT iUserOutgoingSpeedLimit);
int secureblackbox_sftpserver_getuseroutgoingspeedlimit(void* lpObj, int userindex);
int secureblackbox_sftpserver_setuseroutgoingspeedlimit(void* lpObj, int userindex, int iUserOutgoingSpeedLimit);
int GetUserOutgoingSpeedLimit(int iUserIndex);
int SetUserOutgoingSpeedLimit(int iUserIndex, int iUserOutgoingSpeedLimit);
Default Value
0
Remarks
Specifies the outgoing speed limit for this user. The value of 0 (zero) means "no limitation".
The UserIndex parameter specifies the index of the item in the array. The size of the array is controlled by the UserCount property.
This property is not available at design time.
Data Type
Integer
UserPassword Property (SFTPServer Class)
The user's authentication password.
Syntax
ANSI (Cross Platform) char* GetUserPassword(int iUserIndex);
int SetUserPassword(int iUserIndex, const char* lpszUserPassword); Unicode (Windows) LPWSTR GetUserPassword(INT iUserIndex);
INT SetUserPassword(INT iUserIndex, LPCWSTR lpszUserPassword);
char* secureblackbox_sftpserver_getuserpassword(void* lpObj, int userindex);
int secureblackbox_sftpserver_setuserpassword(void* lpObj, int userindex, const char* lpszUserPassword);
QString GetUserPassword(int iUserIndex);
int SetUserPassword(int iUserIndex, QString qsUserPassword);
Default Value
""
Remarks
The user's authentication password.
The UserIndex parameter specifies the index of the item in the array. The size of the array is controlled by the UserCount property.
This property is not available at design time.
Data Type
String
UserPasswordLen Property (SFTPServer Class)
Specifies the length of the user's OTP password.
Syntax
ANSI (Cross Platform) int GetUserPasswordLen(int iUserIndex);
int SetUserPasswordLen(int iUserIndex, int iUserPasswordLen); Unicode (Windows) INT GetUserPasswordLen(INT iUserIndex);
INT SetUserPasswordLen(INT iUserIndex, INT iUserPasswordLen);
int secureblackbox_sftpserver_getuserpasswordlen(void* lpObj, int userindex);
int secureblackbox_sftpserver_setuserpasswordlen(void* lpObj, int userindex, int iUserPasswordLen);
int GetUserPasswordLen(int iUserIndex);
int SetUserPasswordLen(int iUserIndex, int iUserPasswordLen);
Default Value
0
Remarks
Specifies the length of the user's OTP password.
The UserIndex parameter specifies the index of the item in the array. The size of the array is controlled by the UserCount property.
This property is not available at design time.
Data Type
Integer
UserSharedSecret Property (SFTPServer Class)
Contains the user's secret key, which is essentially a shared secret between the client and server.
Syntax
Remarks
Contains the user's secret key, which is essentially a shared secret between the client and server.
Shared secrets can be used in TLS-driven protocols, as well as in OTP (where it is called a 'key secret') for generating one-time passwords on one side, and validate them on the other.
The UserIndex parameter specifies the index of the item in the array. The size of the array is controlled by the UserCount property.
This property is not available at design time.
Data Type
Byte Array
UserSSHKey Property (SFTPServer Class)
Contains the user's SSH key.
Syntax
ANSI (Cross Platform) int GetUserSSHKey(int iUserIndex, char* &lpUserSSHKey, int &lenUserSSHKey);
int SetUserSSHKey(int iUserIndex, const char* lpUserSSHKey, int lenUserSSHKey); Unicode (Windows) INT GetUserSSHKey(INT iUserIndex, LPSTR &lpUserSSHKey, INT &lenUserSSHKey);
INT SetUserSSHKey(INT iUserIndex, LPCSTR lpUserSSHKey, INT lenUserSSHKey);
int secureblackbox_sftpserver_getusersshkey(void* lpObj, int userindex, char** lpUserSSHKey, int* lenUserSSHKey);
int secureblackbox_sftpserver_setusersshkey(void* lpObj, int userindex, const char* lpUserSSHKey, int lenUserSSHKey);
QByteArray GetUserSSHKey(int iUserIndex);
int SetUserSSHKey(int iUserIndex, QByteArray qbaUserSSHKey);
Remarks
Contains the user's SSH key.
The UserIndex parameter specifies the index of the item in the array. The size of the array is controlled by the UserCount property.
This property is not available at design time.
Data Type
Byte Array
UserUsername Property (SFTPServer Class)
The registered name (login) of the user.
Syntax
ANSI (Cross Platform) char* GetUserUsername(int iUserIndex);
int SetUserUsername(int iUserIndex, const char* lpszUserUsername); Unicode (Windows) LPWSTR GetUserUsername(INT iUserIndex);
INT SetUserUsername(INT iUserIndex, LPCWSTR lpszUserUsername);
char* secureblackbox_sftpserver_getuserusername(void* lpObj, int userindex);
int secureblackbox_sftpserver_setuserusername(void* lpObj, int userindex, const char* lpszUserUsername);
QString GetUserUsername(int iUserIndex);
int SetUserUsername(int iUserIndex, QString qsUserUsername);
Default Value
""
Remarks
The registered name (login) of the user.
The UserIndex parameter specifies the index of the item in the array. The size of the array is controlled by the UserCount property.
This property is not available at design time.
Data Type
String
UseUTF8 Property (SFTPServer Class)
Specifies whether UTF8 conversion is to be used when parsing file names.
Syntax
ANSI (Cross Platform) int GetUseUTF8();
int SetUseUTF8(int bUseUTF8); Unicode (Windows) BOOL GetUseUTF8();
INT SetUseUTF8(BOOL bUseUTF8);
int secureblackbox_sftpserver_getuseutf8(void* lpObj);
int secureblackbox_sftpserver_setuseutf8(void* lpObj, int bUseUTF8);
bool GetUseUTF8();
int SetUseUTF8(bool bUseUTF8);
Default Value
FALSE
Remarks
This property specifies whether UTF8 conversion of filenames is used by the server. It is set automatically according to protocol flow, but user could also set it to the desired value.
Data Type
Boolean
Config Method (SFTPServer Class)
Sets or retrieves a configuration setting.
Syntax
ANSI (Cross Platform) char* Config(const char* lpszConfigurationString); Unicode (Windows) LPWSTR Config(LPCWSTR lpszConfigurationString);
char* secureblackbox_sftpserver_config(void* lpObj, const char* lpszConfigurationString);
QString Config(const QString& qsConfigurationString);
Remarks
Config is a generic method available in every class. It is used to set and retrieve configuration settings for the class.
These settings are similar in functionality to properties, but they are rarely used. In order to avoid "polluting" the property namespace of the class, 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, you must call Config("PROPERTY"). The value will be returned as a string.
Error Handling (C++)
This method returns a String value; after it returns, call the GetLastErrorCode() method to obtain its result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message.
DoAction Method (SFTPServer Class)
Performs an additional action.
Syntax
ANSI (Cross Platform) char* DoAction(const char* lpszActionID, const char* lpszActionParams); Unicode (Windows) LPWSTR DoAction(LPCWSTR lpszActionID, LPCWSTR lpszActionParams);
char* secureblackbox_sftpserver_doaction(void* lpObj, const char* lpszActionID, const char* lpszActionParams);
QString DoAction(const QString& qsActionID, const QString& qsActionParams);
Remarks
DoAction is a generic method available in every class. 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;....
Error Handling (C++)
This method returns a String value; after it returns, call the GetLastErrorCode() method to obtain its result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message.
DropClient Method (SFTPServer Class)
Terminates a client connection.
Syntax
ANSI (Cross Platform) int DropClient(int iConnectionId, int bForced); Unicode (Windows) INT DropClient(INT iConnectionId, BOOL bForced);
int secureblackbox_sftpserver_dropclient(void* lpObj, int iConnectionId, int bForced);
int DropClient(int iConnectionId, bool bForced);
Remarks
Call this method to shut down a connected client. Forced indicates whether the connection should be closed in a graceful manner.
Error Handling (C++)
This method returns a result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message. (Note: This method's result code can also be obtained by calling the GetLastErrorCode() method after it returns.)
GetClientBuffer Method (SFTPServer Class)
Acquires a piece of operation data.
Syntax
ANSI (Cross Platform) char* GetClientBuffer(int64 lConnectionID, const char* lpszHandle, int *lpSize = NULL); Unicode (Windows) LPSTR GetClientBuffer(LONG64 lConnectionID, LPCWSTR lpszHandle, LPINT lpSize = NULL);
char* secureblackbox_sftpserver_getclientbuffer(void* lpObj, int64 lConnectionID, const char* lpszHandle, int *lpSize);
QByteArray GetClientBuffer(qint64 lConnectionID, const QString& qsHandle);
Remarks
Use this method to obtain a piece of data relevant to a transfer operation in a thread-safe way.
A typical place to call this method is inside the WriteFile event handler, when implementing customized file transfers.
Error Handling (C++)
This method returns a Byte Array value (with length lpSize); after it returns, call the GetLastErrorCode() method to obtain its result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message.
GetClientFileEntry Method (SFTPServer Class)
Acquires file entry details from the class.
Syntax
ANSI (Cross Platform) int GetClientFileEntry(int64 lConnectionID, const char* lpszHandle); Unicode (Windows) INT GetClientFileEntry(LONG64 lConnectionID, LPCWSTR lpszHandle);
int secureblackbox_sftpserver_getclientfileentry(void* lpObj, int64 lConnectionID, const char* lpszHandle);
int GetClientFileEntry(qint64 lConnectionID, const QString& qsHandle);
Remarks
Use this method to acquire the details of a file entry from the server in atomic and thread-safe way. After this method completes, the entry details will be propagated in ClientFileEntry property.
When calling this method, pass the client connection ID in ConnectionID property, and the opened file handle (if needed) in Handle property.
Error Handling (C++)
This method returns a result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message. (Note: This method's result code can also be obtained by calling the GetLastErrorCode() method after it returns.)
ListClients Method (SFTPServer Class)
Enumerates the connected clients.
Syntax
ANSI (Cross Platform) char* ListClients(); Unicode (Windows) LPWSTR ListClients();
char* secureblackbox_sftpserver_listclients(void* lpObj);
QString ListClients();
Remarks
This method enumerates the connected clients. It returns a list of strings, with each string being of 'ConnectionID|Address|Port' format, and representing a single connection.
Error Handling (C++)
This method returns a String value; after it returns, call the GetLastErrorCode() method to obtain its result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message.
PinClient Method (SFTPServer Class)
Takes a snapshot of the connection's properties.
Syntax
ANSI (Cross Platform) int PinClient(int iConnectionId); Unicode (Windows) INT PinClient(INT iConnectionId);
int secureblackbox_sftpserver_pinclient(void* lpObj, int iConnectionId);
int PinClient(int iConnectionId);
Remarks
Use this method to take a snapshot of a connected client. The captured properties are populated in PinnedClient property.
Error Handling (C++)
This method returns a result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message. (Note: This method's result code can also be obtained by calling the GetLastErrorCode() method after it returns.)
SetClientBuffer Method (SFTPServer Class)
Commits a data buffer to the server class.
Syntax
ANSI (Cross Platform) int SetClientBuffer(int64 lConnectionID, const char* lpszHandle, const char* lpValue, int lenValue); Unicode (Windows) INT SetClientBuffer(LONG64 lConnectionID, LPCWSTR lpszHandle, LPCSTR lpValue, INT lenValue);
int secureblackbox_sftpserver_setclientbuffer(void* lpObj, int64 lConnectionID, const char* lpszHandle, const char* lpValue, int lenValue);
int SetClientBuffer(qint64 lConnectionID, const QString& qsHandle, QByteArray qbaValue);
Remarks
Use this method to commit a data buffer passed via the Value parameter to the server control in a thread-safe way.
One example where you might need to pass your buffer to the server is when customizing upload operations via ReadFile event.
Error Handling (C++)
This method returns a result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message. (Note: This method's result code can also be obtained by calling the GetLastErrorCode() method after it returns.)
SetClientFileEntry Method (SFTPServer Class)
Commits the file entry details to the class.
Syntax
ANSI (Cross Platform) int SetClientFileEntry(int64 lConnectionID, const char* lpszHandle); Unicode (Windows) INT SetClientFileEntry(LONG64 lConnectionID, LPCWSTR lpszHandle);
int secureblackbox_sftpserver_setclientfileentry(void* lpObj, int64 lConnectionID, const char* lpszHandle);
int SetClientFileEntry(qint64 lConnectionID, const QString& qsHandle);
Remarks
Use this method to commit the file entry details configured in ClientFileEntry property to the server object in a thread-safe way. Pass the client's connection ID via ConnectionID property, and the file entry's handle via Handle.
Error Handling (C++)
This method returns a result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message. (Note: This method's result code can also be obtained by calling the GetLastErrorCode() method after it returns.)
Start Method (SFTPServer Class)
Starts SFTP server operation.
Syntax
ANSI (Cross Platform) int Start(); Unicode (Windows) INT Start();
int secureblackbox_sftpserver_start(void* lpObj);
int Start();
Remarks
Call this method to start listening to incoming connections.
Error Handling (C++)
This method returns a result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message. (Note: This method's result code can also be obtained by calling the GetLastErrorCode() method after it returns.)
Stop Method (SFTPServer Class)
Stops SFTP server.
Syntax
ANSI (Cross Platform) int Stop(); Unicode (Windows) INT Stop();
int secureblackbox_sftpserver_stop(void* lpObj);
int Stop();
Remarks
Call this method to close all connections and stop listening to clients.
Error Handling (C++)
This method returns a result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message. (Note: This method's result code can also be obtained by calling the GetLastErrorCode() method after it returns.)
Accept Event (SFTPServer Class)
This event is fired when new incoming connection is accepted.
Syntax
ANSI (Cross Platform) virtual int FireAccept(SFTPServerAcceptEventParams *e);
typedef struct {
const char *RemoteAddress;
int RemotePort;
int Accept; int reserved; } SFTPServerAcceptEventParams;
Unicode (Windows) virtual INT FireAccept(SFTPServerAcceptEventParams *e);
typedef struct {
LPCWSTR RemoteAddress;
INT RemotePort;
BOOL Accept; INT reserved; } SFTPServerAcceptEventParams;
#define EID_SFTPSERVER_ACCEPT 1 virtual INT SECUREBLACKBOX_CALL FireAccept(LPSTR &lpszRemoteAddress, INT &iRemotePort, BOOL &bAccept);
class SFTPServerAcceptEventParams { public: const QString &RemoteAddress(); int RemotePort(); bool Accept(); void SetAccept(bool bAccept); int EventRetVal(); void SetEventRetVal(int iRetVal); };
// To handle, connect one or more slots to this signal. void Accept(SFTPServerAcceptEventParams *e);
// Or, subclass SFTPServer and override this emitter function. virtual int FireAccept(SFTPServerAcceptEventParams *e) {...}
Remarks
This event is fired by the class before a new incoming connection is accepted. RemoteAddress contains the IP address of the connecting client. Use the Accept parameter to either accept, or reject the connection.
AfterCreateDirectory Event (SFTPServer Class)
This event indicates completion of directory creation request.
Syntax
ANSI (Cross Platform) virtual int FireAfterCreateDirectory(SFTPServerAfterCreateDirectoryEventParams *e);
typedef struct {
int64 ConnectionID;
const char *Path;
int OperationStatus; int reserved; } SFTPServerAfterCreateDirectoryEventParams;
Unicode (Windows) virtual INT FireAfterCreateDirectory(SFTPServerAfterCreateDirectoryEventParams *e);
typedef struct {
LONG64 ConnectionID;
LPCWSTR Path;
INT OperationStatus; INT reserved; } SFTPServerAfterCreateDirectoryEventParams;
#define EID_SFTPSERVER_AFTERCREATEDIRECTORY 2 virtual INT SECUREBLACKBOX_CALL FireAfterCreateDirectory(LONG64 &lConnectionID, LPSTR &lpszPath, INT &iOperationStatus);
class SFTPServerAfterCreateDirectoryEventParams { public: qint64 ConnectionID(); const QString &Path(); int OperationStatus(); void SetOperationStatus(int iOperationStatus); int EventRetVal(); void SetEventRetVal(int iRetVal); };
// To handle, connect one or more slots to this signal. void AfterCreateDirectory(SFTPServerAfterCreateDirectoryEventParams *e);
// Or, subclass SFTPServer and override this emitter function. virtual int FireAfterCreateDirectory(SFTPServerAfterCreateDirectoryEventParams *e) {...}
Remarks
This event is fired to report completion of a directory creation request. The ConnectionID parameter specifies in which session the request was received, the Path specifies the directory path, and the OperationStatus contains the operation result.
If needed, you can amend the OperationStatus to return a different operation result:
ostOk | 1 | |
ostNoSuchFile | 2 | |
ostAccessDenied | 3 | |
ostWriteProtect | 4 | |
ostUnsupported | 5 | |
ostInvalidParameter | 6 | |
ostEOF | 7 |
AfterRemove Event (SFTPServer Class)
This event indicates completion of file removal request.
Syntax
ANSI (Cross Platform) virtual int FireAfterRemove(SFTPServerAfterRemoveEventParams *e);
typedef struct {
int64 ConnectionID;
const char *Path;
int OperationStatus; int reserved; } SFTPServerAfterRemoveEventParams;
Unicode (Windows) virtual INT FireAfterRemove(SFTPServerAfterRemoveEventParams *e);
typedef struct {
LONG64 ConnectionID;
LPCWSTR Path;
INT OperationStatus; INT reserved; } SFTPServerAfterRemoveEventParams;
#define EID_SFTPSERVER_AFTERREMOVE 3 virtual INT SECUREBLACKBOX_CALL FireAfterRemove(LONG64 &lConnectionID, LPSTR &lpszPath, INT &iOperationStatus);
class SFTPServerAfterRemoveEventParams { public: qint64 ConnectionID(); const QString &Path(); int OperationStatus(); void SetOperationStatus(int iOperationStatus); int EventRetVal(); void SetEventRetVal(int iRetVal); };
// To handle, connect one or more slots to this signal. void AfterRemove(SFTPServerAfterRemoveEventParams *e);
// Or, subclass SFTPServer and override this emitter function. virtual int FireAfterRemove(SFTPServerAfterRemoveEventParams *e) {...}
Remarks
This event is fired when a request to delete a file or directory has been processed by the server. The ConnectionID parameter specifies the session in which the request was received. OperationStatus contains the operation result.
If needed, you can amend the OperationStatus to return a different operation result:
ostOk | 1 | |
ostNoSuchFile | 2 | |
ostAccessDenied | 3 | |
ostWriteProtect | 4 | |
ostUnsupported | 5 | |
ostInvalidParameter | 6 | |
ostEOF | 7 |
AfterRenameFile Event (SFTPServer Class)
This event indicates completion of a file rename operation.
Syntax
ANSI (Cross Platform) virtual int FireAfterRenameFile(SFTPServerAfterRenameFileEventParams *e);
typedef struct {
int64 ConnectionID;
const char *OldPath;
const char *NewPath;
int OperationStatus; int reserved; } SFTPServerAfterRenameFileEventParams;
Unicode (Windows) virtual INT FireAfterRenameFile(SFTPServerAfterRenameFileEventParams *e);
typedef struct {
LONG64 ConnectionID;
LPCWSTR OldPath;
LPCWSTR NewPath;
INT OperationStatus; INT reserved; } SFTPServerAfterRenameFileEventParams;
#define EID_SFTPSERVER_AFTERRENAMEFILE 4 virtual INT SECUREBLACKBOX_CALL FireAfterRenameFile(LONG64 &lConnectionID, LPSTR &lpszOldPath, LPSTR &lpszNewPath, INT &iOperationStatus);
class SFTPServerAfterRenameFileEventParams { public: qint64 ConnectionID(); const QString &OldPath(); const QString &NewPath(); int OperationStatus(); void SetOperationStatus(int iOperationStatus); int EventRetVal(); void SetEventRetVal(int iRetVal); };
// To handle, connect one or more slots to this signal. void AfterRenameFile(SFTPServerAfterRenameFileEventParams *e);
// Or, subclass SFTPServer and override this emitter function. virtual int FireAfterRenameFile(SFTPServerAfterRenameFileEventParams *e) {...}
Remarks
This event is fired when a request to rename a file (from OldPath to NewPath) has been processed. The ConnectionID parameter specifies in which session the request was received, and OperationStatus contains the operation result.
If needed, you can amend the OperationStatus to return a different operation result:
ostOk | 1 | |
ostNoSuchFile | 2 | |
ostAccessDenied | 3 | |
ostWriteProtect | 4 | |
ostUnsupported | 5 | |
ostInvalidParameter | 6 | |
ostEOF | 7 |
AfterRequestAttributes Event (SFTPServer Class)
This event indicates completion of file attributes request.
Syntax
ANSI (Cross Platform) virtual int FireAfterRequestAttributes(SFTPServerAfterRequestAttributesEventParams *e);
typedef struct {
int64 ConnectionID;
const char *Path;
int OperationStatus; int reserved; } SFTPServerAfterRequestAttributesEventParams;
Unicode (Windows) virtual INT FireAfterRequestAttributes(SFTPServerAfterRequestAttributesEventParams *e);
typedef struct {
LONG64 ConnectionID;
LPCWSTR Path;
INT OperationStatus; INT reserved; } SFTPServerAfterRequestAttributesEventParams;
#define EID_SFTPSERVER_AFTERREQUESTATTRIBUTES 5 virtual INT SECUREBLACKBOX_CALL FireAfterRequestAttributes(LONG64 &lConnectionID, LPSTR &lpszPath, INT &iOperationStatus);
class SFTPServerAfterRequestAttributesEventParams { public: qint64 ConnectionID(); const QString &Path(); int OperationStatus(); void SetOperationStatus(int iOperationStatus); int EventRetVal(); void SetEventRetVal(int iRetVal); };
// To handle, connect one or more slots to this signal. void AfterRequestAttributes(SFTPServerAfterRequestAttributesEventParams *e);
// Or, subclass SFTPServer and override this emitter function. virtual int FireAfterRequestAttributes(SFTPServerAfterRequestAttributesEventParams *e) {...}
Remarks
This event is fired when a request for get file attributes has been processed by the server. The ConnectionID parameter specifies in which session the request was received. OperationStatus contains the result of the operation.
If needed, you can amend the OperationStatus to return a different operation result:
ostOk | 1 | |
ostNoSuchFile | 2 | |
ostAccessDenied | 3 | |
ostWriteProtect | 4 | |
ostUnsupported | 5 | |
ostInvalidParameter | 6 | |
ostEOF | 7 |
AfterSetAttributes Event (SFTPServer Class)
This event indicates completion of a set attributes request.
Syntax
ANSI (Cross Platform) virtual int FireAfterSetAttributes(SFTPServerAfterSetAttributesEventParams *e);
typedef struct {
int64 ConnectionID;
const char *Path;
int OperationStatus; int reserved; } SFTPServerAfterSetAttributesEventParams;
Unicode (Windows) virtual INT FireAfterSetAttributes(SFTPServerAfterSetAttributesEventParams *e);
typedef struct {
LONG64 ConnectionID;
LPCWSTR Path;
INT OperationStatus; INT reserved; } SFTPServerAfterSetAttributesEventParams;
#define EID_SFTPSERVER_AFTERSETATTRIBUTES 6 virtual INT SECUREBLACKBOX_CALL FireAfterSetAttributes(LONG64 &lConnectionID, LPSTR &lpszPath, INT &iOperationStatus);
class SFTPServerAfterSetAttributesEventParams { public: qint64 ConnectionID(); const QString &Path(); int OperationStatus(); void SetOperationStatus(int iOperationStatus); int EventRetVal(); void SetEventRetVal(int iRetVal); };
// To handle, connect one or more slots to this signal. void AfterSetAttributes(SFTPServerAfterSetAttributesEventParams *e);
// Or, subclass SFTPServer and override this emitter function. virtual int FireAfterSetAttributes(SFTPServerAfterSetAttributesEventParams *e) {...}
Remarks
This event is fired when a request for set file attributes has been processed. The ConnectionID parameter specifies in which session the request was received. The OperationStatus parameter contains the operation result.
If needed, you can amend the OperationStatus to return a different operation result:
ostOk | 1 | |
ostNoSuchFile | 2 | |
ostAccessDenied | 3 | |
ostWriteProtect | 4 | |
ostUnsupported | 5 | |
ostInvalidParameter | 6 | |
ostEOF | 7 |
AuthAttempt Event (SFTPServer Class)
Reports a user authentication attempt.
Syntax
ANSI (Cross Platform) virtual int FireAuthAttempt(SFTPServerAuthAttemptEventParams *e);
typedef struct {
int64 ConnectionID;
const char *Username;
int AuthType;
int Accept; int reserved; } SFTPServerAuthAttemptEventParams;
Unicode (Windows) virtual INT FireAuthAttempt(SFTPServerAuthAttemptEventParams *e);
typedef struct {
LONG64 ConnectionID;
LPCWSTR Username;
INT AuthType;
BOOL Accept; INT reserved; } SFTPServerAuthAttemptEventParams;
#define EID_SFTPSERVER_AUTHATTEMPT 7 virtual INT SECUREBLACKBOX_CALL FireAuthAttempt(LONG64 &lConnectionID, LPSTR &lpszUsername, INT &iAuthType, BOOL &bAccept);
class SFTPServerAuthAttemptEventParams { public: qint64 ConnectionID(); const QString &Username(); int AuthType(); bool Accept(); void SetAccept(bool bAccept); int EventRetVal(); void SetEventRetVal(int iRetVal); };
// To handle, connect one or more slots to this signal. void AuthAttempt(SFTPServerAuthAttemptEventParams *e);
// Or, subclass SFTPServer and override this emitter function. virtual int FireAuthAttempt(SFTPServerAuthAttemptEventParams *e) {...}
Remarks
ConnectionID identifies the session, Username specifies client's username, and AuthType specifies the authentication type. Use the Accept parameter to accept or decline the attempt.
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 (SFTPServer Class)
Reports user authentication failure.
Syntax
ANSI (Cross Platform) virtual int FireAuthFailed(SFTPServerAuthFailedEventParams *e);
typedef struct {
int64 ConnectionID;
const char *Username;
int AuthType; int reserved; } SFTPServerAuthFailedEventParams;
Unicode (Windows) virtual INT FireAuthFailed(SFTPServerAuthFailedEventParams *e);
typedef struct {
LONG64 ConnectionID;
LPCWSTR Username;
INT AuthType; INT reserved; } SFTPServerAuthFailedEventParams;
#define EID_SFTPSERVER_AUTHFAILED 8 virtual INT SECUREBLACKBOX_CALL FireAuthFailed(LONG64 &lConnectionID, LPSTR &lpszUsername, INT &iAuthType);
class SFTPServerAuthFailedEventParams { public: qint64 ConnectionID(); const QString &Username(); int AuthType(); int EventRetVal(); void SetEventRetVal(int iRetVal); };
// To handle, connect one or more slots to this signal. void AuthFailed(SFTPServerAuthFailedEventParams *e);
// Or, subclass SFTPServer and override this emitter function. virtual int FireAuthFailed(SFTPServerAuthFailedEventParams *e) {...}
Remarks
ConnectionID identifies the session, Username specify client's username, and AuthType specifies what authentication type was used.
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 |
AuthPassword Event (SFTPServer Class)
This event is fired on password authentication attempt from a client.
Syntax
ANSI (Cross Platform) virtual int FireAuthPassword(SFTPServerAuthPasswordEventParams *e);
typedef struct {
int64 ConnectionID;
const char *Username;
const char *Password;
int Accept;
int ForceChangePassword; int reserved; } SFTPServerAuthPasswordEventParams;
Unicode (Windows) virtual INT FireAuthPassword(SFTPServerAuthPasswordEventParams *e);
typedef struct {
LONG64 ConnectionID;
LPCWSTR Username;
LPCWSTR Password;
BOOL Accept;
BOOL ForceChangePassword; INT reserved; } SFTPServerAuthPasswordEventParams;
#define EID_SFTPSERVER_AUTHPASSWORD 9 virtual INT SECUREBLACKBOX_CALL FireAuthPassword(LONG64 &lConnectionID, LPSTR &lpszUsername, LPSTR &lpszPassword, BOOL &bAccept, BOOL &bForceChangePassword);
class SFTPServerAuthPasswordEventParams { public: qint64 ConnectionID(); const QString &Username(); const QString &Password(); bool Accept(); void SetAccept(bool bAccept); bool ForceChangePassword(); void SetForceChangePassword(bool bForceChangePassword); int EventRetVal(); void SetEventRetVal(int iRetVal); };
// To handle, connect one or more slots to this signal. void AuthPassword(SFTPServerAuthPasswordEventParams *e);
// Or, subclass SFTPServer and override this emitter function. virtual int FireAuthPassword(SFTPServerAuthPasswordEventParams *e) {...}
Remarks
Parameters Username and Password contain user credentials. If they are correct, set Accept to true. You can request password change by setting ForceChangePassword to true.
AuthPublicKey Event (SFTPServer Class)
This event is fired on public key authentication attempt from a client.
Syntax
ANSI (Cross Platform) virtual int FireAuthPublicKey(SFTPServerAuthPublicKeyEventParams *e);
typedef struct {
int64 ConnectionID;
const char *Username;
int Accept; int reserved; } SFTPServerAuthPublicKeyEventParams;
Unicode (Windows) virtual INT FireAuthPublicKey(SFTPServerAuthPublicKeyEventParams *e);
typedef struct {
LONG64 ConnectionID;
LPCWSTR Username;
BOOL Accept; INT reserved; } SFTPServerAuthPublicKeyEventParams;
#define EID_SFTPSERVER_AUTHPUBLICKEY 10 virtual INT SECUREBLACKBOX_CALL FireAuthPublicKey(LONG64 &lConnectionID, LPSTR &lpszUsername, BOOL &bAccept);
class SFTPServerAuthPublicKeyEventParams { public: qint64 ConnectionID(); const QString &Username(); bool Accept(); void SetAccept(bool bAccept); int EventRetVal(); void SetEventRetVal(int iRetVal); };
// To handle, connect one or more slots to this signal. void AuthPublicKey(SFTPServerAuthPublicKeyEventParams *e);
// Or, subclass SFTPServer and override this emitter function. virtual int FireAuthPublicKey(SFTPServerAuthPublicKeyEventParams *e) {...}
Remarks
Username specifies client's username, and Accept is used to accept or reject authentication.
AuthSucceeded Event (SFTPServer Class)
Reports a successful user authentication.
Syntax
ANSI (Cross Platform) virtual int FireAuthSucceeded(SFTPServerAuthSucceededEventParams *e);
typedef struct {
int64 ConnectionID;
const char *Username;
int AuthType; int reserved; } SFTPServerAuthSucceededEventParams;
Unicode (Windows) virtual INT FireAuthSucceeded(SFTPServerAuthSucceededEventParams *e);
typedef struct {
LONG64 ConnectionID;
LPCWSTR Username;
INT AuthType; INT reserved; } SFTPServerAuthSucceededEventParams;
#define EID_SFTPSERVER_AUTHSUCCEEDED 11 virtual INT SECUREBLACKBOX_CALL FireAuthSucceeded(LONG64 &lConnectionID, LPSTR &lpszUsername, INT &iAuthType);
class SFTPServerAuthSucceededEventParams { public: qint64 ConnectionID(); const QString &Username(); int AuthType(); int EventRetVal(); void SetEventRetVal(int iRetVal); };
// To handle, connect one or more slots to this signal. void AuthSucceeded(SFTPServerAuthSucceededEventParams *e);
// Or, subclass SFTPServer and override this emitter function. virtual int FireAuthSucceeded(SFTPServerAuthSucceededEventParams *e) {...}
Remarks
ConnectionID identifies the session, Username specify client's username, and AuthType specifies what authentication type was used.
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 |
BeforeCreateDirectory Event (SFTPServer Class)
This event is fired when a client requests to create a directory.
Syntax
ANSI (Cross Platform) virtual int FireBeforeCreateDirectory(SFTPServerBeforeCreateDirectoryEventParams *e);
typedef struct {
int64 ConnectionID;
const char *Path;
int Action; int reserved; } SFTPServerBeforeCreateDirectoryEventParams;
Unicode (Windows) virtual INT FireBeforeCreateDirectory(SFTPServerBeforeCreateDirectoryEventParams *e);
typedef struct {
LONG64 ConnectionID;
LPCWSTR Path;
INT Action; INT reserved; } SFTPServerBeforeCreateDirectoryEventParams;
#define EID_SFTPSERVER_BEFORECREATEDIRECTORY 12 virtual INT SECUREBLACKBOX_CALL FireBeforeCreateDirectory(LONG64 &lConnectionID, LPSTR &lpszPath, INT &iAction);
class SFTPServerBeforeCreateDirectoryEventParams { public: qint64 ConnectionID(); const QString &Path(); int Action(); void SetAction(int iAction); int EventRetVal(); void SetEventRetVal(int iRetVal); };
// To handle, connect one or more slots to this signal. void BeforeCreateDirectory(SFTPServerBeforeCreateDirectoryEventParams *e);
// Or, subclass SFTPServer and override this emitter function. virtual int FireBeforeCreateDirectory(SFTPServerBeforeCreateDirectoryEventParams *e) {...}
Remarks
This event is fired when a request to create a directory has been received. The ConnectionID parameter specifies in which session the request was received.
Choose Action as one of the following values:
fraAuto | 1 | Handle the requested action automatically by the server |
fraCustom | 2 | Override the action using the user code logic |
fraAbort | 3 | Abort the requested action |
BeforeDownloadFile Event (SFTPServer Class)
This event is fired when a download file request is received.
Syntax
ANSI (Cross Platform) virtual int FireBeforeDownloadFile(SFTPServerBeforeDownloadFileEventParams *e);
typedef struct {
int64 ConnectionID;
const char *Path;
int Action; int reserved; } SFTPServerBeforeDownloadFileEventParams;
Unicode (Windows) virtual INT FireBeforeDownloadFile(SFTPServerBeforeDownloadFileEventParams *e);
typedef struct {
LONG64 ConnectionID;
LPCWSTR Path;
INT Action; INT reserved; } SFTPServerBeforeDownloadFileEventParams;
#define EID_SFTPSERVER_BEFOREDOWNLOADFILE 13 virtual INT SECUREBLACKBOX_CALL FireBeforeDownloadFile(LONG64 &lConnectionID, LPSTR &lpszPath, INT &iAction);
class SFTPServerBeforeDownloadFileEventParams { public: qint64 ConnectionID(); const QString &Path(); int Action(); void SetAction(int iAction); int EventRetVal(); void SetEventRetVal(int iRetVal); };
// To handle, connect one or more slots to this signal. void BeforeDownloadFile(SFTPServerBeforeDownloadFileEventParams *e);
// Or, subclass SFTPServer and override this emitter function. virtual int FireBeforeDownloadFile(SFTPServerBeforeDownloadFileEventParams *e) {...}
Remarks
This event is fired when a request to download file is received from the client. The ConnectionID parameter specifies in which session the request was received.
Choose Action as one of the following values:
fraAuto | 1 | Handle the requested action automatically by the server |
fraCustom | 2 | Override the action using the user code logic |
fraAbort | 3 | Abort the requested action |
BeforeFind Event (SFTPServer Class)
This event is fired when a client requests to find files and folders in Path.
Syntax
ANSI (Cross Platform) virtual int FireBeforeFind(SFTPServerBeforeFindEventParams *e);
typedef struct {
int64 ConnectionID;
const char *Path;
int Action; int reserved; } SFTPServerBeforeFindEventParams;
Unicode (Windows) virtual INT FireBeforeFind(SFTPServerBeforeFindEventParams *e);
typedef struct {
LONG64 ConnectionID;
LPCWSTR Path;
INT Action; INT reserved; } SFTPServerBeforeFindEventParams;
#define EID_SFTPSERVER_BEFOREFIND 14 virtual INT SECUREBLACKBOX_CALL FireBeforeFind(LONG64 &lConnectionID, LPSTR &lpszPath, INT &iAction);
class SFTPServerBeforeFindEventParams { public: qint64 ConnectionID(); const QString &Path(); int Action(); void SetAction(int iAction); int EventRetVal(); void SetEventRetVal(int iRetVal); };
// To handle, connect one or more slots to this signal. void BeforeFind(SFTPServerBeforeFindEventParams *e);
// Or, subclass SFTPServer and override this emitter function. virtual int FireBeforeFind(SFTPServerBeforeFindEventParams *e) {...}
Remarks
This event is fired when a request to find files and folders in Path has been received. The ConnectionID parameter specifies in which session the request was received.
Choose Action as one of the following values:
fraAuto | 1 | Handle the requested action automatically by the server |
fraCustom | 2 | Override the action using the user code logic |
fraAbort | 3 | Abort the requested action |
BeforeRemove Event (SFTPServer Class)
This event is fired when a client requests to delete a file or directory.
Syntax
ANSI (Cross Platform) virtual int FireBeforeRemove(SFTPServerBeforeRemoveEventParams *e);
typedef struct {
int64 ConnectionID;
const char *Path;
int Action; int reserved; } SFTPServerBeforeRemoveEventParams;
Unicode (Windows) virtual INT FireBeforeRemove(SFTPServerBeforeRemoveEventParams *e);
typedef struct {
LONG64 ConnectionID;
LPCWSTR Path;
INT Action; INT reserved; } SFTPServerBeforeRemoveEventParams;
#define EID_SFTPSERVER_BEFOREREMOVE 15 virtual INT SECUREBLACKBOX_CALL FireBeforeRemove(LONG64 &lConnectionID, LPSTR &lpszPath, INT &iAction);
class SFTPServerBeforeRemoveEventParams { public: qint64 ConnectionID(); const QString &Path(); int Action(); void SetAction(int iAction); int EventRetVal(); void SetEventRetVal(int iRetVal); };
// To handle, connect one or more slots to this signal. void BeforeRemove(SFTPServerBeforeRemoveEventParams *e);
// Or, subclass SFTPServer and override this emitter function. virtual int FireBeforeRemove(SFTPServerBeforeRemoveEventParams *e) {...}
Remarks
This event is fired when a request to delete a file or directory is received from the client. The ConnectionID parameter specifies in which session the request was received.
Choose Action as one of the following values:
fraAuto | 1 | Handle the requested action automatically by the server |
fraCustom | 2 | Override the action using the user code logic |
fraAbort | 3 | Abort the requested action |
BeforeRenameFile Event (SFTPServer Class)
This event is fired when a client requests to rename a file.
Syntax
ANSI (Cross Platform) virtual int FireBeforeRenameFile(SFTPServerBeforeRenameFileEventParams *e);
typedef struct {
int64 ConnectionID;
const char *OldPath;
const char *NewPath;
int Action; int reserved; } SFTPServerBeforeRenameFileEventParams;
Unicode (Windows) virtual INT FireBeforeRenameFile(SFTPServerBeforeRenameFileEventParams *e);
typedef struct {
LONG64 ConnectionID;
LPCWSTR OldPath;
LPCWSTR NewPath;
INT Action; INT reserved; } SFTPServerBeforeRenameFileEventParams;
#define EID_SFTPSERVER_BEFORERENAMEFILE 16 virtual INT SECUREBLACKBOX_CALL FireBeforeRenameFile(LONG64 &lConnectionID, LPSTR &lpszOldPath, LPSTR &lpszNewPath, INT &iAction);
class SFTPServerBeforeRenameFileEventParams { public: qint64 ConnectionID(); const QString &OldPath(); const QString &NewPath(); int Action(); void SetAction(int iAction); int EventRetVal(); void SetEventRetVal(int iRetVal); };
// To handle, connect one or more slots to this signal. void BeforeRenameFile(SFTPServerBeforeRenameFileEventParams *e);
// Or, subclass SFTPServer and override this emitter function. virtual int FireBeforeRenameFile(SFTPServerBeforeRenameFileEventParams *e) {...}
Remarks
This event is fired when a request to rename a file (from OldPath to NewPath) is received from the client. The ConnectionID parameter specifies in which session the request was received.
Choose Action as one of the following values:
fraAuto | 1 | Handle the requested action automatically by the server |
fraCustom | 2 | Override the action using the user code logic |
fraAbort | 3 | Abort the requested action |
BeforeRequestAttributes Event (SFTPServer Class)
This event is fired when a client requests to get file attributes.
Syntax
ANSI (Cross Platform) virtual int FireBeforeRequestAttributes(SFTPServerBeforeRequestAttributesEventParams *e);
typedef struct {
int64 ConnectionID;
const char *Path;
int Action; int reserved; } SFTPServerBeforeRequestAttributesEventParams;
Unicode (Windows) virtual INT FireBeforeRequestAttributes(SFTPServerBeforeRequestAttributesEventParams *e);
typedef struct {
LONG64 ConnectionID;
LPCWSTR Path;
INT Action; INT reserved; } SFTPServerBeforeRequestAttributesEventParams;
#define EID_SFTPSERVER_BEFOREREQUESTATTRIBUTES 17 virtual INT SECUREBLACKBOX_CALL FireBeforeRequestAttributes(LONG64 &lConnectionID, LPSTR &lpszPath, INT &iAction);
class SFTPServerBeforeRequestAttributesEventParams { public: qint64 ConnectionID(); const QString &Path(); int Action(); void SetAction(int iAction); int EventRetVal(); void SetEventRetVal(int iRetVal); };
// To handle, connect one or more slots to this signal. void BeforeRequestAttributes(SFTPServerBeforeRequestAttributesEventParams *e);
// Or, subclass SFTPServer and override this emitter function. virtual int FireBeforeRequestAttributes(SFTPServerBeforeRequestAttributesEventParams *e) {...}
Remarks
This event is fired when a request to get file attributes has been received. The ConnectionID parameter specifies in which session the request was received.
Choose Action as one of the following values:
fraAuto | 1 | Handle the requested action automatically by the server |
fraCustom | 2 | Override the action using the user code logic |
fraAbort | 3 | Abort the requested action |
BeforeSetAttributes Event (SFTPServer Class)
This event is fired when a client requests to set file attributes.
Syntax
ANSI (Cross Platform) virtual int FireBeforeSetAttributes(SFTPServerBeforeSetAttributesEventParams *e);
typedef struct {
int64 ConnectionID;
const char *Path;
int Action; int reserved; } SFTPServerBeforeSetAttributesEventParams;
Unicode (Windows) virtual INT FireBeforeSetAttributes(SFTPServerBeforeSetAttributesEventParams *e);
typedef struct {
LONG64 ConnectionID;
LPCWSTR Path;
INT Action; INT reserved; } SFTPServerBeforeSetAttributesEventParams;
#define EID_SFTPSERVER_BEFORESETATTRIBUTES 18 virtual INT SECUREBLACKBOX_CALL FireBeforeSetAttributes(LONG64 &lConnectionID, LPSTR &lpszPath, INT &iAction);
class SFTPServerBeforeSetAttributesEventParams { public: qint64 ConnectionID(); const QString &Path(); int Action(); void SetAction(int iAction); int EventRetVal(); void SetEventRetVal(int iRetVal); };
// To handle, connect one or more slots to this signal. void BeforeSetAttributes(SFTPServerBeforeSetAttributesEventParams *e);
// Or, subclass SFTPServer and override this emitter function. virtual int FireBeforeSetAttributes(SFTPServerBeforeSetAttributesEventParams *e) {...}
Remarks
This event is fired when a request to set file attributes has been received. The ConnectionID parameter specifies in which session the request was received.
Choose Action as one of the following values:
fraAuto | 1 | Handle the requested action automatically by the server |
fraCustom | 2 | Override the action using the user code logic |
fraAbort | 3 | Abort the requested action |
BeforeUploadFile Event (SFTPServer Class)
This event is fired when an upload file request is received.
Syntax
ANSI (Cross Platform) virtual int FireBeforeUploadFile(SFTPServerBeforeUploadFileEventParams *e);
typedef struct {
int64 ConnectionID;
const char *Path;
int Action; int reserved; } SFTPServerBeforeUploadFileEventParams;
Unicode (Windows) virtual INT FireBeforeUploadFile(SFTPServerBeforeUploadFileEventParams *e);
typedef struct {
LONG64 ConnectionID;
LPCWSTR Path;
INT Action; INT reserved; } SFTPServerBeforeUploadFileEventParams;
#define EID_SFTPSERVER_BEFOREUPLOADFILE 19 virtual INT SECUREBLACKBOX_CALL FireBeforeUploadFile(LONG64 &lConnectionID, LPSTR &lpszPath, INT &iAction);
class SFTPServerBeforeUploadFileEventParams { public: qint64 ConnectionID(); const QString &Path(); int Action(); void SetAction(int iAction); int EventRetVal(); void SetEventRetVal(int iRetVal); };
// To handle, connect one or more slots to this signal. void BeforeUploadFile(SFTPServerBeforeUploadFileEventParams *e);
// Or, subclass SFTPServer and override this emitter function. virtual int FireBeforeUploadFile(SFTPServerBeforeUploadFileEventParams *e) {...}
Remarks
This event is fired when an upload file request is received from the client. The ConnectionID parameter specifies in which session the request was received, and Path specifies the location on the server where the file needs to be saved.
Choose Action as one of the following values:
fraAuto | 1 | Handle the requested action automatically by the server |
fraCustom | 2 | Override the action using the user code logic |
fraAbort | 3 | Abort the requested action |
CloseFile Event (SFTPServer Class)
This event instructs the application to close an opened file.
Syntax
ANSI (Cross Platform) virtual int FireCloseFile(SFTPServerCloseFileEventParams *e);
typedef struct {
int64 ConnectionID;
const char *Handle;
int OperationStatus; int reserved; } SFTPServerCloseFileEventParams;
Unicode (Windows) virtual INT FireCloseFile(SFTPServerCloseFileEventParams *e);
typedef struct {
LONG64 ConnectionID;
LPCWSTR Handle;
INT OperationStatus; INT reserved; } SFTPServerCloseFileEventParams;
#define EID_SFTPSERVER_CLOSEFILE 20 virtual INT SECUREBLACKBOX_CALL FireCloseFile(LONG64 &lConnectionID, LPSTR &lpszHandle, INT &iOperationStatus);
class SFTPServerCloseFileEventParams { public: qint64 ConnectionID(); const QString &Handle(); int OperationStatus(); void SetOperationStatus(int iOperationStatus); int EventRetVal(); void SetEventRetVal(int iRetVal); };
// To handle, connect one or more slots to this signal. void CloseFile(SFTPServerCloseFileEventParams *e);
// Or, subclass SFTPServer and override this emitter function. virtual int FireCloseFile(SFTPServerCloseFileEventParams *e) {...}
Remarks
This event is fired upon receipt of a close-file packet from a client. Servers implementing virtualized transfers must close the previously opened local file referenced by Handle in this event handler. No further operations are allowed with the closed file.
Set OperationStatus to one of the following values to report the result of this operation to the client:
ostOk | 1 | |
ostNoSuchFile | 2 | |
ostAccessDenied | 3 | |
ostWriteProtect | 4 | |
ostUnsupported | 5 | |
ostInvalidParameter | 6 | |
ostEOF | 7 |
Connect Event (SFTPServer Class)
This event is fired when a remote connection has been established.
Syntax
ANSI (Cross Platform) virtual int FireConnect(SFTPServerConnectEventParams *e);
typedef struct {
int64 ConnectionID;
const char *RemoteAddress;
int RemotePort; int reserved; } SFTPServerConnectEventParams;
Unicode (Windows) virtual INT FireConnect(SFTPServerConnectEventParams *e);
typedef struct {
LONG64 ConnectionID;
LPCWSTR RemoteAddress;
INT RemotePort; INT reserved; } SFTPServerConnectEventParams;
#define EID_SFTPSERVER_CONNECT 21 virtual INT SECUREBLACKBOX_CALL FireConnect(LONG64 &lConnectionID, LPSTR &lpszRemoteAddress, INT &iRemotePort);
class SFTPServerConnectEventParams { public: qint64 ConnectionID(); const QString &RemoteAddress(); int RemotePort(); int EventRetVal(); void SetEventRetVal(int iRetVal); };
// To handle, connect one or more slots to this signal. void Connect(SFTPServerConnectEventParams *e);
// Or, subclass SFTPServer and override this emitter function. virtual int FireConnect(SFTPServerConnectEventParams *e) {...}
Remarks
ConnectionID contains a session identifier, and RemoteAddress specifies the client's IP address.
CreateDirectory Event (SFTPServer Class)
This event instructs the application to create a directory.
Syntax
ANSI (Cross Platform) virtual int FireCreateDirectory(SFTPServerCreateDirectoryEventParams *e);
typedef struct {
int64 ConnectionID;
const char *Path;
int OperationStatus; int reserved; } SFTPServerCreateDirectoryEventParams;
Unicode (Windows) virtual INT FireCreateDirectory(SFTPServerCreateDirectoryEventParams *e);
typedef struct {
LONG64 ConnectionID;
LPCWSTR Path;
INT OperationStatus; INT reserved; } SFTPServerCreateDirectoryEventParams;
#define EID_SFTPSERVER_CREATEDIRECTORY 22 virtual INT SECUREBLACKBOX_CALL FireCreateDirectory(LONG64 &lConnectionID, LPSTR &lpszPath, INT &iOperationStatus);
class SFTPServerCreateDirectoryEventParams { public: qint64 ConnectionID(); const QString &Path(); int OperationStatus(); void SetOperationStatus(int iOperationStatus); int EventRetVal(); void SetEventRetVal(int iRetVal); };
// To handle, connect one or more slots to this signal. void CreateDirectory(SFTPServerCreateDirectoryEventParams *e);
// Or, subclass SFTPServer and override this emitter function. virtual int FireCreateDirectory(SFTPServerCreateDirectoryEventParams *e) {...}
Remarks
This event is fired when a request to create a directory has been received and needs to be served (virtualized) by the application. The ConnectionID parameter specifies the session that has communicated the request, and Path contains the name of the directory to be created.
Set OperationStatus to one of the below values according to the outcome of the request processing:
ostOk | 1 | |
ostNoSuchFile | 2 | |
ostAccessDenied | 3 | |
ostWriteProtect | 4 | |
ostUnsupported | 5 | |
ostInvalidParameter | 6 | |
ostEOF | 7 |
Disconnect Event (SFTPServer Class)
This event is fired when a client has disconnected.
Syntax
ANSI (Cross Platform) virtual int FireDisconnect(SFTPServerDisconnectEventParams *e);
typedef struct {
int64 ConnectionID; int reserved; } SFTPServerDisconnectEventParams;
Unicode (Windows) virtual INT FireDisconnect(SFTPServerDisconnectEventParams *e);
typedef struct {
LONG64 ConnectionID; INT reserved; } SFTPServerDisconnectEventParams;
#define EID_SFTPSERVER_DISCONNECT 23 virtual INT SECUREBLACKBOX_CALL FireDisconnect(LONG64 &lConnectionID);
class SFTPServerDisconnectEventParams { public: qint64 ConnectionID(); int EventRetVal(); void SetEventRetVal(int iRetVal); };
// To handle, connect one or more slots to this signal. void Disconnect(SFTPServerDisconnectEventParams *e);
// Or, subclass SFTPServer and override this emitter function. virtual int FireDisconnect(SFTPServerDisconnectEventParams *e) {...}
Remarks
This event reports loss of connection to the client within the session specified by ConnectionID.
Error Event (SFTPServer Class)
Information about errors during data delivery.
Syntax
ANSI (Cross Platform) virtual int FireError(SFTPServerErrorEventParams *e);
typedef struct {
int ErrorCode;
const char *Description; int reserved; } SFTPServerErrorEventParams;
Unicode (Windows) virtual INT FireError(SFTPServerErrorEventParams *e);
typedef struct {
INT ErrorCode;
LPCWSTR Description; INT reserved; } SFTPServerErrorEventParams;
#define EID_SFTPSERVER_ERROR 24 virtual INT SECUREBLACKBOX_CALL FireError(INT &iErrorCode, LPSTR &lpszDescription);
class SFTPServerErrorEventParams { public: int ErrorCode(); const QString &Description(); int EventRetVal(); void SetEventRetVal(int iRetVal); };
// To handle, connect one or more slots to this signal. void Error(SFTPServerErrorEventParams *e);
// Or, subclass SFTPServer and override this emitter function. virtual int FireError(SFTPServerErrorEventParams *e) {...}
Remarks
The event is fired in case of exceptional conditions during message processing.
ErrorCode contains an error code and Description contains a textual description of the error. For a list of valid error codes and their descriptions, please refer to the SFTP section.
ExternalSign Event (SFTPServer Class)
Handles remote or external signing initiated by the server protocol.
Syntax
ANSI (Cross Platform) virtual int FireExternalSign(SFTPServerExternalSignEventParams *e);
typedef struct {
int64 ConnectionID;
const char *OperationId;
const char *HashAlgorithm;
const char *Pars;
const char *Data;
char *SignedData; int reserved; } SFTPServerExternalSignEventParams;
Unicode (Windows) virtual INT FireExternalSign(SFTPServerExternalSignEventParams *e);
typedef struct {
LONG64 ConnectionID;
LPCWSTR OperationId;
LPCWSTR HashAlgorithm;
LPCWSTR Pars;
LPCWSTR Data;
LPWSTR SignedData; INT reserved; } SFTPServerExternalSignEventParams;
#define EID_SFTPSERVER_EXTERNALSIGN 25 virtual INT SECUREBLACKBOX_CALL FireExternalSign(LONG64 &lConnectionID, LPSTR &lpszOperationId, LPSTR &lpszHashAlgorithm, LPSTR &lpszPars, LPSTR &lpszData, LPSTR &lpszSignedData);
class SFTPServerExternalSignEventParams { public: qint64 ConnectionID(); const QString &OperationId(); const QString &HashAlgorithm(); const QString &Pars(); const QString &Data(); const QString &SignedData(); void SetSignedData(const QString &qsSignedData); int EventRetVal(); void SetEventRetVal(int iRetVal); };
// To handle, connect one or more slots to this signal. void ExternalSign(SFTPServerExternalSignEventParams *e);
// Or, subclass SFTPServer and override this emitter function. virtual int FireExternalSign(SFTPServerExternalSignEventParams *e) {...}
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 class via the SignedData parameter.
OperationId provides a comment about the operation and its origin. It depends on the exact class being used, and may be empty. HashAlgorithm specifies the hash algorithm being used for the operation, and Pars contains algorithm-dependent parameters.
The class 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:
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();
};
FindClose Event (SFTPServer Class)
This event signifies the completion of a custom file listing operation.
Syntax
ANSI (Cross Platform) virtual int FireFindClose(SFTPServerFindCloseEventParams *e);
typedef struct {
int64 ConnectionID;
const char *Handle;
int OperationStatus; int reserved; } SFTPServerFindCloseEventParams;
Unicode (Windows) virtual INT FireFindClose(SFTPServerFindCloseEventParams *e);
typedef struct {
LONG64 ConnectionID;
LPCWSTR Handle;
INT OperationStatus; INT reserved; } SFTPServerFindCloseEventParams;
#define EID_SFTPSERVER_FINDCLOSE 26 virtual INT SECUREBLACKBOX_CALL FireFindClose(LONG64 &lConnectionID, LPSTR &lpszHandle, INT &iOperationStatus);
class SFTPServerFindCloseEventParams { public: qint64 ConnectionID(); const QString &Handle(); int OperationStatus(); void SetOperationStatus(int iOperationStatus); int EventRetVal(); void SetEventRetVal(int iRetVal); };
// To handle, connect one or more slots to this signal. void FindClose(SFTPServerFindCloseEventParams *e);
// Or, subclass SFTPServer and override this emitter function. virtual int FireFindClose(SFTPServerFindCloseEventParams *e) {...}
Remarks
FindClose notifies your code about the completion of a custom file listing request. Use it in conjunction with FindFirst and FindNext to handle file listing requests manually.
See FindFirst topic for the details on implementing customized file listing request processing.
Set OperationStatus to one of the below values according to the outcome of the request processing:
ostOk | 1 | |
ostNoSuchFile | 2 | |
ostAccessDenied | 3 | |
ostWriteProtect | 4 | |
ostUnsupported | 5 | |
ostInvalidParameter | 6 | |
ostEOF | 7 |
FindFirst Event (SFTPServer Class)
This event signifies the start of the custom file listing retrieval mechanism.
Syntax
ANSI (Cross Platform) virtual int FireFindFirst(SFTPServerFindFirstEventParams *e);
typedef struct {
int64 ConnectionID;
const char *Path;
int OperationStatus;
char *Handle; int reserved; } SFTPServerFindFirstEventParams;
Unicode (Windows) virtual INT FireFindFirst(SFTPServerFindFirstEventParams *e);
typedef struct {
LONG64 ConnectionID;
LPCWSTR Path;
INT OperationStatus;
LPWSTR Handle; INT reserved; } SFTPServerFindFirstEventParams;
#define EID_SFTPSERVER_FINDFIRST 27 virtual INT SECUREBLACKBOX_CALL FireFindFirst(LONG64 &lConnectionID, LPSTR &lpszPath, INT &iOperationStatus, LPSTR &lpszHandle);
class SFTPServerFindFirstEventParams { public: qint64 ConnectionID(); const QString &Path(); int OperationStatus(); void SetOperationStatus(int iOperationStatus); const QString &Handle(); void SetHandle(const QString &qsHandle); int EventRetVal(); void SetEventRetVal(int iRetVal); };
// To handle, connect one or more slots to this signal. void FindFirst(SFTPServerFindFirstEventParams *e);
// Or, subclass SFTPServer and override this emitter function. virtual int FireFindFirst(SFTPServerFindFirstEventParams *e) {...}
Remarks
FindFirst, FindNext, and FindClose events represent a mechanism for providing customized file listings to class. They are only fired if Action parameter of the preceding BeforeFind event was set to fraCustom.
The behaviour of these events mimics that of the standard FindFirst/FindNext/FindClose functions found in many operating systems/frameworks. FindFirst fires once to request the first list entry; FindNext then fires continuously in a loop to request all subsequent entries. To indicate that the listing is over, set OperationStatus parameter to ostEOF. Not doing so may lead to an endless loop and session freeze, as the component would continue firing FindNext infinitely waiting for the EOF marker.
The handlers for both FindFirst and FindNext events should be implemented in the following way: if there are more entries in the directory to pass back to the server component,
- set OperationStatus to ostOK,
- fill in ClientFileEntry with the details of the next entry,
- commit the entry to the server using SetClientFileEntry method.
Use the by-ref Handle parameter to assign a handle (a unique identifier) to the file listing procedure inside the FindFirst event handler. This identifier will then be passed to all subsequent FindNext and FindClose calls to let your code chain the events together.
The ConnectionID parameter specifies in which SFTP session the request was received, and Path indicates the requested directory.
The following operation status constants are available, besides the ones referenced above:
ostOk | 1 | |
ostNoSuchFile | 2 | |
ostAccessDenied | 3 | |
ostWriteProtect | 4 | |
ostUnsupported | 5 | |
ostInvalidParameter | 6 | |
ostEOF | 7 |
FindNext Event (SFTPServer Class)
This event retrieves the next entry of a custom file listing.
Syntax
ANSI (Cross Platform) virtual int FireFindNext(SFTPServerFindNextEventParams *e);
typedef struct {
int64 ConnectionID;
const char *Handle;
int OperationStatus; int reserved; } SFTPServerFindNextEventParams;
Unicode (Windows) virtual INT FireFindNext(SFTPServerFindNextEventParams *e);
typedef struct {
LONG64 ConnectionID;
LPCWSTR Handle;
INT OperationStatus; INT reserved; } SFTPServerFindNextEventParams;
#define EID_SFTPSERVER_FINDNEXT 28 virtual INT SECUREBLACKBOX_CALL FireFindNext(LONG64 &lConnectionID, LPSTR &lpszHandle, INT &iOperationStatus);
class SFTPServerFindNextEventParams { public: qint64 ConnectionID(); const QString &Handle(); int OperationStatus(); void SetOperationStatus(int iOperationStatus); int EventRetVal(); void SetEventRetVal(int iRetVal); };
// To handle, connect one or more slots to this signal. void FindNext(SFTPServerFindNextEventParams *e);
// Or, subclass SFTPServer and override this emitter function. virtual int FireFindNext(SFTPServerFindNextEventParams *e) {...}
Remarks
This event is fired repeatedly after FindFirst to retrieve the directory contents entry-by-entry. Please see the FindFirst topic for more details about implementing a handler of this event.
Remember to set OperationStatus to ostEOF when there are no more entries left to close the listing operation. If there are more entries to pass, set it to ostOK. Other possible values are given in the table below:
ostOk | 1 | |
ostNoSuchFile | 2 | |
ostAccessDenied | 3 | |
ostWriteProtect | 4 | |
ostUnsupported | 5 | |
ostInvalidParameter | 6 | |
ostEOF | 7 |
Notification Event (SFTPServer Class)
This event notifies the application about an underlying control flow event.
Syntax
ANSI (Cross Platform) virtual int FireNotification(SFTPServerNotificationEventParams *e);
typedef struct {
const char *EventID;
const char *EventParam; int reserved; } SFTPServerNotificationEventParams;
Unicode (Windows) virtual INT FireNotification(SFTPServerNotificationEventParams *e);
typedef struct {
LPCWSTR EventID;
LPCWSTR EventParam; INT reserved; } SFTPServerNotificationEventParams;
#define EID_SFTPSERVER_NOTIFICATION 29 virtual INT SECUREBLACKBOX_CALL FireNotification(LPSTR &lpszEventID, LPSTR &lpszEventParam);
class SFTPServerNotificationEventParams { public: const QString &EventID(); const QString &EventParam(); int EventRetVal(); void SetEventRetVal(int iRetVal); };
// To handle, connect one or more slots to this signal. void Notification(SFTPServerNotificationEventParams *e);
// Or, subclass SFTPServer and override this emitter function. virtual int FireNotification(SFTPServerNotificationEventParams *e) {...}
Remarks
The class fires this event to let the application know about some event, occurrence, or milestone in the class. 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 class, the exact action it is performing, or the document being processed, one or both may be omitted.
This class can fire this event with the following EventID values:
FileOpen | Notifies your code about the file being opened, which is typically
an indicator of the initiation of the transfer operation.
The EventParam value passed with this EventID is a string of the
following format:
ConnectionID=3;Path=/dir/file;Handle=x5DshAk8;Modes=48;Access=0;DesiredAccess=8 This EventID only fires if the NotifyOnFileOperations configuration property is set to true. |
FileRead | Notifies your code about the file chunk being requested.
The EventParam value passed with this EventID is a string of the
following format:
ConnectionID=7;Handle=x5DshAk8;Offset=2048;Count=1024;Read=1021 This EventID only fires if the NotifyOnFileOperations configuration property is set to true. |
FileWrite | Notifies your code about the file chunk being received.
The EventParam value passed with this EventID is a string of the
following format:
ConnectionID=7;Handle=x5DshAk8;Offset=2048;Count=1024 This EventID only fires if the NotifyOnFileOperations configuration property is set to true. |
FileClose | Notifies your code about the closure of an opened file.
The EventParam value passed with this EventID is a string of the
following format:
ConnectionID=7;Handle=x5DshAk8;Modes=48 This EventID only fires if the NotifyOnFileOperations configuration property is set to true. |
OpenShell | Notifies your code about an opened shell tunnel. The EventParam has the following format: ConnectionID=9;LocalChannel=1;RemoteChannel=2 |
OpenCommand | Notifies your code about an opened command tunnel. The
EventParam value has the following format:
ConnectionID=8;LocalChannel=3;RemoteChannel=3;Command=ls -l |
CloseShell | Indicates the closure of a shell tunnel. The EventParam format is the same as with the OpenShell event ID. |
CloseCommand | Indicates the closure of a command tunnel. The EventParam format is the same as with the OpenCommand event ID. |
OpenFile Event (SFTPServer Class)
This event instructs the application to handle the file open request.
Syntax
ANSI (Cross Platform) virtual int FireOpenFile(SFTPServerOpenFileEventParams *e);
typedef struct {
int64 ConnectionID;
const char *Path;
int Modes;
int Access;
int OperationStatus;
char *Handle; int reserved; } SFTPServerOpenFileEventParams;
Unicode (Windows) virtual INT FireOpenFile(SFTPServerOpenFileEventParams *e);
typedef struct {
LONG64 ConnectionID;
LPCWSTR Path;
INT Modes;
INT Access;
INT OperationStatus;
LPWSTR Handle; INT reserved; } SFTPServerOpenFileEventParams;
#define EID_SFTPSERVER_OPENFILE 30 virtual INT SECUREBLACKBOX_CALL FireOpenFile(LONG64 &lConnectionID, LPSTR &lpszPath, INT &iModes, INT &iAccess, INT &iOperationStatus, LPSTR &lpszHandle);
class SFTPServerOpenFileEventParams { public: qint64 ConnectionID(); const QString &Path(); int Modes(); int Access(); int OperationStatus(); void SetOperationStatus(int iOperationStatus); const QString &Handle(); void SetHandle(const QString &qsHandle); int EventRetVal(); void SetEventRetVal(int iRetVal); };
// To handle, connect one or more slots to this signal. void OpenFile(SFTPServerOpenFileEventParams *e);
// Or, subclass SFTPServer and override this emitter function. virtual int FireOpenFile(SFTPServerOpenFileEventParams *e) {...}
Remarks
This event is fired when a file open request is received from the client and needs to be handled (virtualized) by the server. The ConnectionID parameter specifies in which session the request was received, and Path specifies the location of the file.
Modes can be a combination of one or several file open mode flags:
cfmRead | 1 |
cfmWrite | 2 |
cfmAppend | 4 |
cfmCreate | 8 |
cfmTruncate | 16 |
cfmExcl | 32 |
cfmText | 64 |
cfmOpenOrCreate | 128 |
cfmAppendAtomic | 256 |
cfmNoFollow | 512 |
cfmDeleteOnClose | 1024 |
Different client applications may provide different selections of mode flags. For example, some clients specify (cfmCreate + cfmTruncate) when overwriting files, whereas others would specify cfmOpenOrCreate. Please make sure your code is prepared to receive different combinations of flags here and handles them gracefully.
The Access parameter provides additional file access modifiers:
cfaReadLock | 1 |
cfaWriteLock | 2 |
cfaDeleteLock | 4 |
cfaBlockAdvisory | 8 |
The Handle string represents a unique identifier of the opened file, similar to file handles used in Windows or Unix APIs. Handles are unique across all files opened at the same time. Class generates handles automatically, but you can update the auto-generated values with your own in this event handler (just remember to keep them unique).
Set OperationStatus parameter in accordance with the outcome of the operation to one of the values given below:
ostOk | 1 | |
ostNoSuchFile | 2 | |
ostAccessDenied | 3 | |
ostWriteProtect | 4 | |
ostUnsupported | 5 | |
ostInvalidParameter | 6 | |
ostEOF | 7 |
ReadFile Event (SFTPServer Class)
This event is fired when a file read request is received.
Syntax
ANSI (Cross Platform) virtual int FireReadFile(SFTPServerReadFileEventParams *e);
typedef struct {
int64 ConnectionID;
const char *Handle;
int64 Offset;
int Size;
int OperationStatus; int reserved; } SFTPServerReadFileEventParams;
Unicode (Windows) virtual INT FireReadFile(SFTPServerReadFileEventParams *e);
typedef struct {
LONG64 ConnectionID;
LPCWSTR Handle;
LONG64 Offset;
INT Size;
INT OperationStatus; INT reserved; } SFTPServerReadFileEventParams;
#define EID_SFTPSERVER_READFILE 31 virtual INT SECUREBLACKBOX_CALL FireReadFile(LONG64 &lConnectionID, LPSTR &lpszHandle, LONG64 &lOffset, INT &iSize, INT &iOperationStatus);
class SFTPServerReadFileEventParams { public: qint64 ConnectionID(); const QString &Handle(); qint64 Offset(); int Size(); int OperationStatus(); void SetOperationStatus(int iOperationStatus); int EventRetVal(); void SetEventRetVal(int iRetVal); };
// To handle, connect one or more slots to this signal. void ReadFile(SFTPServerReadFileEventParams *e);
// Or, subclass SFTPServer and override this emitter function. virtual int FireReadFile(SFTPServerReadFileEventParams *e) {...}
Remarks
This event is fired when a request to read block from a file is received from the client. The ConnectionID parameter specifies in which session the request was received, and Handle indicates an opened file handle. Offset and Size denote the location and size of the file piece.
Inside the event handler, pass the appropriate file chunk to the component via SetClientBuffer method.
Set OperationStatus to one of the below values according to the outcome of the request processing:
ostOk | 1 | |
ostNoSuchFile | 2 | |
ostAccessDenied | 3 | |
ostWriteProtect | 4 | |
ostUnsupported | 5 | |
ostInvalidParameter | 6 | |
ostEOF | 7 |
Remove Event (SFTPServer Class)
This event is fired when a client requests to delete a file or directory.
Syntax
ANSI (Cross Platform) virtual int FireRemove(SFTPServerRemoveEventParams *e);
typedef struct {
int64 ConnectionID;
const char *Path;
int OperationStatus; int reserved; } SFTPServerRemoveEventParams;
Unicode (Windows) virtual INT FireRemove(SFTPServerRemoveEventParams *e);
typedef struct {
LONG64 ConnectionID;
LPCWSTR Path;
INT OperationStatus; INT reserved; } SFTPServerRemoveEventParams;
#define EID_SFTPSERVER_REMOVE 32 virtual INT SECUREBLACKBOX_CALL FireRemove(LONG64 &lConnectionID, LPSTR &lpszPath, INT &iOperationStatus);
class SFTPServerRemoveEventParams { public: qint64 ConnectionID(); const QString &Path(); int OperationStatus(); void SetOperationStatus(int iOperationStatus); int EventRetVal(); void SetEventRetVal(int iRetVal); };
// To handle, connect one or more slots to this signal. void Remove(SFTPServerRemoveEventParams *e);
// Or, subclass SFTPServer and override this emitter function. virtual int FireRemove(SFTPServerRemoveEventParams *e) {...}
Remarks
This event is fired when a request to delete a file or directory is received from the client. The ConnectionID parameter specifies in which session the request was received.
Set OperationStatus to one of the below values according to the outcome of the request processing:
ostOk | 1 | |
ostNoSuchFile | 2 | |
ostAccessDenied | 3 | |
ostWriteProtect | 4 | |
ostUnsupported | 5 | |
ostInvalidParameter | 6 | |
ostEOF | 7 |
RenameFile Event (SFTPServer Class)
This event is fired when a client requests to rename a file.
Syntax
ANSI (Cross Platform) virtual int FireRenameFile(SFTPServerRenameFileEventParams *e);
typedef struct {
int64 ConnectionID;
const char *OldPath;
const char *NewPath;
int OperationStatus; int reserved; } SFTPServerRenameFileEventParams;
Unicode (Windows) virtual INT FireRenameFile(SFTPServerRenameFileEventParams *e);
typedef struct {
LONG64 ConnectionID;
LPCWSTR OldPath;
LPCWSTR NewPath;
INT OperationStatus; INT reserved; } SFTPServerRenameFileEventParams;
#define EID_SFTPSERVER_RENAMEFILE 33 virtual INT SECUREBLACKBOX_CALL FireRenameFile(LONG64 &lConnectionID, LPSTR &lpszOldPath, LPSTR &lpszNewPath, INT &iOperationStatus);
class SFTPServerRenameFileEventParams { public: qint64 ConnectionID(); const QString &OldPath(); const QString &NewPath(); int OperationStatus(); void SetOperationStatus(int iOperationStatus); int EventRetVal(); void SetEventRetVal(int iRetVal); };
// To handle, connect one or more slots to this signal. void RenameFile(SFTPServerRenameFileEventParams *e);
// Or, subclass SFTPServer and override this emitter function. virtual int FireRenameFile(SFTPServerRenameFileEventParams *e) {...}
Remarks
This event is fired when a request to rename a file (from OldPath to NewPath) is received from the client. The ConnectionID parameter specifies in which session the request was received.
Set OperationStatus to one of the below values according to the outcome of the request processing:
ostOk | 1 | |
ostNoSuchFile | 2 | |
ostAccessDenied | 3 | |
ostWriteProtect | 4 | |
ostUnsupported | 5 | |
ostInvalidParameter | 6 | |
ostEOF | 7 |
RequestAttributes Event (SFTPServer Class)
This event is fired when a get file attributes request is received.
Syntax
ANSI (Cross Platform) virtual int FireRequestAttributes(SFTPServerRequestAttributesEventParams *e);
typedef struct {
int64 ConnectionID;
const char *Path;
const char *Handle;
int OperationStatus; int reserved; } SFTPServerRequestAttributesEventParams;
Unicode (Windows) virtual INT FireRequestAttributes(SFTPServerRequestAttributesEventParams *e);
typedef struct {
LONG64 ConnectionID;
LPCWSTR Path;
LPCWSTR Handle;
INT OperationStatus; INT reserved; } SFTPServerRequestAttributesEventParams;
#define EID_SFTPSERVER_REQUESTATTRIBUTES 34 virtual INT SECUREBLACKBOX_CALL FireRequestAttributes(LONG64 &lConnectionID, LPSTR &lpszPath, LPSTR &lpszHandle, INT &iOperationStatus);
class SFTPServerRequestAttributesEventParams { public: qint64 ConnectionID(); const QString &Path(); const QString &Handle(); int OperationStatus(); void SetOperationStatus(int iOperationStatus); int EventRetVal(); void SetEventRetVal(int iRetVal); };
// To handle, connect one or more slots to this signal. void RequestAttributes(SFTPServerRequestAttributesEventParams *e);
// Or, subclass SFTPServer and override this emitter function. virtual int FireRequestAttributes(SFTPServerRequestAttributesEventParams *e) {...}
Remarks
This event is fired when a request to get file attributes is received from the client. The ConnectionID parameter specifies in which session the request was received, and Path specifies the file location where the attributes need to be retrieved.
Set OperationStatus to one of the below values according to the outcome of the request processing:
ostOk | 1 | |
ostNoSuchFile | 2 | |
ostAccessDenied | 3 | |
ostWriteProtect | 4 | |
ostUnsupported | 5 | |
ostInvalidParameter | 6 | |
ostEOF | 7 |
SessionClosed Event (SFTPServer Class)
Reports session closure.
Syntax
ANSI (Cross Platform) virtual int FireSessionClosed(SFTPServerSessionClosedEventParams *e);
typedef struct {
int64 ConnectionID; int reserved; } SFTPServerSessionClosedEventParams;
Unicode (Windows) virtual INT FireSessionClosed(SFTPServerSessionClosedEventParams *e);
typedef struct {
LONG64 ConnectionID; INT reserved; } SFTPServerSessionClosedEventParams;
#define EID_SFTPSERVER_SESSIONCLOSED 35 virtual INT SECUREBLACKBOX_CALL FireSessionClosed(LONG64 &lConnectionID);
class SFTPServerSessionClosedEventParams { public: qint64 ConnectionID(); int EventRetVal(); void SetEventRetVal(int iRetVal); };
// To handle, connect one or more slots to this signal. void SessionClosed(SFTPServerSessionClosedEventParams *e);
// Or, subclass SFTPServer and override this emitter function. virtual int FireSessionClosed(SFTPServerSessionClosedEventParams *e) {...}
Remarks
This event is fired when a connection identified by ConnectionID has been gracefully closed.
SessionEstablished Event (SFTPServer Class)
This event is fired when a new session is established.
Syntax
ANSI (Cross Platform) virtual int FireSessionEstablished(SFTPServerSessionEstablishedEventParams *e);
typedef struct {
int64 ConnectionID; int reserved; } SFTPServerSessionEstablishedEventParams;
Unicode (Windows) virtual INT FireSessionEstablished(SFTPServerSessionEstablishedEventParams *e);
typedef struct {
LONG64 ConnectionID; INT reserved; } SFTPServerSessionEstablishedEventParams;
#define EID_SFTPSERVER_SESSIONESTABLISHED 36 virtual INT SECUREBLACKBOX_CALL FireSessionEstablished(LONG64 &lConnectionID);
class SFTPServerSessionEstablishedEventParams { public: qint64 ConnectionID(); int EventRetVal(); void SetEventRetVal(int iRetVal); };
// To handle, connect one or more slots to this signal. void SessionEstablished(SFTPServerSessionEstablishedEventParams *e);
// Or, subclass SFTPServer and override this emitter function. virtual int FireSessionEstablished(SFTPServerSessionEstablishedEventParams *e) {...}
Remarks
This event is fired when a new connection identified by ConnectionID has been established with a client.
SetAttributes Event (SFTPServer Class)
This event is fired when an set file attributes request is received.
Syntax
ANSI (Cross Platform) virtual int FireSetAttributes(SFTPServerSetAttributesEventParams *e);
typedef struct {
int64 ConnectionID;
const char *Path;
const char *Handle;
int OperationStatus; int reserved; } SFTPServerSetAttributesEventParams;
Unicode (Windows) virtual INT FireSetAttributes(SFTPServerSetAttributesEventParams *e);
typedef struct {
LONG64 ConnectionID;
LPCWSTR Path;
LPCWSTR Handle;
INT OperationStatus; INT reserved; } SFTPServerSetAttributesEventParams;
#define EID_SFTPSERVER_SETATTRIBUTES 37 virtual INT SECUREBLACKBOX_CALL FireSetAttributes(LONG64 &lConnectionID, LPSTR &lpszPath, LPSTR &lpszHandle, INT &iOperationStatus);
class SFTPServerSetAttributesEventParams { public: qint64 ConnectionID(); const QString &Path(); const QString &Handle(); int OperationStatus(); void SetOperationStatus(int iOperationStatus); int EventRetVal(); void SetEventRetVal(int iRetVal); };
// To handle, connect one or more slots to this signal. void SetAttributes(SFTPServerSetAttributesEventParams *e);
// Or, subclass SFTPServer and override this emitter function. virtual int FireSetAttributes(SFTPServerSetAttributesEventParams *e) {...}
Remarks
This event is fired when a request to set file attributes is received from the client. The ConnectionID parameter specifies in which session the request was received, and Path specifies the file location which the attributes needs to be set.
Set OperationStatus to one of the below values according to the outcome of the request processing:
ostOk | 1 | |
ostNoSuchFile | 2 | |
ostAccessDenied | 3 | |
ostWriteProtect | 4 | |
ostUnsupported | 5 | |
ostInvalidParameter | 6 | |
ostEOF | 7 |
TranslatePath Event (SFTPServer Class)
This event is fired when a client requests the server to translate a path to its absolute form.
Syntax
ANSI (Cross Platform) virtual int FireTranslatePath(SFTPServerTranslatePathEventParams *e);
typedef struct {
int64 ConnectionID;
const char *Path;
char *AbsolutePath;
int Action; int reserved; } SFTPServerTranslatePathEventParams;
Unicode (Windows) virtual INT FireTranslatePath(SFTPServerTranslatePathEventParams *e);
typedef struct {
LONG64 ConnectionID;
LPCWSTR Path;
LPWSTR AbsolutePath;
INT Action; INT reserved; } SFTPServerTranslatePathEventParams;
#define EID_SFTPSERVER_TRANSLATEPATH 38 virtual INT SECUREBLACKBOX_CALL FireTranslatePath(LONG64 &lConnectionID, LPSTR &lpszPath, LPSTR &lpszAbsolutePath, INT &iAction);
class SFTPServerTranslatePathEventParams { public: qint64 ConnectionID(); const QString &Path(); const QString &AbsolutePath(); void SetAbsolutePath(const QString &qsAbsolutePath); int Action(); void SetAction(int iAction); int EventRetVal(); void SetEventRetVal(int iRetVal); };
// To handle, connect one or more slots to this signal. void TranslatePath(SFTPServerTranslatePathEventParams *e);
// Or, subclass SFTPServer and override this emitter function. virtual int FireTranslatePath(SFTPServerTranslatePathEventParams *e) {...}
Remarks
This event is fired when a request to translate a relative path to the corresponding absolute path is received. The ConnectionID parameter specifies the session in which the request was received.
You can let the server do the translation automatically according to the default file system rules, or take care of it yourself. Use the Action parameter to specify who is responsible for the translation. If doing the translation manually, return the translated path via the AbsolutePath parameter. Action can take one of the following values:
fraAuto | 1 | Handle the requested action automatically by the server |
fraCustom | 2 | Override the action using the user code logic |
fraAbort | 3 | Abort the requested action |
WriteFile Event (SFTPServer Class)
This event is fired when a file write request is received.
Syntax
ANSI (Cross Platform) virtual int FireWriteFile(SFTPServerWriteFileEventParams *e);
typedef struct {
int64 ConnectionID;
const char *Handle;
int64 Offset;
int OperationStatus; int reserved; } SFTPServerWriteFileEventParams;
Unicode (Windows) virtual INT FireWriteFile(SFTPServerWriteFileEventParams *e);
typedef struct {
LONG64 ConnectionID;
LPCWSTR Handle;
LONG64 Offset;
INT OperationStatus; INT reserved; } SFTPServerWriteFileEventParams;
#define EID_SFTPSERVER_WRITEFILE 39 virtual INT SECUREBLACKBOX_CALL FireWriteFile(LONG64 &lConnectionID, LPSTR &lpszHandle, LONG64 &lOffset, INT &iOperationStatus);
class SFTPServerWriteFileEventParams { public: qint64 ConnectionID(); const QString &Handle(); qint64 Offset(); int OperationStatus(); void SetOperationStatus(int iOperationStatus); int EventRetVal(); void SetEventRetVal(int iRetVal); };
// To handle, connect one or more slots to this signal. void WriteFile(SFTPServerWriteFileEventParams *e);
// Or, subclass SFTPServer and override this emitter function. virtual int FireWriteFile(SFTPServerWriteFileEventParams *e) {...}
Remarks
This event is fired when a request to write a data block to a file is received from the client. The ConnectionID parameter specifies the session the request originates from. The Handle parameter references the opened file where the block should be written to. Offset references the position in the file where the block of data should be written.
Use GetClientBuffer method to obtain the piece of data that should be written to the file.
Set OperationStatus to one of the below values according to the outcome of the request processing:
ostOk | 1 | |
ostNoSuchFile | 2 | |
ostAccessDenied | 3 | |
ostWriteProtect | 4 | |
ostUnsupported | 5 | |
ostInvalidParameter | 6 | |
ostEOF | 7 |
Config Settings (SFTPServer Class)
The class 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 class, access to these internal properties is provided through the Config method.SFTPServer Config Settings
Use this setting to adjust dual/multi-step authentication mode. The value of 0 indicates that either of supported authentication methods is sufficient to authenticate the user ("any of"). The value of 1 specifies that the user should pass all the enabled methods to authenticate themselves (MFA, or "all of").
Use this property to specify a specific DH group index to enforce for key exchange. The value of -1 enables automatic group selection, and any value between 0 and 227 specifies a particular DH group supported by SecureBlackbox. This is largely a debug setting, use it with extreme care.
This setting specifies a socket can use ip4 and ip6 simultaneously.
This property specifies the maximal DH group size, in bits. The larger the group size, the strong the key, however, longer groups put extra burden on the computational resources. SecureBlackbox supports groups between 1024 and 8192 bits. The default value is 8192.
This property specifies the minimal DH group size, in bits. The larger the group size, the strong the key, however, longer groups put extra burden on the computational resources. SecureBlackbox supports groups between 1024 and 8192 bits. The default value is 2048.
If set, the component will report low-level file operations, such as Open, Read, Write, and Close, via its Notification event.
This setting controls whether strict key exchange (strict kex) is enabled to mitigate the Terrapin attack. When enabled, the class will indicate support for strict key exchange by automatically including the pseudo-algorithm kex-strict-c-v00@openssh.com for client classes and kex-strict-s-v00@openssh.com for server classes 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 class 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 class. |
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. |
Base Config Settings
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.
Set this property to enable or disable cookies caching for the class.
Supported values are:
off | No caching (default) | |
local | Local caching | |
global | Global caching |
Use this property to get cookies from the internal cookie storage of the class and/or restore them back between application sessions.
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.
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.
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 classes that have its CookieCaching property set to "global".
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 classes.
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) |
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 |
Use this property to provide a path to the log file.
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 |
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. |
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. |
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.
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) |
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.
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.
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.
Set this property to enable or disable static DNS rules for the class. 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 |
Use this property to get or set an IP address for the specified domain name in the internal (of the class) 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 devided by the | (pipe) character.
Use this property to get static DNS rules from the current rules storage or restore them back between application sessions. If StaticDNS of the class is set to "local", the property returns/restores the rules from/to the internal storage of the class. If StaticDNS of the class 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.
Use this config property to store any custom data.
Use this property to limit the search of chached 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 classes.
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).
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).
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.
Set this global property to false to make each validation run use its own copy of system certificate stores.
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.
Use this global property to enable or disable the use of operating system-driven pseudorandom number generation.
Trappable Errors (SFTPServer Class)
Error Handling (C++)
Call the GetLastErrorCode() method to obtain the last called method's result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. Known error codes are listed below. If an error occurs, the GetLastError() method can be called to retrieve the associated error message.
SFTPServer Errors
1048577 Invalid parameter value (SB_ERROR_INVALID_PARAMETER) | |
1048578 Class is configured incorrectly (SB_ERROR_INVALID_SETUP) | |
1048579 Operation cannot be executed in the current state (SB_ERROR_INVALID_STATE) | |
1048580 Attempt to set an invalid value to a property (SB_ERROR_INVALID_VALUE) | |
1048581 Certificate does not have its private key loaded (SB_ERROR_NO_PRIVATE_KEY) | |
1048581 Cancelled by the user (SB_ERROR_CANCELLED_BY_USER) | |
31457281 Unsupported file operation (SB_ERROR_SFTP_UNSUPPORTED_FILEOPERATION) |