SFTPServer Class

Properties   Methods   Events   Config Settings   Errors  

The SFTPServer class provides server-side functionality for SFTP connections.

Syntax

class secureblackbox.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.

activeSpecifies whether the SFTP server has started and ready to accept connections.
auth_typesDefines allowed authentication types.
base_dirSpecifies the server's base (root) directory.
capabilitiesSpecifies which elements of the SSH ecosystem the class must support/enable.
client_file_entry_access_timeContains the last access time for this file, in UTC.
client_file_entry_creation_timeContains this file's creation time, in UTC.
client_file_entry_entry_formatThe file listing format: cfefUnknown 0 cfefUnix 1 cfefWindows 2 cfefMLSD 3 .
client_file_entry_file_typeThe type of the entry: fetUnknown 0 fetDirectory 1 fetFile 2 fetSymlink 3 fetSpecial 4 fetCurrentDirectory 5 fetParentDirectory 6 fetSocket 7 fetCharDevice 8 fetBlockDevice 9 fetFIFO 10 .
client_file_entry_handleAllows to get or set a 'handle', a unique identifier of the underlying property object.
client_file_entry_modification_timeFile last modification date/time.
client_file_entry_nameThe file or directory name.
client_file_entry_pathThe full path to the file or directory.
client_file_entry_principalSpecifies the owner of the file/directory.
client_file_entry_sizeFile size in bytes.
client_file_entry_unix_permsThe file Unix permissions bit mask (e.
client_file_entry_unparsed_nameThe unparsed entry as returned by the server.
compression_levelSpecifies the preferable compression level.
external_crypto_async_document_idSpecifies an optional document ID for SignAsyncBegin() and SignAsyncEnd() calls.
external_crypto_custom_paramsCustom parameters to be passed to the signing service (uninterpreted).
external_crypto_dataAdditional data to be included in the async state and mirrored back by the requestor.
external_crypto_external_hash_calculationSpecifies whether the message hash is to be calculated at the external endpoint.
external_crypto_hash_algorithmSpecifies the request's signature hash algorithm.
external_crypto_key_idThe ID of the pre-shared key used for DC request authentication.
external_crypto_key_secretThe pre-shared key used for DC request authentication.
external_crypto_methodSpecifies the asynchronous signing method.
external_crypto_modeSpecifies the external cryptography mode.
external_crypto_public_key_algorithmProvide the public key algorithm here if the certificate is not available on the pre-signing stage.
fips_modeReserved.
force_compressionThis property specifies whether server explicitly requires data compression.
hostSpecifies server's host name.
key_fingerprint_sha1Contains the SHA-1 fingerprint (hash) of the key.
key_fingerprint_sha256Contains the SHA-256 fingerprint (hash) of the key.
key_handleAllows to get or set a 'handle', a unique identifier of the underlying property object.
max_sftp_versionMaximum SFTP version supported.
min_sftp_versionMinimum SFTP version supported.
pinned_client_client_key_algorithmSpecifies the client's key algorithm.
pinned_client_client_key_bitsSpecifies the length of the client's key.
pinned_client_client_key_fingerprintThe fingerprint (hash value) of the client's public key.
pinned_client_close_reasonContains the line sent by the server just before closing the connection.
pinned_client_compression_algorithm_inboundCompression algorithm for the incoming traffic.
pinned_client_compression_algorithm_outboundCompression algorithm for the outgoing traffic.
pinned_client_encryption_algorithm_inboundEncryption algorithm for the incoming traffic.
pinned_client_encryption_algorithm_outboundEncryption algorithm for the outgoing traffic.
pinned_client_inbound_encryption_key_bitsSpecifies the length of the key used to encrypt the incoming traffic.
pinned_client_kex_algorithmThe key exchange algorithm used during the SSH handshake.
pinned_client_kex_bitsThe number of bits used by the key exchange algorithm.
pinned_client_kex_linesThe contents of the received KexInit packet.
pinned_client_mac_algorithm_inboundMAC algorithm used for the incoming connection.
pinned_client_mac_algorithm_outboundMAC algorithm used for outbound connection.
pinned_client_outbound_encryption_key_bitsSpecifies the length of the key used to encrypt the outgoing traffic.
pinned_client_public_key_algorithmSpecifies the public key algorithm which was used during the SSH handshake.
pinned_client_remote_addressThe client's IP address.
pinned_client_remote_portThe remote port of the client connection.
pinned_client_server_key_algorithmSpecifies the server's key algorithm.
pinned_client_server_key_bitsSpecifies the number of bits in the server's key.
pinned_client_server_key_fingerprintThe fingerprint (hash value) of the server's public key.
pinned_client_server_software_nameReturns the name of the SSH software running on the server side.
pinned_client_total_bytes_receivedReturns the total number of bytes received over this connection.
pinned_client_total_bytes_sentReturns the total number of bytes sent over this connection.
pinned_client_versionSpecifies SSH protocol version.
portSpecifies the listening port number.
read_onlySpecifies whether files on the server are read-only.
server_key_countThe number of records in the ServerKey arrays.
server_key_algorithmSpecifies the key algorithm.
server_key_bitsThe number of bits in the key: the more the better, 2048 or 4096 are typical values.
server_key_fingerprint_md5Contains the MD5 fingerprint (hash) of the key.
server_key_fingerprint_sha1Contains the SHA-1 fingerprint (hash) of the key.
server_key_handleAllows to get or set a 'handle', a unique identifier of the underlying property object.
socket_incoming_speed_limitThe maximum number of bytes to read from the socket, per second.
socket_local_addressThe local network interface to bind the socket to.
socket_local_portThe local port number to bind the socket to.
socket_outgoing_speed_limitThe maximum number of bytes to write to the socket, per second.
socket_timeoutThe maximum period of waiting, in milliseconds, after which the socket operation is considered unsuccessful.
socket_use_ipv6Enables or disables IP protocol version 6.
ssh_settings_auto_adjust_ciphersWhether the SSH client should adjust its list of supported ciphers 'on-the-fly' for greater compatibility with the server it is connecting to.
ssh_settings_base_configurationAllows to choose base configuration of SSH settings, tuned up for different purposes such as high security or higher compatibility.
ssh_settings_compression_algorithmsA list of session compression algorithms separated with commas or semicolons.
ssh_settings_compression_levelPossible values for the Compression Level range from 0 (minimum compression) to 9 (maximum compression).
ssh_settings_default_window_sizeThe 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.
ssh_settings_encryption_algorithmsA list of session encryption algorithms separated with commas or semicolons.
ssh_settings_force_compressionWhether the SSH client should explicitly request compression.
ssh_settings_forward_auth_agentEnables or disables auth agent forwarding.
ssh_settings_gss_auth_typesA comma-separated list of authentication types.
ssh_settings_gss_delegate_credsSwitches credential delegation on or off.
ssh_settings_gss_hostnameThe GSS host name, in form of a FQDN (e.
ssh_settings_gss_libA path to the GSS-API library (DLL or SO).
ssh_settings_gss_mechanismsA comma-separated list of GSS mechanisms to use.
ssh_settings_gss_protocolsA comma-separated list of SSPI protocols.
ssh_settings_handshake_timeoutSpecifies the maximal time for the SSH handshake to proceed, in seconds.
ssh_settings_kex_algorithmsA list of key exchange algorithms separated with commas or semicolons.
ssh_settings_mac_algorithmsA list of MAC (for message authentication code ) algorithms separated with commas or semicolons.
ssh_settings_max_ssh_packet_sizeSpecifies the maximum length of one SSH packet in bytes.
ssh_settings_min_window_sizeSpecifies the minimal internal window size.
ssh_settings_obfuscate_handshakeEnables or disables handshake obfuscation.
ssh_settings_obfuscation_passwordSpecifies the password used to encrypt the handshake when ObfuscateHandshake is set.
ssh_settings_public_key_algorithmsA list of public key algorithms separated with commas or semicolons.
ssh_settings_request_password_changeWhether to request a password change when connecting.
ssh_settings_software_nameThe name to be used by the class to identify itself.
ssh_settings_trust_all_keysEnables or disables explicit trust to all server keys.
ssh_settings_use_auth_agentEnables or disables the use of external key agent, such as Putty key agent.
ssh_settings_versionsSpecifies enabled SSH protocol versions (1 or 2).
user_countThe number of records in the User arrays.
user_associated_dataContains the user's Associated Data when SSH AEAD (Authenticated Encryption with Associated Data) algorithm is used.
user_base_pathBase path for this user in the server's file system.
user_certificateContains the user's certificate.
user_dataContains uninterpreted user-defined data that should be associated with the user account, such as comments or custom settings.
user_emailThe user's email address.
user_handleAllows to get or set a 'handle', a unique identifier of the underlying property object.
user_hash_algorithmSpecifies the hash algorithm used to generate TOTP (Time-based One-Time Passwords) passwords for this user.
user_incoming_speed_limitSpecifies the incoming speed limit for this user.
user_otp_algorithmThe algorithm used to generate one-time passwords (OTP) for this user, either HOTP (Hash-based OTP) or TOTP (Time-based OTP).
user_otp_lenSpecifies the length of the user's OTP password.
user_otp_valueThe user's time interval (TOTP) or Counter (HOTP).
user_outgoing_speed_limitSpecifies the outgoing speed limit for this user.
user_passwordThe user's authentication password.
user_shared_secretContains the user's secret key, which is essentially a shared secret between the client and server.
user_ssh_keyContains the user's SSH key.
user_usernameThe registered name (login) of the user.
use_utf8Specifies 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.

cleanupCleans up the server environment by purging expired sessions and cleaning caches.
configSets or retrieves a configuration setting.
do_actionPerforms an additional action.
drop_clientTerminates a client connection.
get_client_bufferAcquires a piece of operation data.
get_client_file_entryAcquires file entry details from the class.
list_clientsEnumerates the connected clients.
pin_clientTakes a snapshot of the connection's properties.
resetResets the class settings.
set_client_bufferCommits a data buffer to the server class.
set_client_file_entryCommits the file entry details to the class.
startStarts SFTP server operation.
stopStops 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.

on_acceptThis event is fired when new incoming connection is accepted.
on_after_create_directoryThis event indicates completion of directory creation request.
on_after_removeThis event indicates completion of file removal request.
on_after_rename_fileThis event indicates completion of a file rename operation.
on_after_request_attributesThis event indicates completion of file attributes request.
on_after_set_attributesThis event indicates completion of a set attributes request.
on_auth_attemptReports a user authentication attempt.
on_auth_failedReports user authentication failure.
on_auth_passwordThis event is fired on password authentication attempt from a client.
on_auth_public_keyThis event is fired on public key authentication attempt from a client.
on_auth_succeededReports a successful user authentication.
on_before_create_directoryThis event is fired when a client requests to create a directory.
on_before_download_fileThis event is fired when a download file request is received.
on_before_findThis event is fired when a client requests to find files and folders in Path.
on_before_open_client_forwardingThis event is fired when a client requests to set up client-side (local) forwarding channel.
on_before_open_commandThis event is fired when a client requests a command channel.
on_before_open_server_forwardingThis event is fired when the server has received an incoming connection and needs to set up server-side (remote) forwarding channel.
on_before_open_shellThis event is fired when a client requests a shell channel.
on_before_removeThis event is fired when a client requests to delete a file or directory.
on_before_rename_fileThis event is fired when a client requests to rename a file.
on_before_request_attributesThis event is fired when a client requests to get file attributes.
on_before_set_attributesThis event is fired when a client requests to set file attributes.
on_before_upload_fileThis event is fired when an upload file request is received.
on_close_client_forwardingThis event is fired when a client has closed a previously opened forwarding channel.
on_close_commandThis event is fired when a client has closed a previously opened SSH command channel.
on_close_fileThis event instructs the application to close an opened file.
on_close_server_forwardingThis event is fired when a client has closed a previously opened forwarding channel.
on_close_shellThis event is fired when a client has closed a previously opened shell channel.
on_connectThis event is fired when a remote connection has been established.
on_create_directoryThis event instructs the application to create a directory.
on_disconnectThis event is fired when a client has disconnected.
on_errorInformation about errors during data delivery.
on_external_signHandles remote or external signing initiated by the server protocol.
on_find_closeThis event signifies the completion of a custom file listing operation.
on_find_firstThis event signifies the start of the custom file listing retrieval mechanism.
on_find_nextThis event retrieves the next entry of a custom file listing.
on_listening_startedFires when the server has started accepting connections on a local port.
on_listening_stoppedFires when the server has stopped accepting connections on a local port.
on_notificationThis event notifies the application about an underlying control flow event.
on_open_client_forwardingThis event is fired when a client opens a client-side (local) forwarding channel.
on_open_commandThis event is fired when a client has opened an SSH command channel.
on_open_fileThis event instructs the application to handle the file open request.
on_open_server_forwardingThis event is fired when the server opens a server-side (remote) forwarding channel.
on_open_shellThis event is fired when a client has opened a shell channel.
on_read_fileThis event is fired when a file read request is received.
on_removeThis event is fired when a client requests to delete a file or directory.
on_rename_fileThis event is fired when a client requests to rename a file.
on_request_attributesThis event is fired when a get file attributes request is received.
on_server_forwarding_cancelThis event is fired when the client cancels a previously negotiated server-side (remote) forwarding.
on_server_forwarding_open_failedThis event is fired when the client rejects the server request to establish a server forwarding channel.
on_server_forwarding_requestThis event is fired when the client requests the server to set up server-side (remote) forwarding.
on_session_closedReports session closure.
on_session_establishedThis event is fired when a new session is established.
on_set_attributesThis event is fired when an set file attributes request is received.
on_translate_pathThis event is fired when a client requests the server to translate a path to its absolute form.
on_write_fileThis 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.

AllAlgorithmsReturns the list of algorithms enabled in the class.
AsyncDataWindowManagementTBD.
AuthModeControls dual/multi-type authentication mode.
AutoGenerateLongNamesTBD.
Banner[i]TBD.
BannerSendStageTBD.
CloseIfNoActiveTunnelsTBD.
CommandModeEnabledTBD.
CompressionAlgorithmsReturns the list of compression algorithms enabled in the class.
CustomDHGroupIndexSets a specific Diffie-Hellman group index to enforce.
DefBannerTBD.
DefLanguageTagTBD.
DualStackAllows the use of ip4 and ip6 simultaneously.
EncryptionAlgorithmsReturns the list of encryption algorithms enabled in the class.
KexAlgorithmsReturns the list of key exchange algorithms enabled in the class.
LanguageTag[i]TBD.
MacAlgorithmsReturns the list of MAC algorithms enabled in the class.
MaxDHGroupSizeSets the maximal Diffie-Hellman group size.
MinDHGroupSizeSets the minimal Diffie-Hellman group size.
NotifyOnFileOperationsEnables low-level file operation notifications.
PublicKeyAlgorithmsReturns the list of public key algorithms enabled in the class.
RefreshUsersEnables or disables real-time propagation of user information.
SFTPModeEnabledTBD.
ShellModeEnabledTBD.
UseStrictKeyExchangeSpecifies how strict key exchange is supported.
ASN1UseGlobalTagCacheControls whether ASN.1 module should use a global object cache.
AssignSystemSmartCardPinsSpecifies whether CSP-level PINs should be assigned to CNG keys.
CheckKeyIntegrityBeforeUseEnables or disable private key integrity check before use.
CookieCachingSpecifies whether a cookie cache should be used for HTTP(S) transports.
CookiesGets or sets local cookies for the class.
DefDeriveKeyIterationsSpecifies the default key derivation algorithm iteration count.
DNSLocalSuffixThe suffix to assign for TLD names.
EnableClientSideSSLFFDHEEnables or disables finite field DHE key exchange support in TLS clients.
GlobalCookiesGets or sets global cookies for all the HTTP transports.
HardwareCryptoUsePolicyThe hardware crypto usage policy.
HttpUserAgentSpecifies the user agent name to be used by all HTTP clients.
HttpVersionThe HTTP version to use in any inner HTTP client classes created.
IgnoreExpiredMSCTLSigningCertWhether to tolerate the expired Windows Update signing certificate.
ListDelimiterThe delimiter character for multi-element lists.
LogDestinationSpecifies the debug log destination.
LogDetailsSpecifies the debug log details to dump.
LogFileSpecifies the debug log filename.
LogFiltersSpecifies the debug log filters.
LogFlushModeSpecifies the log flush mode.
LogLevelSpecifies the debug log level.
LogMaxEventCountSpecifies the maximum number of events to cache before further action is taken.
LogRotationModeSpecifies the log rotation mode.
MaxASN1BufferLengthSpecifies the maximal allowed length for ASN.1 primitive tag data.
MaxASN1TreeDepthSpecifies the maximal depth for processed ASN.1 trees.
OCSPHashAlgorithmSpecifies the hash algorithm to be used to identify certificates in OCSP requests.
OldClientSideRSAFallbackSpecifies whether the SSH client should use a SHA1 fallback.
PKICacheSpecifies which PKI elements (certificates, CRLs, OCSP responses) should be cached.
PKICachePathSpecifies the file system path where cached PKI data is stored.
ProductVersionReturns the version of the SecureBlackbox library.
ServerSSLDHKeyLengthSets the size of the TLS DHE key exchange group.
StaticDNSSpecifies whether static DNS rules should be used.
StaticIPAddress[domain]Gets or sets an IP address for the specified domain name.
StaticIPAddressesGets or sets all the static DNS rules.
TagAllows to store any custom data.
TLSSessionGroupSpecifies the group name of TLS sessions to be used for session resumption.
TLSSessionLifetimeSpecifies lifetime in seconds of the cached TLS session.
TLSSessionPurgeIntervalSpecifies how often the session cache should remove the expired TLS sessions.
UseCRLObjectCachingSpecifies whether reuse of loaded CRL objects is enabled.
UseInternalRandomSwitches between SecureBlackbox-own and platform PRNGs.
UseLegacyAdESValidationEnables legacy AdES validation mode.
UseOCSPResponseObjectCachingSpecifies whether reuse of loaded OCSP response objects is enabled.
UseOwnDNSResolverSpecifies whether the client classes should use own DNS resolver.
UseSharedSystemStoragesSpecifies whether the validation engine should use a global per-process copy of the system certificate stores.
UseSystemNativeSizeCalculationAn internal CryptoAPI access tweak.
UseSystemOAEPAndPSSEnforces or disables the use of system-driven RSA OAEP and PSS computations.
UseSystemRandomEnables or disables the use of the OS PRNG.
XMLRDNDescriptorName[OID]Defines an OID mapping to descriptor names for the certificate's IssuerRDN or SubjectRDN.
XMLRDNDescriptorPriority[OID]Specifies the priority of descriptor names associated with a specific OID.
XMLRDNDescriptorReverseOrderSpecifies whether to reverse the order of descriptors in RDN.
XMLRDNDescriptorSeparatorSpecifies the separator used between descriptors in RDN.

active Property

Specifies whether the SFTP server has started and ready to accept connections.

Syntax

def get_active() -> bool: ...

active = property(get_active, None)

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.

auth_types Property

Defines allowed authentication types.

Syntax

def get_auth_types() -> int: ...
def set_auth_types(value: int) -> None: ...

auth_types = property(get_auth_types, set_auth_types)

Default Value

30

Remarks

Use this property to define which authentication types are allowed on the server, set of

atRhosts0x01RHOSTS file authentication. Rarely used today.

atPublicKey0x02Public key (sometimes called private key) authentication

atPassword0x04Password-based authentication

atHostbased0x08Hostbased authentication

atKeyboard0x10Keyboard-interactive authentication. This is often used in place of generic password authentication.

atGssWithMic0x20GSS authentication

atGssKeyex0x40GSS authentication with key exchange

atPublicKeyAgent0x80Public key agent authentication

base_dir Property

Specifies the server's base (root) directory.

Syntax

def get_base_dir() -> str: ...
def set_base_dir(value: str) -> None: ...

base_dir = property(get_base_dir, set_base_dir)

Default Value

""

Remarks

Use this property to set the base (root) directory on the server.

Note: If this property is not specified, it will default to the root of the system drive (C:\ on Windows).

capabilities Property

Specifies which elements of the SSH ecosystem the class must support/enable.

Syntax

def get_capabilities() -> int: ...
def set_capabilities(value: int) -> None: ...

capabilities = property(get_capabilities, set_capabilities)

Default Value

1

Remarks

Use this property to specify the capabilities of the SSH framework the component must support by adjusting the following bit flags:

scSFTP0x01SFTP (secure file transfer)

scShell0x02Remote shell access

scCommand0x04Remote command execution

scClientForwarding0x08Local (client-side) forwarding

scServerForwarding0x10Remote (server-side) forwarding

client_file_entry_access_time Property

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

Syntax

def get_client_file_entry_access_time() -> str: ...
def set_client_file_entry_access_time(value: str) -> None: ...

client_file_entry_access_time = property(get_client_file_entry_access_time, set_client_file_entry_access_time)

Default Value

""

Remarks

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

client_file_entry_creation_time Property

Contains this file's creation time, in UTC.

Syntax

def get_client_file_entry_creation_time() -> str: ...
def set_client_file_entry_creation_time(value: str) -> None: ...

client_file_entry_creation_time = property(get_client_file_entry_creation_time, set_client_file_entry_creation_time)

Default Value

""

Remarks

Contains this file's creation time, in UTC.

client_file_entry_entry_format Property

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

Syntax

def get_client_file_entry_entry_format() -> int: ...
def set_client_file_entry_entry_format(value: int) -> None: ...

client_file_entry_entry_format = property(get_client_file_entry_entry_format, set_client_file_entry_entry_format)

Default Value

0

Remarks

The file listing format:

cfefUnknown0
cfefUnix1
cfefWindows2
cfefMLSD3

client_file_entry_file_type Property

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

Syntax

def get_client_file_entry_file_type() -> int: ...
def set_client_file_entry_file_type(value: int) -> None: ...

client_file_entry_file_type = property(get_client_file_entry_file_type, set_client_file_entry_file_type)

Default Value

0

Remarks

The type of the entry:

fetUnknown0
fetDirectory1
fetFile2
fetSymlink3
fetSpecial4
fetCurrentDirectory5
fetParentDirectory6
fetSocket7
fetCharDevice8
fetBlockDevice9
fetFIFO10

client_file_entry_handle Property

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

Syntax

def get_client_file_entry_handle() -> int: ...
def set_client_file_entry_handle(value: int) -> None: ...

client_file_entry_handle = property(get_client_file_entry_handle, set_client_file_entry_handle)

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());

client_file_entry_modification_time Property

File last modification date/time.

Syntax

def get_client_file_entry_modification_time() -> str: ...
def set_client_file_entry_modification_time(value: str) -> None: ...

client_file_entry_modification_time = property(get_client_file_entry_modification_time, set_client_file_entry_modification_time)

Default Value

""

Remarks

File last modification date/time.

client_file_entry_name Property

The file or directory name.

Syntax

def get_client_file_entry_name() -> str: ...
def set_client_file_entry_name(value: str) -> None: ...

client_file_entry_name = property(get_client_file_entry_name, set_client_file_entry_name)

Default Value

""

Remarks

The file or directory name.

client_file_entry_path Property

The full path to the file or directory.

Syntax

def get_client_file_entry_path() -> str: ...
def set_client_file_entry_path(value: str) -> None: ...

client_file_entry_path = property(get_client_file_entry_path, set_client_file_entry_path)

Default Value

""

Remarks

The full path to the file or directory.

client_file_entry_principal Property

Specifies the owner of the file/directory.

Syntax

def get_client_file_entry_principal() -> str: ...
def set_client_file_entry_principal(value: str) -> None: ...

client_file_entry_principal = property(get_client_file_entry_principal, set_client_file_entry_principal)

Default Value

""

Remarks

Specifies the owner of the file/directory.

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

client_file_entry_size Property

File size in bytes.

Syntax

def get_client_file_entry_size() -> int: ...
def set_client_file_entry_size(value: int) -> None: ...

client_file_entry_size = property(get_client_file_entry_size, set_client_file_entry_size)

Default Value

0

Remarks

File size in bytes.

client_file_entry_unix_perms Property

The file Unix permissions bit mask (e.

Syntax

def get_client_file_entry_unix_perms() -> int: ...
def set_client_file_entry_unix_perms(value: int) -> None: ...

client_file_entry_unix_perms = property(get_client_file_entry_unix_perms, set_client_file_entry_unix_perms)

Default Value

511

Remarks

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

client_file_entry_unparsed_name Property

The unparsed entry as returned by the server.

Syntax

def get_client_file_entry_unparsed_name() -> str: ...
def set_client_file_entry_unparsed_name(value: str) -> None: ...

client_file_entry_unparsed_name = property(get_client_file_entry_unparsed_name, set_client_file_entry_unparsed_name)

Default Value

""

Remarks

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

compression_level Property

Specifies the preferable compression level.

Syntax

def get_compression_level() -> int: ...
def set_compression_level(value: int) -> None: ...

compression_level = property(get_compression_level, set_compression_level)

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.

external_crypto_async_document_id Property

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

Syntax

def get_external_crypto_async_document_id() -> str: ...
def set_external_crypto_async_document_id(value: str) -> None: ...

external_crypto_async_document_id = property(get_external_crypto_async_document_id, set_external_crypto_async_document_id)

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.

external_crypto_custom_params Property

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

Syntax

def get_external_crypto_custom_params() -> str: ...
def set_external_crypto_custom_params(value: str) -> None: ...

external_crypto_custom_params = property(get_external_crypto_custom_params, set_external_crypto_custom_params)

Default Value

""

Remarks

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

external_crypto_data Property

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

Syntax

def get_external_crypto_data() -> str: ...
def set_external_crypto_data(value: str) -> None: ...

external_crypto_data = property(get_external_crypto_data, set_external_crypto_data)

Default Value

""

Remarks

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

external_crypto_external_hash_calculation Property

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

Syntax

def get_external_crypto_external_hash_calculation() -> bool: ...
def set_external_crypto_external_hash_calculation(value: bool) -> None: ...

external_crypto_external_hash_calculation = property(get_external_crypto_external_hash_calculation, set_external_crypto_external_hash_calculation)

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.

external_crypto_hash_algorithm Property

Specifies the request's signature hash algorithm.

Syntax

def get_external_crypto_hash_algorithm() -> str: ...
def set_external_crypto_hash_algorithm(value: str) -> None: ...

external_crypto_hash_algorithm = property(get_external_crypto_hash_algorithm, set_external_crypto_hash_algorithm)

Default Value

"SHA256"

Remarks

Specifies the request's signature hash algorithm.

SB_HASH_ALGORITHM_SHA1SHA1
SB_HASH_ALGORITHM_SHA224SHA224
SB_HASH_ALGORITHM_SHA256SHA256
SB_HASH_ALGORITHM_SHA384SHA384
SB_HASH_ALGORITHM_SHA512SHA512
SB_HASH_ALGORITHM_MD2MD2
SB_HASH_ALGORITHM_MD4MD4
SB_HASH_ALGORITHM_MD5MD5
SB_HASH_ALGORITHM_RIPEMD160RIPEMD160
SB_HASH_ALGORITHM_CRC32CRC32
SB_HASH_ALGORITHM_SSL3SSL3
SB_HASH_ALGORITHM_GOST_R3411_1994GOST1994
SB_HASH_ALGORITHM_WHIRLPOOLWHIRLPOOL
SB_HASH_ALGORITHM_POLY1305POLY1305
SB_HASH_ALGORITHM_SHA3_224SHA3_224
SB_HASH_ALGORITHM_SHA3_256SHA3_256
SB_HASH_ALGORITHM_SHA3_384SHA3_384
SB_HASH_ALGORITHM_SHA3_512SHA3_512
SB_HASH_ALGORITHM_BLAKE2S_128BLAKE2S_128
SB_HASH_ALGORITHM_BLAKE2S_160BLAKE2S_160
SB_HASH_ALGORITHM_BLAKE2S_224BLAKE2S_224
SB_HASH_ALGORITHM_BLAKE2S_256BLAKE2S_256
SB_HASH_ALGORITHM_BLAKE2B_160BLAKE2B_160
SB_HASH_ALGORITHM_BLAKE2B_256BLAKE2B_256
SB_HASH_ALGORITHM_BLAKE2B_384BLAKE2B_384
SB_HASH_ALGORITHM_BLAKE2B_512BLAKE2B_512
SB_HASH_ALGORITHM_SHAKE_128SHAKE_128
SB_HASH_ALGORITHM_SHAKE_256SHAKE_256
SB_HASH_ALGORITHM_SHAKE_128_LENSHAKE_128_LEN
SB_HASH_ALGORITHM_SHAKE_256_LENSHAKE_256_LEN

external_crypto_key_id Property

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

Syntax

def get_external_crypto_key_id() -> str: ...
def set_external_crypto_key_id(value: str) -> None: ...

external_crypto_key_id = property(get_external_crypto_key_id, set_external_crypto_key_id)

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 external_crypto_key_secret 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";

external_crypto_key_secret Property

The pre-shared key used for DC request authentication.

Syntax

def get_external_crypto_key_secret() -> str: ...
def set_external_crypto_key_secret(value: str) -> None: ...

external_crypto_key_secret = property(get_external_crypto_key_secret, set_external_crypto_key_secret)

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 external_crypto_key_id topic.

external_crypto_method Property

Specifies the asynchronous signing method.

Syntax

def get_external_crypto_method() -> int: ...
def set_external_crypto_method(value: int) -> None: ...

external_crypto_method = property(get_external_crypto_method, set_external_crypto_method)

Default Value

0

Remarks

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

Available options:

asmdPKCS10
asmdPKCS71

external_crypto_mode Property

Specifies the external cryptography mode.

Syntax

def get_external_crypto_mode() -> int: ...
def set_external_crypto_mode(value: int) -> None: ...

external_crypto_mode = property(get_external_crypto_mode, set_external_crypto_mode)

Default Value

0

Remarks

Specifies the external cryptography mode.

Available options:

ecmDefaultThe default value (0)
ecmDisabledDo not use DC or external signing (1)
ecmGenericGeneric external signing with the OnExternalSign event (2)
ecmDCAuthDCAuth signing (3)
ecmDCAuthJSONDCAuth signing in JSON format (4)

external_crypto_public_key_algorithm Property

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

Syntax

def get_external_crypto_public_key_algorithm() -> str: ...
def set_external_crypto_public_key_algorithm(value: str) -> None: ...

external_crypto_public_key_algorithm = property(get_external_crypto_public_key_algorithm, set_external_crypto_public_key_algorithm)

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_ENCRYPTIONrsaEncryption
SB_CERT_ALGORITHM_MD2_RSA_ENCRYPTIONmd2withRSAEncryption
SB_CERT_ALGORITHM_MD5_RSA_ENCRYPTIONmd5withRSAEncryption
SB_CERT_ALGORITHM_SHA1_RSA_ENCRYPTIONsha1withRSAEncryption
SB_CERT_ALGORITHM_ID_DSAid-dsa
SB_CERT_ALGORITHM_ID_DSA_SHA1id-dsa-with-sha1
SB_CERT_ALGORITHM_DH_PUBLICdhpublicnumber
SB_CERT_ALGORITHM_SHA224_RSA_ENCRYPTIONsha224WithRSAEncryption
SB_CERT_ALGORITHM_SHA256_RSA_ENCRYPTIONsha256WithRSAEncryption
SB_CERT_ALGORITHM_SHA384_RSA_ENCRYPTIONsha384WithRSAEncryption
SB_CERT_ALGORITHM_SHA512_RSA_ENCRYPTIONsha512WithRSAEncryption
SB_CERT_ALGORITHM_ID_RSAPSSid-RSASSA-PSS
SB_CERT_ALGORITHM_ID_RSAOAEPid-RSAES-OAEP
SB_CERT_ALGORITHM_RSASIGNATURE_RIPEMD160ripemd160withRSA
SB_CERT_ALGORITHM_ID_ELGAMALelGamal
SB_CERT_ALGORITHM_SHA1_ECDSAecdsa-with-SHA1
SB_CERT_ALGORITHM_RECOMMENDED_ECDSAecdsa-recommended
SB_CERT_ALGORITHM_SHA224_ECDSAecdsa-with-SHA224
SB_CERT_ALGORITHM_SHA256_ECDSAecdsa-with-SHA256
SB_CERT_ALGORITHM_SHA384_ECDSAecdsa-with-SHA384
SB_CERT_ALGORITHM_SHA512_ECDSAecdsa-with-SHA512
SB_CERT_ALGORITHM_ECid-ecPublicKey
SB_CERT_ALGORITHM_SPECIFIED_ECDSAecdsa-specified
SB_CERT_ALGORITHM_GOST_R3410_1994id-GostR3410-94
SB_CERT_ALGORITHM_GOST_R3410_2001id-GostR3410-2001
SB_CERT_ALGORITHM_GOST_R3411_WITH_R3410_1994id-GostR3411-94-with-GostR3410-94
SB_CERT_ALGORITHM_GOST_R3411_WITH_R3410_2001id-GostR3411-94-with-GostR3410-2001
SB_CERT_ALGORITHM_SHA1_ECDSA_PLAINecdsa-plain-SHA1
SB_CERT_ALGORITHM_SHA224_ECDSA_PLAINecdsa-plain-SHA224
SB_CERT_ALGORITHM_SHA256_ECDSA_PLAINecdsa-plain-SHA256
SB_CERT_ALGORITHM_SHA384_ECDSA_PLAINecdsa-plain-SHA384
SB_CERT_ALGORITHM_SHA512_ECDSA_PLAINecdsa-plain-SHA512
SB_CERT_ALGORITHM_RIPEMD160_ECDSA_PLAINecdsa-plain-RIPEMD160
SB_CERT_ALGORITHM_WHIRLPOOL_RSA_ENCRYPTIONwhirlpoolWithRSAEncryption
SB_CERT_ALGORITHM_ID_DSA_SHA224id-dsa-with-sha224
SB_CERT_ALGORITHM_ID_DSA_SHA256id-dsa-with-sha256
SB_CERT_ALGORITHM_SHA3_224_RSA_ENCRYPTIONid-rsassa-pkcs1-v1_5-with-sha3-224
SB_CERT_ALGORITHM_SHA3_256_RSA_ENCRYPTIONid-rsassa-pkcs1-v1_5-with-sha3-256
SB_CERT_ALGORITHM_SHA3_384_RSA_ENCRYPTIONid-rsassa-pkcs1-v1_5-with-sha3-384
SB_CERT_ALGORITHM_SHA3_512_RSA_ENCRYPTIONid-rsassa-pkcs1-v1_5-with-sha3-512
SB_CERT_ALGORITHM_SHA3_224_ECDSAid-ecdsa-with-sha3-224
SB_CERT_ALGORITHM_SHA3_256_ECDSAid-ecdsa-with-sha3-256
SB_CERT_ALGORITHM_SHA3_384_ECDSAid-ecdsa-with-sha3-384
SB_CERT_ALGORITHM_SHA3_512_ECDSAid-ecdsa-with-sha3-512
SB_CERT_ALGORITHM_SHA3_224_ECDSA_PLAINid-ecdsa-plain-with-sha3-224
SB_CERT_ALGORITHM_SHA3_256_ECDSA_PLAINid-ecdsa-plain-with-sha3-256
SB_CERT_ALGORITHM_SHA3_384_ECDSA_PLAINid-ecdsa-plain-with-sha3-384
SB_CERT_ALGORITHM_SHA3_512_ECDSA_PLAINid-ecdsa-plain-with-sha3-512
SB_CERT_ALGORITHM_ID_DSA_SHA3_224id-dsa-with-sha3-224
SB_CERT_ALGORITHM_ID_DSA_SHA3_256id-dsa-with-sha3-256
SB_CERT_ALGORITHM_BLAKE2S_128_RSA_ENCRYPTIONid-rsassa-pkcs1-v1_5-with-blake2s128
SB_CERT_ALGORITHM_BLAKE2S_160_RSA_ENCRYPTIONid-rsassa-pkcs1-v1_5-with-blake2s160
SB_CERT_ALGORITHM_BLAKE2S_224_RSA_ENCRYPTIONid-rsassa-pkcs1-v1_5-with-blake2s224
SB_CERT_ALGORITHM_BLAKE2S_256_RSA_ENCRYPTIONid-rsassa-pkcs1-v1_5-with-blake2s256
SB_CERT_ALGORITHM_BLAKE2B_160_RSA_ENCRYPTIONid-rsassa-pkcs1-v1_5-with-blake2b160
SB_CERT_ALGORITHM_BLAKE2B_256_RSA_ENCRYPTIONid-rsassa-pkcs1-v1_5-with-blake2b256
SB_CERT_ALGORITHM_BLAKE2B_384_RSA_ENCRYPTIONid-rsassa-pkcs1-v1_5-with-blake2b384
SB_CERT_ALGORITHM_BLAKE2B_512_RSA_ENCRYPTIONid-rsassa-pkcs1-v1_5-with-blake2b512
SB_CERT_ALGORITHM_BLAKE2S_128_ECDSAid-ecdsa-with-blake2s128
SB_CERT_ALGORITHM_BLAKE2S_160_ECDSAid-ecdsa-with-blake2s160
SB_CERT_ALGORITHM_BLAKE2S_224_ECDSAid-ecdsa-with-blake2s224
SB_CERT_ALGORITHM_BLAKE2S_256_ECDSAid-ecdsa-with-blake2s256
SB_CERT_ALGORITHM_BLAKE2B_160_ECDSAid-ecdsa-with-blake2b160
SB_CERT_ALGORITHM_BLAKE2B_256_ECDSAid-ecdsa-with-blake2b256
SB_CERT_ALGORITHM_BLAKE2B_384_ECDSAid-ecdsa-with-blake2b384
SB_CERT_ALGORITHM_BLAKE2B_512_ECDSAid-ecdsa-with-blake2b512
SB_CERT_ALGORITHM_BLAKE2S_128_ECDSA_PLAINid-ecdsa-plain-with-blake2s128
SB_CERT_ALGORITHM_BLAKE2S_160_ECDSA_PLAINid-ecdsa-plain-with-blake2s160
SB_CERT_ALGORITHM_BLAKE2S_224_ECDSA_PLAINid-ecdsa-plain-with-blake2s224
SB_CERT_ALGORITHM_BLAKE2S_256_ECDSA_PLAINid-ecdsa-plain-with-blake2s256
SB_CERT_ALGORITHM_BLAKE2B_160_ECDSA_PLAINid-ecdsa-plain-with-blake2b160
SB_CERT_ALGORITHM_BLAKE2B_256_ECDSA_PLAINid-ecdsa-plain-with-blake2b256
SB_CERT_ALGORITHM_BLAKE2B_384_ECDSA_PLAINid-ecdsa-plain-with-blake2b384
SB_CERT_ALGORITHM_BLAKE2B_512_ECDSA_PLAINid-ecdsa-plain-with-blake2b512
SB_CERT_ALGORITHM_ID_DSA_BLAKE2S_224id-dsa-with-blake2s224
SB_CERT_ALGORITHM_ID_DSA_BLAKE2S_256id-dsa-with-blake2s256
SB_CERT_ALGORITHM_EDDSA_ED25519id-Ed25519
SB_CERT_ALGORITHM_EDDSA_ED448id-Ed448
SB_CERT_ALGORITHM_EDDSA_ED25519_PHid-Ed25519ph
SB_CERT_ALGORITHM_EDDSA_ED448_PHid-Ed448ph
SB_CERT_ALGORITHM_EDDSAid-EdDSA
SB_CERT_ALGORITHM_EDDSA_SIGNATUREid-EdDSA-sig

fips_mode Property

Reserved.

Syntax

def get_fips_mode() -> bool: ...
def set_fips_mode(value: bool) -> None: ...

fips_mode = property(get_fips_mode, set_fips_mode)

Default Value

FALSE

Remarks

This property is reserved for future use.

force_compression Property

This property specifies whether server explicitly requires data compression.

Syntax

def get_force_compression() -> bool: ...
def set_force_compression(value: bool) -> None: ...

force_compression = property(get_force_compression, set_force_compression)

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.

host Property

Specifies server's host name.

Syntax

def get_host() -> str: ...
def set_host(value: str) -> None: ...

host = property(get_host, set_host)

Default Value

""

Remarks

Use this property to set the host name for this server.

key_fingerprint_sha1 Property

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

Syntax

def get_key_fingerprint_sha1() -> str: ...

key_fingerprint_sha1 = property(get_key_fingerprint_sha1, None)

Default Value

""

Remarks

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

This property is read-only.

key_fingerprint_sha256 Property

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

Syntax

def get_key_fingerprint_sha256() -> str: ...

key_fingerprint_sha256 = property(get_key_fingerprint_sha256, None)

Default Value

""

Remarks

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

This property is read-only.

key_handle Property

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

Syntax

def get_key_handle() -> int: ...

key_handle = property(get_key_handle, None)

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.

max_sftp_version Property

Maximum SFTP version supported.

Syntax

def get_max_sftp_version() -> int: ...
def set_max_sftp_version(value: int) -> None: ...

max_sftp_version = property(get_max_sftp_version, set_max_sftp_version)

Default Value

6

Remarks

max_sftp_version and min_sftp_version properties control the range of SFTP protocol versions supported by this server.

min_sftp_version Property

Minimum SFTP version supported.

Syntax

def get_min_sftp_version() -> int: ...
def set_min_sftp_version(value: int) -> None: ...

min_sftp_version = property(get_min_sftp_version, set_min_sftp_version)

Default Value

0

Remarks

max_sftp_version and min_sftp_version properties control the range of SFTP protocol versions supported by this server.

pinned_client_client_key_algorithm Property

Specifies the client's key algorithm.

Syntax

def get_pinned_client_client_key_algorithm() -> str: ...

pinned_client_client_key_algorithm = property(get_pinned_client_client_key_algorithm, None)

Default Value

""

Remarks

Specifies the client's key algorithm.

This property is read-only.

pinned_client_client_key_bits Property

Specifies the length of the client's key.

Syntax

def get_pinned_client_client_key_bits() -> int: ...

pinned_client_client_key_bits = property(get_pinned_client_client_key_bits, None)

Default Value

0

Remarks

Specifies the length of the client's key.

This property is read-only.

pinned_client_client_key_fingerprint Property

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

Syntax

def get_pinned_client_client_key_fingerprint() -> str: ...

pinned_client_client_key_fingerprint = property(get_pinned_client_client_key_fingerprint, None)

Default Value

""

Remarks

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

This property is read-only.

pinned_client_close_reason Property

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

Syntax

def get_pinned_client_close_reason() -> str: ...

pinned_client_close_reason = property(get_pinned_client_close_reason, None)

Default Value

""

Remarks

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

This property is read-only.

pinned_client_compression_algorithm_inbound Property

Compression algorithm for the incoming traffic.

Syntax

def get_pinned_client_compression_algorithm_inbound() -> str: ...

pinned_client_compression_algorithm_inbound = property(get_pinned_client_compression_algorithm_inbound, None)

Default Value

""

Remarks

Compression algorithm for the incoming traffic.

This property is read-only.

pinned_client_compression_algorithm_outbound Property

Compression algorithm for the outgoing traffic.

Syntax

def get_pinned_client_compression_algorithm_outbound() -> str: ...

pinned_client_compression_algorithm_outbound = property(get_pinned_client_compression_algorithm_outbound, None)

Default Value

""

Remarks

Compression algorithm for the outgoing traffic.

This property is read-only.

pinned_client_encryption_algorithm_inbound Property

Encryption algorithm for the incoming traffic.

Syntax

def get_pinned_client_encryption_algorithm_inbound() -> str: ...

pinned_client_encryption_algorithm_inbound = property(get_pinned_client_encryption_algorithm_inbound, None)

Default Value

""

Remarks

Encryption algorithm for the incoming traffic.

This property is read-only.

pinned_client_encryption_algorithm_outbound Property

Encryption algorithm for the outgoing traffic.

Syntax

def get_pinned_client_encryption_algorithm_outbound() -> str: ...

pinned_client_encryption_algorithm_outbound = property(get_pinned_client_encryption_algorithm_outbound, None)

Default Value

""

Remarks

Encryption algorithm for the outgoing traffic.

This property is read-only.

pinned_client_inbound_encryption_key_bits Property

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

Syntax

def get_pinned_client_inbound_encryption_key_bits() -> int: ...

pinned_client_inbound_encryption_key_bits = property(get_pinned_client_inbound_encryption_key_bits, None)

Default Value

0

Remarks

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

This property is read-only.

pinned_client_kex_algorithm Property

The key exchange algorithm used during the SSH handshake.

Syntax

def get_pinned_client_kex_algorithm() -> str: ...

pinned_client_kex_algorithm = property(get_pinned_client_kex_algorithm, None)

Default Value

""

Remarks

The key exchange algorithm used during the SSH handshake.

This property is read-only.

pinned_client_kex_bits Property

The number of bits used by the key exchange algorithm.

Syntax

def get_pinned_client_kex_bits() -> int: ...

pinned_client_kex_bits = property(get_pinned_client_kex_bits, None)

Default Value

0

Remarks

The number of bits used by the key exchange algorithm.

This property is read-only.

pinned_client_kex_lines Property

The contents of the received KexInit packet.

Syntax

def get_pinned_client_kex_lines() -> str: ...

pinned_client_kex_lines = property(get_pinned_client_kex_lines, None)

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.

pinned_client_mac_algorithm_inbound Property

MAC algorithm used for the incoming connection.

Syntax

def get_pinned_client_mac_algorithm_inbound() -> str: ...

pinned_client_mac_algorithm_inbound = property(get_pinned_client_mac_algorithm_inbound, None)

Default Value

""

Remarks

MAC algorithm used for the incoming connection.

This property is read-only.

pinned_client_mac_algorithm_outbound Property

MAC algorithm used for outbound connection.

Syntax

def get_pinned_client_mac_algorithm_outbound() -> str: ...

pinned_client_mac_algorithm_outbound = property(get_pinned_client_mac_algorithm_outbound, None)

Default Value

""

Remarks

MAC algorithm used for outbound connection.

This property is read-only.

pinned_client_outbound_encryption_key_bits Property

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

Syntax

def get_pinned_client_outbound_encryption_key_bits() -> int: ...

pinned_client_outbound_encryption_key_bits = property(get_pinned_client_outbound_encryption_key_bits, None)

Default Value

0

Remarks

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

This property is read-only.

pinned_client_public_key_algorithm Property

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

Syntax

def get_pinned_client_public_key_algorithm() -> str: ...

pinned_client_public_key_algorithm = property(get_pinned_client_public_key_algorithm, None)

Default Value

""

Remarks

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

This property is read-only.

pinned_client_remote_address Property

The client's IP address.

Syntax

def get_pinned_client_remote_address() -> str: ...

pinned_client_remote_address = property(get_pinned_client_remote_address, None)

Default Value

""

Remarks

The client's IP address.

This property is read-only.

pinned_client_remote_port Property

The remote port of the client connection.

Syntax

def get_pinned_client_remote_port() -> int: ...

pinned_client_remote_port = property(get_pinned_client_remote_port, None)

Default Value

0

Remarks

The remote port of the client connection.

This property is read-only.

pinned_client_server_key_algorithm Property

Specifies the server's key algorithm.

Syntax

def get_pinned_client_server_key_algorithm() -> str: ...

pinned_client_server_key_algorithm = property(get_pinned_client_server_key_algorithm, None)

Default Value

""

Remarks

Specifies the server's key algorithm.

This property is read-only.

pinned_client_server_key_bits Property

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

Syntax

def get_pinned_client_server_key_bits() -> int: ...

pinned_client_server_key_bits = property(get_pinned_client_server_key_bits, None)

Default Value

0

Remarks

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

This property is read-only.

pinned_client_server_key_fingerprint Property

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

Syntax

def get_pinned_client_server_key_fingerprint() -> str: ...

pinned_client_server_key_fingerprint = property(get_pinned_client_server_key_fingerprint, None)

Default Value

""

Remarks

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

This property is read-only.

pinned_client_server_software_name Property

Returns the name of the SSH software running on the server side.

Syntax

def get_pinned_client_server_software_name() -> str: ...

pinned_client_server_software_name = property(get_pinned_client_server_software_name, None)

Default Value

""

Remarks

Returns the name of the SSH software running on the server side.

This property is read-only.

pinned_client_total_bytes_received Property

Returns the total number of bytes received over this connection.

Syntax

def get_pinned_client_total_bytes_received() -> int: ...

pinned_client_total_bytes_received = property(get_pinned_client_total_bytes_received, None)

Default Value

0

Remarks

Returns the total number of bytes received over this connection.

This property is read-only.

pinned_client_total_bytes_sent Property

Returns the total number of bytes sent over this connection.

Syntax

def get_pinned_client_total_bytes_sent() -> int: ...

pinned_client_total_bytes_sent = property(get_pinned_client_total_bytes_sent, None)

Default Value

0

Remarks

Returns the total number of bytes sent over this connection.

This property is read-only.

pinned_client_version Property

Specifies SSH protocol version.

Syntax

def get_pinned_client_version() -> int: ...

pinned_client_version = property(get_pinned_client_version, None)

Default Value

2

Remarks

Specifies SSH protocol version.

This property is read-only.

port Property

Specifies the listening port number.

Syntax

def get_port() -> int: ...
def set_port(value: int) -> None: ...

port = property(get_port, set_port)

Default Value

22

Remarks

Use this property to specify on which port the class will be listening to client connections.

read_only Property

Specifies whether files on the server are read-only.

Syntax

def get_read_only() -> bool: ...
def set_read_only(value: bool) -> None: ...

read_only = property(get_read_only, set_read_only)

Default Value

FALSE

Remarks

Set this property to true to deny all client requests to change files on the server.

server_key_count Property

The number of records in the ServerKey arrays.

Syntax

def get_server_key_count() -> int: ...
def set_server_key_count(value: int) -> None: ...

server_key_count = property(get_server_key_count, set_server_key_count)

Default Value

0

Remarks

This property controls the size of the following arrays:

The array indices start at 0 and end at server_key_count - 1.

server_key_algorithm Property

Specifies the key algorithm.

Syntax

def get_server_key_algorithm(server_key_index: int) -> str: ...

Default Value

""

Remarks

Specifies the key algorithm.

The following algorithms are currently supported:

  • RSA
  • DSS
  • ECDSA
  • EDDSA

The server_key_index parameter specifies the index of the item in the array. The size of the array is controlled by the server_key_count property.

This property is read-only.

server_key_bits Property

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

Syntax

def get_server_key_bits(server_key_index: int) -> int: ...

Default Value

0

Remarks

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

The server_key_index parameter specifies the index of the item in the array. The size of the array is controlled by the server_key_count property.

This property is read-only.

server_key_fingerprint_md5 Property

Contains the MD5 fingerprint (hash) of the key.

Syntax

def get_server_key_fingerprint_md5(server_key_index: int) -> str: ...

Default Value

""

Remarks

Contains the MD5 fingerprint (hash) of the key.

The server_key_index parameter specifies the index of the item in the array. The size of the array is controlled by the server_key_count property.

This property is read-only.

server_key_fingerprint_sha1 Property

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

Syntax

def get_server_key_fingerprint_sha1(server_key_index: int) -> str: ...

Default Value

""

Remarks

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

The server_key_index parameter specifies the index of the item in the array. The size of the array is controlled by the server_key_count property.

This property is read-only.

server_key_handle Property

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

Syntax

def get_server_key_handle(server_key_index: int) -> int: ...
def set_server_key_handle(server_key_index: int, value: int) -> None: ...

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 server_key_index parameter specifies the index of the item in the array. The size of the array is controlled by the server_key_count property.

socket_incoming_speed_limit Property

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

Syntax

def get_socket_incoming_speed_limit() -> int: ...
def set_socket_incoming_speed_limit(value: int) -> None: ...

socket_incoming_speed_limit = property(get_socket_incoming_speed_limit, set_socket_incoming_speed_limit)

Default Value

0

Remarks

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

socket_local_address Property

The local network interface to bind the socket to.

Syntax

def get_socket_local_address() -> str: ...
def set_socket_local_address(value: str) -> None: ...

socket_local_address = property(get_socket_local_address, set_socket_local_address)

Default Value

""

Remarks

The local network interface to bind the socket to.

socket_local_port Property

The local port number to bind the socket to.

Syntax

def get_socket_local_port() -> int: ...
def set_socket_local_port(value: int) -> None: ...

socket_local_port = property(get_socket_local_port, set_socket_local_port)

Default Value

0

Remarks

The local port number to bind the socket to.

socket_outgoing_speed_limit Property

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

Syntax

def get_socket_outgoing_speed_limit() -> int: ...
def set_socket_outgoing_speed_limit(value: int) -> None: ...

socket_outgoing_speed_limit = property(get_socket_outgoing_speed_limit, set_socket_outgoing_speed_limit)

Default Value

0

Remarks

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

socket_timeout Property

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

Syntax

def get_socket_timeout() -> int: ...
def set_socket_timeout(value: int) -> None: ...

socket_timeout = property(get_socket_timeout, set_socket_timeout)

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).

socket_use_ipv6 Property

Enables or disables IP protocol version 6.

Syntax

def get_socket_use_ipv6() -> bool: ...
def set_socket_use_ipv6(value: bool) -> None: ...

socket_use_ipv6 = property(get_socket_use_ipv6, set_socket_use_ipv6)

Default Value

FALSE

Remarks

Enables or disables IP protocol version 6.

ssh_settings_auto_adjust_ciphers Property

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

def get_ssh_settings_auto_adjust_ciphers() -> bool: ...
def set_ssh_settings_auto_adjust_ciphers(value: bool) -> None: ...

ssh_settings_auto_adjust_ciphers = property(get_ssh_settings_auto_adjust_ciphers, set_ssh_settings_auto_adjust_ciphers)

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.

ssh_settings_base_configuration Property

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

Syntax

def get_ssh_settings_base_configuration() -> int: ...
def set_ssh_settings_base_configuration(value: int) -> None: ...

ssh_settings_base_configuration = property(get_ssh_settings_base_configuration, set_ssh_settings_base_configuration)

Default Value

0

Remarks

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

ssh_settings_compression_algorithms Property

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

Syntax

def get_ssh_settings_compression_algorithms() -> str: ...
def set_ssh_settings_compression_algorithms(value: str) -> None: ...

ssh_settings_compression_algorithms = property(get_ssh_settings_compression_algorithms, set_ssh_settings_compression_algorithms)

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

ssh_settings_compression_level Property

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

Syntax

def get_ssh_settings_compression_level() -> int: ...
def set_ssh_settings_compression_level(value: int) -> None: ...

ssh_settings_compression_level = property(get_ssh_settings_compression_level, set_ssh_settings_compression_level)

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.

ssh_settings_default_window_size Property

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

def get_ssh_settings_default_window_size() -> int: ...
def set_ssh_settings_default_window_size(value: int) -> None: ...

ssh_settings_default_window_size = property(get_ssh_settings_default_window_size, set_ssh_settings_default_window_size)

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.

ssh_settings_encryption_algorithms Property

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

Syntax

def get_ssh_settings_encryption_algorithms() -> str: ...
def set_ssh_settings_encryption_algorithms(value: str) -> None: ...

ssh_settings_encryption_algorithms = property(get_ssh_settings_encryption_algorithms, set_ssh_settings_encryption_algorithms)

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

ssh_settings_force_compression Property

Whether the SSH client should explicitly request compression.

Syntax

def get_ssh_settings_force_compression() -> bool: ...
def set_ssh_settings_force_compression(value: bool) -> None: ...

ssh_settings_force_compression = property(get_ssh_settings_force_compression, set_ssh_settings_force_compression)

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.

ssh_settings_forward_auth_agent Property

Enables or disables auth agent forwarding.

Syntax

def get_ssh_settings_forward_auth_agent() -> bool: ...
def set_ssh_settings_forward_auth_agent(value: bool) -> None: ...

ssh_settings_forward_auth_agent = property(get_ssh_settings_forward_auth_agent, set_ssh_settings_forward_auth_agent)

Default Value

FALSE

Remarks

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

ssh_settings_gss_auth_types Property

A comma-separated list of authentication types.

Syntax

def get_ssh_settings_gss_auth_types() -> str: ...
def set_ssh_settings_gss_auth_types(value: str) -> None: ...

ssh_settings_gss_auth_types = property(get_ssh_settings_gss_auth_types, set_ssh_settings_gss_auth_types)

Default Value

""

Remarks

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

ssh_settings_gss_delegate_creds Property

Switches credential delegation on or off.

Syntax

def get_ssh_settings_gss_delegate_creds() -> bool: ...
def set_ssh_settings_gss_delegate_creds(value: bool) -> None: ...

ssh_settings_gss_delegate_creds = property(get_ssh_settings_gss_delegate_creds, set_ssh_settings_gss_delegate_creds)

Default Value

FALSE

Remarks

Switches credential delegation on or off.

ssh_settings_gss_hostname Property

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

Syntax

def get_ssh_settings_gss_hostname() -> str: ...
def set_ssh_settings_gss_hostname(value: str) -> None: ...

ssh_settings_gss_hostname = property(get_ssh_settings_gss_hostname, set_ssh_settings_gss_hostname)

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).

ssh_settings_gss_lib Property

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

Syntax

def get_ssh_settings_gss_lib() -> str: ...
def set_ssh_settings_gss_lib(value: str) -> None: ...

ssh_settings_gss_lib = property(get_ssh_settings_gss_lib, set_ssh_settings_gss_lib)

Default Value

""

Remarks

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

ssh_settings_gss_mechanisms Property

A comma-separated list of GSS mechanisms to use.

Syntax

def get_ssh_settings_gss_mechanisms() -> str: ...
def set_ssh_settings_gss_mechanisms(value: str) -> None: ...

ssh_settings_gss_mechanisms = property(get_ssh_settings_gss_mechanisms, set_ssh_settings_gss_mechanisms)

Default Value

""

Remarks

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

ssh_settings_gss_protocols Property

A comma-separated list of SSPI protocols.

Syntax

def get_ssh_settings_gss_protocols() -> str: ...
def set_ssh_settings_gss_protocols(value: str) -> None: ...

ssh_settings_gss_protocols = property(get_ssh_settings_gss_protocols, set_ssh_settings_gss_protocols)

Default Value

""

Remarks

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

ssh_settings_handshake_timeout Property

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

Syntax

def get_ssh_settings_handshake_timeout() -> int: ...
def set_ssh_settings_handshake_timeout(value: int) -> None: ...

ssh_settings_handshake_timeout = property(get_ssh_settings_handshake_timeout, set_ssh_settings_handshake_timeout)

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.

ssh_settings_kex_algorithms Property

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

Syntax

def get_ssh_settings_kex_algorithms() -> str: ...
def set_ssh_settings_kex_algorithms(value: str) -> None: ...

ssh_settings_kex_algorithms = property(get_ssh_settings_kex_algorithms, set_ssh_settings_kex_algorithms)

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

ssh_settings_mac_algorithms Property

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

Syntax

def get_ssh_settings_mac_algorithms() -> str: ...
def set_ssh_settings_mac_algorithms(value: str) -> None: ...

ssh_settings_mac_algorithms = property(get_ssh_settings_mac_algorithms, set_ssh_settings_mac_algorithms)

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

ssh_settings_max_ssh_packet_size Property

Specifies the maximum length of one SSH packet in bytes.

Syntax

def get_ssh_settings_max_ssh_packet_size() -> int: ...
def set_ssh_settings_max_ssh_packet_size(value: int) -> None: ...

ssh_settings_max_ssh_packet_size = property(get_ssh_settings_max_ssh_packet_size, set_ssh_settings_max_ssh_packet_size)

Default Value

262144

Remarks

Specifies the maximum length of one SSH packet in bytes.

ssh_settings_min_window_size Property

Specifies the minimal internal window size.

Syntax

def get_ssh_settings_min_window_size() -> int: ...
def set_ssh_settings_min_window_size(value: int) -> None: ...

ssh_settings_min_window_size = property(get_ssh_settings_min_window_size, set_ssh_settings_min_window_size)

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.

ssh_settings_obfuscate_handshake Property

Enables or disables handshake obfuscation.

Syntax

def get_ssh_settings_obfuscate_handshake() -> bool: ...
def set_ssh_settings_obfuscate_handshake(value: bool) -> None: ...

ssh_settings_obfuscate_handshake = property(get_ssh_settings_obfuscate_handshake, set_ssh_settings_obfuscate_handshake)

Default Value

FALSE

Remarks

Enables or disables handshake obfuscation.

ssh_settings_obfuscation_password Property

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

Syntax

def get_ssh_settings_obfuscation_password() -> str: ...
def set_ssh_settings_obfuscation_password(value: str) -> None: ...

ssh_settings_obfuscation_password = property(get_ssh_settings_obfuscation_password, set_ssh_settings_obfuscation_password)

Default Value

""

Remarks

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

ssh_settings_public_key_algorithms Property

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

Syntax

def get_ssh_settings_public_key_algorithms() -> str: ...
def set_ssh_settings_public_key_algorithms(value: str) -> None: ...

ssh_settings_public_key_algorithms = property(get_ssh_settings_public_key_algorithms, set_ssh_settings_public_key_algorithms)

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

ssh_settings_request_password_change Property

Whether to request a password change when connecting.

Syntax

def get_ssh_settings_request_password_change() -> bool: ...
def set_ssh_settings_request_password_change(value: bool) -> None: ...

ssh_settings_request_password_change = property(get_ssh_settings_request_password_change, set_ssh_settings_request_password_change)

Default Value

FALSE

Remarks

Whether to request a password change when connecting.

ssh_settings_software_name Property

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

Syntax

def get_ssh_settings_software_name() -> str: ...
def set_ssh_settings_software_name(value: str) -> None: ...

ssh_settings_software_name = property(get_ssh_settings_software_name, set_ssh_settings_software_name)

Default Value

"SecureBlackbox"

Remarks

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

ssh_settings_trust_all_keys Property

Enables or disables explicit trust to all server keys.

Syntax

def get_ssh_settings_trust_all_keys() -> bool: ...
def set_ssh_settings_trust_all_keys(value: bool) -> None: ...

ssh_settings_trust_all_keys = property(get_ssh_settings_trust_all_keys, set_ssh_settings_trust_all_keys)

Default Value

FALSE

Remarks

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

ssh_settings_use_auth_agent Property

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

Syntax

def get_ssh_settings_use_auth_agent() -> bool: ...
def set_ssh_settings_use_auth_agent(value: bool) -> None: ...

ssh_settings_use_auth_agent = property(get_ssh_settings_use_auth_agent, set_ssh_settings_use_auth_agent)

Default Value

FALSE

Remarks

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

ssh_settings_versions Property

Specifies enabled SSH protocol versions (1 or 2).

Syntax

def get_ssh_settings_versions() -> int: ...
def set_ssh_settings_versions(value: int) -> None: ...

ssh_settings_versions = property(get_ssh_settings_versions, set_ssh_settings_versions)

Default Value

1

Remarks

Specifies enabled SSH protocol versions (1 or 2).

user_count Property

The number of records in the User arrays.

Syntax

def get_user_count() -> int: ...
def set_user_count(value: int) -> None: ...

user_count = property(get_user_count, set_user_count)

Default Value

0

Remarks

This property controls the size of the following arrays:

The array indices start at 0 and end at user_count - 1.

user_associated_data Property

Contains the user's Associated Data when SSH AEAD (Authenticated Encryption with Associated Data) algorithm is used.

Syntax

def get_user_associated_data(user_index: int) -> bytes: ...
def set_user_associated_data(user_index: int, value: bytes) -> None: ...

Remarks

Contains the user's Associated Data when SSH AEAD (Authenticated Encryption with Associated Data) algorithm is used.

The user_index parameter specifies the index of the item in the array. The size of the array is controlled by the user_count property.

user_base_path Property

Base path for this user in the server's file system.

Syntax

def get_user_base_path(user_index: int) -> str: ...
def set_user_base_path(user_index: int, value: str) -> None: ...

Default Value

""

Remarks

Base path for this user in the server's file system.

The user_index parameter specifies the index of the item in the array. The size of the array is controlled by the user_count property.

user_certificate Property

Contains the user's certificate.

Syntax

def get_user_certificate(user_index: int) -> bytes: ...
def set_user_certificate(user_index: int, value: bytes) -> None: ...

Remarks

Contains the user's certificate.

The user_index parameter specifies the index of the item in the array. The size of the array is controlled by the user_count property.

user_data Property

Contains uninterpreted user-defined data that should be associated with the user account, such as comments or custom settings.

Syntax

def get_user_data(user_index: int) -> str: ...
def set_user_data(user_index: int, value: str) -> None: ...

Default Value

""

Remarks

Contains uninterpreted user-defined data that should be associated with the user account, such as comments or custom settings.

The user_index parameter specifies the index of the item in the array. The size of the array is controlled by the user_count property.

user_email Property

The user's email address.

Syntax

def get_user_email(user_index: int) -> str: ...
def set_user_email(user_index: int, value: str) -> None: ...

Default Value

""

Remarks

The user's email address.

The user_index parameter specifies the index of the item in the array. The size of the array is controlled by the user_count property.

user_handle Property

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

Syntax

def get_user_handle(user_index: int) -> int: ...
def set_user_handle(user_index: int, value: int) -> None: ...

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 user_index parameter specifies the index of the item in the array. The size of the array is controlled by the user_count property.

user_hash_algorithm Property

Specifies the hash algorithm used to generate TOTP (Time-based One-Time Passwords) passwords for this user.

Syntax

def get_user_hash_algorithm(user_index: int) -> str: ...
def set_user_hash_algorithm(user_index: int, value: str) -> None: ...

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_SHA1SHA1
SB_MAC_ALGORITHM_HMAC_SHA256SHA256
SB_MAC_ALGORITHM_HMAC_SHA512SHA512

The user_index parameter specifies the index of the item in the array. The size of the array is controlled by the user_count property.

user_incoming_speed_limit Property

Specifies the incoming speed limit for this user.

Syntax

def get_user_incoming_speed_limit(user_index: int) -> int: ...
def set_user_incoming_speed_limit(user_index: int, value: int) -> None: ...

Default Value

0

Remarks

Specifies the incoming speed limit for this user. The value of 0 (zero) means "no limitation".

The user_index parameter specifies the index of the item in the array. The size of the array is controlled by the user_count property.

user_otp_algorithm Property

The algorithm used to generate one-time passwords (OTP) for this user, either HOTP (Hash-based OTP) or TOTP (Time-based OTP).

Syntax

def get_user_otp_algorithm(user_index: int) -> int: ...
def set_user_otp_algorithm(user_index: int, value: int) -> None: ...

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.

oaHmac0
oaTime1

The user_index parameter specifies the index of the item in the array. The size of the array is controlled by the user_count property.

user_otp_len Property

Specifies the length of the user's OTP password.

Syntax

def get_user_otp_len(user_index: int) -> int: ...
def set_user_otp_len(user_index: int, value: int) -> None: ...

Default Value

0

Remarks

Specifies the length of the user's OTP password.

The user_index parameter specifies the index of the item in the array. The size of the array is controlled by the user_count property.

user_otp_value Property

The user's time interval (TOTP) or Counter (HOTP).

Syntax

def get_user_otp_value(user_index: int) -> int: ...
def set_user_otp_value(user_index: int, value: int) -> None: ...

Default Value

0

Remarks

The user's time interval (TOTP) or Counter (HOTP).

The user_index parameter specifies the index of the item in the array. The size of the array is controlled by the user_count property.

user_outgoing_speed_limit Property

Specifies the outgoing speed limit for this user.

Syntax

def get_user_outgoing_speed_limit(user_index: int) -> int: ...
def set_user_outgoing_speed_limit(user_index: int, value: int) -> None: ...

Default Value

0

Remarks

Specifies the outgoing speed limit for this user. The value of 0 (zero) means "no limitation".

The user_index parameter specifies the index of the item in the array. The size of the array is controlled by the user_count property.

user_password Property

The user's authentication password.

Syntax

def get_user_password(user_index: int) -> str: ...
def set_user_password(user_index: int, value: str) -> None: ...

Default Value

""

Remarks

The user's authentication password.

The user_index parameter specifies the index of the item in the array. The size of the array is controlled by the user_count property.

user_shared_secret Property

Contains the user's secret key, which is essentially a shared secret between the client and server.

Syntax

def get_user_shared_secret(user_index: int) -> bytes: ...
def set_user_shared_secret(user_index: int, value: bytes) -> None: ...

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 user_index parameter specifies the index of the item in the array. The size of the array is controlled by the user_count property.

user_ssh_key Property

Contains the user's SSH key.

Syntax

def get_user_ssh_key(user_index: int) -> bytes: ...
def set_user_ssh_key(user_index: int, value: bytes) -> None: ...

Remarks

Contains the user's SSH key.

The user_index parameter specifies the index of the item in the array. The size of the array is controlled by the user_count property.

user_username Property

The registered name (login) of the user.

Syntax

def get_user_username(user_index: int) -> str: ...
def set_user_username(user_index: int, value: str) -> None: ...

Default Value

""

Remarks

The registered name (login) of the user.

The user_index parameter specifies the index of the item in the array. The size of the array is controlled by the user_count property.

use_utf8 Property

Specifies whether UTF8 conversion is to be used when parsing file names.

Syntax

def get_use_utf8() -> bool: ...
def set_use_utf8(value: bool) -> None: ...

use_utf8 = property(get_use_utf8, set_use_utf8)

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.

cleanup Method

Cleans up the server environment by purging expired sessions and cleaning caches.

Syntax

def cleanup() -> None: ...

Remarks

Call this method while the server is active to clean up the environment allocated for the server by releasing unused resources and cleaning caches.

config Method

Sets or retrieves a configuration setting.

Syntax

def config(configuration_string: str) -> str: ...

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.

do_action Method

Performs an additional action.

Syntax

def do_action(action_id: str, action_params: str) -> str: ...

Remarks

do_action 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;....

Common ActionIDs:

ActionParametersReturned valueDescription
ResetTrustedListCachenonenoneClears the cached list of trusted lists.
ResetCertificateCachenonenoneClears the cached certificates.
ResetCRLCachenonenoneClears the cached CRLs.
ResetOCSPResponseCachenonenoneClears the cached OCSP responses.

drop_client Method

Terminates a client connection.

Syntax

def drop_client(connection_id: int, forced: bool) -> None: ...

Remarks

Call this method to shut down a connected client. Forced indicates whether the connection should be closed in a graceful manner.

get_client_buffer Method

Acquires a piece of operation data.

Syntax

def get_client_buffer(connection_id: int, handle: str) -> bytes: ...

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 on_write_file event handler, when implementing customized file transfers.

get_client_file_entry Method

Acquires file entry details from the class.

Syntax

def get_client_file_entry(connection_id: int, handle: str) -> None: ...

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 client_file_entry property.

When calling this method, pass the client connection ID in ConnectionID property, and the opened file handle (if needed) in Handle property.

list_clients Method

Enumerates the connected clients.

Syntax

def list_clients() -> str: ...

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.

pin_client Method

Takes a snapshot of the connection's properties.

Syntax

def pin_client(connection_id: int) -> None: ...

Remarks

Use this method to take a snapshot of a connected client. The captured properties are populated in pinned_client property.

reset Method

Resets the class settings.

Syntax

def reset() -> None: ...

Remarks

reset is a generic method available in every class.

set_client_buffer Method

Commits a data buffer to the server class.

Syntax

def set_client_buffer(connection_id: int, handle: str, value: bytes) -> None: ...

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 on_read_file event.

set_client_file_entry Method

Commits the file entry details to the class.

Syntax

def set_client_file_entry(connection_id: int, handle: str) -> None: ...

Remarks

Use this method to commit the file entry details configured in client_file_entry 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.

start Method

Starts SFTP server operation.

Syntax

def start() -> None: ...

Remarks

Call this method to start listening to incoming connections.

stop Method

Stops SFTP server.

Syntax

def stop() -> None: ...

Remarks

Call this method to close all connections and stop listening to clients.

on_accept Event

This event is fired when new incoming connection is accepted.

Syntax

class SFTPServerAcceptEventParams(object):
  @property
  def remote_address() -> str: ...

  @property
  def remote_port() -> int: ...

  @property
  def accept() -> bool: ...
  @accept.setter
  def accept(value) -> None: ...

# In class SFTPServer:
@property
def on_accept() -> Callable[[SFTPServerAcceptEventParams], None]: ...
@on_accept.setter
def on_accept(event_hook: Callable[[SFTPServerAcceptEventParams], None]) -> None: ...

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.

on_after_create_directory Event

This event indicates completion of directory creation request.

Syntax

class SFTPServerAfterCreateDirectoryEventParams(object):
  @property
  def connection_id() -> int: ...

  @property
  def path() -> str: ...

  @property
  def operation_status() -> int: ...
  @operation_status.setter
  def operation_status(value) -> None: ...

# In class SFTPServer:
@property
def on_after_create_directory() -> Callable[[SFTPServerAfterCreateDirectoryEventParams], None]: ...
@on_after_create_directory.setter
def on_after_create_directory(event_hook: Callable[[SFTPServerAfterCreateDirectoryEventParams], None]) -> None: ...

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:

ostOk1
ostNoSuchFile2
ostAccessDenied3
ostWriteProtect4
ostUnsupported5
ostInvalidParameter6
ostEOF7

on_after_remove Event

This event indicates completion of file removal request.

Syntax

class SFTPServerAfterRemoveEventParams(object):
  @property
  def connection_id() -> int: ...

  @property
  def path() -> str: ...

  @property
  def operation_status() -> int: ...
  @operation_status.setter
  def operation_status(value) -> None: ...

# In class SFTPServer:
@property
def on_after_remove() -> Callable[[SFTPServerAfterRemoveEventParams], None]: ...
@on_after_remove.setter
def on_after_remove(event_hook: Callable[[SFTPServerAfterRemoveEventParams], None]) -> None: ...

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:

ostOk1
ostNoSuchFile2
ostAccessDenied3
ostWriteProtect4
ostUnsupported5
ostInvalidParameter6
ostEOF7

on_after_rename_file Event

This event indicates completion of a file rename operation.

Syntax

class SFTPServerAfterRenameFileEventParams(object):
  @property
  def connection_id() -> int: ...

  @property
  def old_path() -> str: ...

  @property
  def new_path() -> str: ...

  @property
  def operation_status() -> int: ...
  @operation_status.setter
  def operation_status(value) -> None: ...

# In class SFTPServer:
@property
def on_after_rename_file() -> Callable[[SFTPServerAfterRenameFileEventParams], None]: ...
@on_after_rename_file.setter
def on_after_rename_file(event_hook: Callable[[SFTPServerAfterRenameFileEventParams], None]) -> None: ...

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:

ostOk1
ostNoSuchFile2
ostAccessDenied3
ostWriteProtect4
ostUnsupported5
ostInvalidParameter6
ostEOF7

on_after_request_attributes Event

This event indicates completion of file attributes request.

Syntax

class SFTPServerAfterRequestAttributesEventParams(object):
  @property
  def connection_id() -> int: ...

  @property
  def path() -> str: ...

  @property
  def operation_status() -> int: ...
  @operation_status.setter
  def operation_status(value) -> None: ...

# In class SFTPServer:
@property
def on_after_request_attributes() -> Callable[[SFTPServerAfterRequestAttributesEventParams], None]: ...
@on_after_request_attributes.setter
def on_after_request_attributes(event_hook: Callable[[SFTPServerAfterRequestAttributesEventParams], None]) -> None: ...

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:

ostOk1
ostNoSuchFile2
ostAccessDenied3
ostWriteProtect4
ostUnsupported5
ostInvalidParameter6
ostEOF7

on_after_set_attributes Event

This event indicates completion of a set attributes request.

Syntax

class SFTPServerAfterSetAttributesEventParams(object):
  @property
  def connection_id() -> int: ...

  @property
  def path() -> str: ...

  @property
  def operation_status() -> int: ...
  @operation_status.setter
  def operation_status(value) -> None: ...

# In class SFTPServer:
@property
def on_after_set_attributes() -> Callable[[SFTPServerAfterSetAttributesEventParams], None]: ...
@on_after_set_attributes.setter
def on_after_set_attributes(event_hook: Callable[[SFTPServerAfterSetAttributesEventParams], None]) -> None: ...

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:

ostOk1
ostNoSuchFile2
ostAccessDenied3
ostWriteProtect4
ostUnsupported5
ostInvalidParameter6
ostEOF7

on_auth_attempt Event

Reports a user authentication attempt.

Syntax

class SFTPServerAuthAttemptEventParams(object):
  @property
  def connection_id() -> int: ...

  @property
  def username() -> str: ...

  @property
  def auth_type() -> int: ...

  @property
  def accept() -> bool: ...
  @accept.setter
  def accept(value) -> None: ...

# In class SFTPServer:
@property
def on_auth_attempt() -> Callable[[SFTPServerAuthAttemptEventParams], None]: ...
@on_auth_attempt.setter
def on_auth_attempt(event_hook: Callable[[SFTPServerAuthAttemptEventParams], None]) -> None: ...

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:

atRhosts0x01RHOSTS file authentication. Rarely used today.

atPublicKey0x02Public key (sometimes called private key) authentication

atPassword0x04Password-based authentication

atHostbased0x08Hostbased authentication

atKeyboard0x10Keyboard-interactive authentication. This is often used in place of generic password authentication.

atGssWithMic0x20GSS authentication

atGssKeyex0x40GSS authentication with key exchange

atPublicKeyAgent0x80Public key agent authentication

on_auth_failed Event

Reports user authentication failure.

Syntax

class SFTPServerAuthFailedEventParams(object):
  @property
  def connection_id() -> int: ...

  @property
  def username() -> str: ...

  @property
  def auth_type() -> int: ...

# In class SFTPServer:
@property
def on_auth_failed() -> Callable[[SFTPServerAuthFailedEventParams], None]: ...
@on_auth_failed.setter
def on_auth_failed(event_hook: Callable[[SFTPServerAuthFailedEventParams], None]) -> None: ...

Remarks

ConnectionID identifies the session, Username specify client's username, and AuthType specifies what authentication type was used.

Supported authentication types:

atRhosts0x01RHOSTS file authentication. Rarely used today.

atPublicKey0x02Public key (sometimes called private key) authentication

atPassword0x04Password-based authentication

atHostbased0x08Hostbased authentication

atKeyboard0x10Keyboard-interactive authentication. This is often used in place of generic password authentication.

atGssWithMic0x20GSS authentication

atGssKeyex0x40GSS authentication with key exchange

atPublicKeyAgent0x80Public key agent authentication

on_auth_password Event

This event is fired on password authentication attempt from a client.

Syntax

class SFTPServerAuthPasswordEventParams(object):
  @property
  def connection_id() -> int: ...

  @property
  def username() -> str: ...

  @property
  def password() -> str: ...

  @property
  def accept() -> bool: ...
  @accept.setter
  def accept(value) -> None: ...

  @property
  def force_change_password() -> bool: ...
  @force_change_password.setter
  def force_change_password(value) -> None: ...

# In class SFTPServer:
@property
def on_auth_password() -> Callable[[SFTPServerAuthPasswordEventParams], None]: ...
@on_auth_password.setter
def on_auth_password(event_hook: Callable[[SFTPServerAuthPasswordEventParams], None]) -> None: ...

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.

on_auth_public_key Event

This event is fired on public key authentication attempt from a client.

Syntax

class SFTPServerAuthPublicKeyEventParams(object):
  @property
  def connection_id() -> int: ...

  @property
  def username() -> str: ...

  @property
  def accept() -> bool: ...
  @accept.setter
  def accept(value) -> None: ...

# In class SFTPServer:
@property
def on_auth_public_key() -> Callable[[SFTPServerAuthPublicKeyEventParams], None]: ...
@on_auth_public_key.setter
def on_auth_public_key(event_hook: Callable[[SFTPServerAuthPublicKeyEventParams], None]) -> None: ...

Remarks

Username specifies client's username, and Accept is used to accept or reject authentication.

on_auth_succeeded Event

Reports a successful user authentication.

Syntax

class SFTPServerAuthSucceededEventParams(object):
  @property
  def connection_id() -> int: ...

  @property
  def username() -> str: ...

  @property
  def auth_type() -> int: ...

# In class SFTPServer:
@property
def on_auth_succeeded() -> Callable[[SFTPServerAuthSucceededEventParams], None]: ...
@on_auth_succeeded.setter
def on_auth_succeeded(event_hook: Callable[[SFTPServerAuthSucceededEventParams], None]) -> None: ...

Remarks

ConnectionID identifies the session, Username specify client's username, and AuthType specifies what authentication type was used.

Supported authentication types:

atRhosts0x01RHOSTS file authentication. Rarely used today.

atPublicKey0x02Public key (sometimes called private key) authentication

atPassword0x04Password-based authentication

atHostbased0x08Hostbased authentication

atKeyboard0x10Keyboard-interactive authentication. This is often used in place of generic password authentication.

atGssWithMic0x20GSS authentication

atGssKeyex0x40GSS authentication with key exchange

atPublicKeyAgent0x80Public key agent authentication

on_before_create_directory Event

This event is fired when a client requests to create a directory.

Syntax

class SFTPServerBeforeCreateDirectoryEventParams(object):
  @property
  def connection_id() -> int: ...

  @property
  def path() -> str: ...

  @property
  def action() -> int: ...
  @action.setter
  def action(value) -> None: ...

# In class SFTPServer:
@property
def on_before_create_directory() -> Callable[[SFTPServerBeforeCreateDirectoryEventParams], None]: ...
@on_before_create_directory.setter
def on_before_create_directory(event_hook: Callable[[SFTPServerBeforeCreateDirectoryEventParams], None]) -> None: ...

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:

fraAuto1Handle the requested action automatically by the server

fraCustom2Override the action using the user code logic

fraAbort3Abort the requested action

on_before_download_file Event

This event is fired when a download file request is received.

Syntax

class SFTPServerBeforeDownloadFileEventParams(object):
  @property
  def connection_id() -> int: ...

  @property
  def path() -> str: ...

  @property
  def action() -> int: ...
  @action.setter
  def action(value) -> None: ...

# In class SFTPServer:
@property
def on_before_download_file() -> Callable[[SFTPServerBeforeDownloadFileEventParams], None]: ...
@on_before_download_file.setter
def on_before_download_file(event_hook: Callable[[SFTPServerBeforeDownloadFileEventParams], None]) -> None: ...

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:

fraAuto1Handle the requested action automatically by the server

fraCustom2Override the action using the user code logic

fraAbort3Abort the requested action

on_before_find Event

This event is fired when a client requests to find files and folders in Path.

Syntax

class SFTPServerBeforeFindEventParams(object):
  @property
  def connection_id() -> int: ...

  @property
  def path() -> str: ...

  @property
  def action() -> int: ...
  @action.setter
  def action(value) -> None: ...

# In class SFTPServer:
@property
def on_before_find() -> Callable[[SFTPServerBeforeFindEventParams], None]: ...
@on_before_find.setter
def on_before_find(event_hook: Callable[[SFTPServerBeforeFindEventParams], None]) -> None: ...

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:

fraAuto1Handle the requested action automatically by the server

fraCustom2Override the action using the user code logic

fraAbort3Abort the requested action

on_before_open_client_forwarding Event

This event is fired when a client requests to set up client-side (local) forwarding channel.

Syntax

class SFTPServerBeforeOpenClientForwardingEventParams(object):
  @property
  def connection_id() -> int: ...

  @property
  def dest_host() -> str: ...
  @dest_host.setter
  def dest_host(value) -> None: ...

  @property
  def dest_port() -> int: ...
  @dest_port.setter
  def dest_port(value) -> None: ...

  @property
  def src_host() -> str: ...

  @property
  def src_port() -> int: ...

  @property
  def action() -> int: ...
  @action.setter
  def action(value) -> None: ...

# In class SFTPServer:
@property
def on_before_open_client_forwarding() -> Callable[[SFTPServerBeforeOpenClientForwardingEventParams], None]: ...
@on_before_open_client_forwarding.setter
def on_before_open_client_forwarding(event_hook: Callable[[SFTPServerBeforeOpenClientForwardingEventParams], None]) -> None: ...

Remarks

This event is fired when a request to open a client forwarding has been received. The ConnectionID parameter specifies in which session the request was received.

If permitted, the server will open a connection to DestHost:DestPort and start forwarding any data received from the client to that endpoint. You can enable or disable client forwarding blanketly via the capabilities property.

Choose Action as one of the following values:

fraAuto1Handle the requested action automatically by the server

fraCustom2Override the action using the user code logic

fraAbort3Abort the requested action

on_before_open_command Event

This event is fired when a client requests a command channel.

Syntax

class SFTPServerBeforeOpenCommandEventParams(object):
  @property
  def connection_id() -> int: ...

  @property
  def command() -> str: ...
  @command.setter
  def command(value) -> None: ...

  @property
  def action() -> int: ...
  @action.setter
  def action(value) -> None: ...

# In class SFTPServer:
@property
def on_before_open_command() -> Callable[[SFTPServerBeforeOpenCommandEventParams], None]: ...
@on_before_open_command.setter
def on_before_open_command(event_hook: Callable[[SFTPServerBeforeOpenCommandEventParams], None]) -> None: ...

Remarks

This event is fired when a request to open a command has been received. The ConnectionID parameter specifies in which session the request was received.

If permitted, the component will launch the command in a separate process. Note that allowing command access to all clients can be dangerous. You can enable or disable command support blanketly via the capabilities property.

Choose Action as one of the following values:

fraAuto1Handle the requested action automatically by the server

fraCustom2Override the action using the user code logic

fraAbort3Abort the requested action

on_before_open_server_forwarding Event

This event is fired when the server has received an incoming connection and needs to set up server-side (remote) forwarding channel.

Syntax

class SFTPServerBeforeOpenServerForwardingEventParams(object):
  @property
  def connection_id() -> int: ...

  @property
  def local_host() -> str: ...

  @property
  def local_port() -> int: ...

  @property
  def src_host() -> str: ...

  @property
  def src_port() -> int: ...

  @property
  def action() -> int: ...
  @action.setter
  def action(value) -> None: ...

# In class SFTPServer:
@property
def on_before_open_server_forwarding() -> Callable[[SFTPServerBeforeOpenServerForwardingEventParams], None]: ...
@on_before_open_server_forwarding.setter
def on_before_open_server_forwarding(event_hook: Callable[[SFTPServerBeforeOpenServerForwardingEventParams], None]) -> None: ...

Remarks

The ConnectionID parameter specifies in which session the request was received.

If permitted, the server will accept the connection and ask the client to confirm forwarding to DestHost:DestPort. If that is successful, the server will fire the on_open_server_forwarding event.

You can enable or disable client forwarding blanketly via the capabilities property.

Choose Action as one of the following values:

fraAuto1Handle the requested action automatically by the server

fraCustom2Override the action using the user code logic

fraAbort3Abort the requested action

on_before_open_shell Event

This event is fired when a client requests a shell channel.

Syntax

class SFTPServerBeforeOpenShellEventParams(object):
  @property
  def connection_id() -> int: ...

  @property
  def action() -> int: ...
  @action.setter
  def action(value) -> None: ...

# In class SFTPServer:
@property
def on_before_open_shell() -> Callable[[SFTPServerBeforeOpenShellEventParams], None]: ...
@on_before_open_shell.setter
def on_before_open_shell(event_hook: Callable[[SFTPServerBeforeOpenShellEventParams], None]) -> None: ...

Remarks

This event is fired when a request to open a shell has been received. The ConnectionID parameter specifies in which session the request was received.

If permitted, the client will be able to send commands to the shell. Note that allowing shell access to all clients can be dangerous. You can enable or disable shell access blanketly via the capabilities property.

Choose Action as one of the following values:

fraAuto1Handle the requested action automatically by the server

fraCustom2Override the action using the user code logic

fraAbort3Abort the requested action

on_before_remove Event

This event is fired when a client requests to delete a file or directory.

Syntax

class SFTPServerBeforeRemoveEventParams(object):
  @property
  def connection_id() -> int: ...

  @property
  def path() -> str: ...

  @property
  def action() -> int: ...
  @action.setter
  def action(value) -> None: ...

# In class SFTPServer:
@property
def on_before_remove() -> Callable[[SFTPServerBeforeRemoveEventParams], None]: ...
@on_before_remove.setter
def on_before_remove(event_hook: Callable[[SFTPServerBeforeRemoveEventParams], None]) -> None: ...

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:

fraAuto1Handle the requested action automatically by the server

fraCustom2Override the action using the user code logic

fraAbort3Abort the requested action

on_before_rename_file Event

This event is fired when a client requests to rename a file.

Syntax

class SFTPServerBeforeRenameFileEventParams(object):
  @property
  def connection_id() -> int: ...

  @property
  def old_path() -> str: ...

  @property
  def new_path() -> str: ...

  @property
  def action() -> int: ...
  @action.setter
  def action(value) -> None: ...

# In class SFTPServer:
@property
def on_before_rename_file() -> Callable[[SFTPServerBeforeRenameFileEventParams], None]: ...
@on_before_rename_file.setter
def on_before_rename_file(event_hook: Callable[[SFTPServerBeforeRenameFileEventParams], None]) -> None: ...

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:

fraAuto1Handle the requested action automatically by the server

fraCustom2Override the action using the user code logic

fraAbort3Abort the requested action

on_before_request_attributes Event

This event is fired when a client requests to get file attributes.

Syntax

class SFTPServerBeforeRequestAttributesEventParams(object):
  @property
  def connection_id() -> int: ...

  @property
  def path() -> str: ...

  @property
  def action() -> int: ...
  @action.setter
  def action(value) -> None: ...

# In class SFTPServer:
@property
def on_before_request_attributes() -> Callable[[SFTPServerBeforeRequestAttributesEventParams], None]: ...
@on_before_request_attributes.setter
def on_before_request_attributes(event_hook: Callable[[SFTPServerBeforeRequestAttributesEventParams], None]) -> None: ...

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:

fraAuto1Handle the requested action automatically by the server

fraCustom2Override the action using the user code logic

fraAbort3Abort the requested action

on_before_set_attributes Event

This event is fired when a client requests to set file attributes.

Syntax

class SFTPServerBeforeSetAttributesEventParams(object):
  @property
  def connection_id() -> int: ...

  @property
  def path() -> str: ...

  @property
  def action() -> int: ...
  @action.setter
  def action(value) -> None: ...

# In class SFTPServer:
@property
def on_before_set_attributes() -> Callable[[SFTPServerBeforeSetAttributesEventParams], None]: ...
@on_before_set_attributes.setter
def on_before_set_attributes(event_hook: Callable[[SFTPServerBeforeSetAttributesEventParams], None]) -> None: ...

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:

fraAuto1Handle the requested action automatically by the server

fraCustom2Override the action using the user code logic

fraAbort3Abort the requested action

on_before_upload_file Event

This event is fired when an upload file request is received.

Syntax

class SFTPServerBeforeUploadFileEventParams(object):
  @property
  def connection_id() -> int: ...

  @property
  def path() -> str: ...

  @property
  def action() -> int: ...
  @action.setter
  def action(value) -> None: ...

# In class SFTPServer:
@property
def on_before_upload_file() -> Callable[[SFTPServerBeforeUploadFileEventParams], None]: ...
@on_before_upload_file.setter
def on_before_upload_file(event_hook: Callable[[SFTPServerBeforeUploadFileEventParams], None]) -> None: ...

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:

fraAuto1Handle the requested action automatically by the server

fraCustom2Override the action using the user code logic

fraAbort3Abort the requested action

on_close_client_forwarding Event

This event is fired when a client has closed a previously opened forwarding channel.

Syntax

class SFTPServerCloseClientForwardingEventParams(object):
  @property
  def connection_id() -> int: ...

  @property
  def dest_host() -> str: ...

  @property
  def dest_port() -> int: ...

  @property
  def src_host() -> str: ...

  @property
  def src_port() -> int: ...

# In class SFTPServer:
@property
def on_close_client_forwarding() -> Callable[[SFTPServerCloseClientForwardingEventParams], None]: ...
@on_close_client_forwarding.setter
def on_close_client_forwarding(event_hook: Callable[[SFTPServerCloseClientForwardingEventParams], None]) -> None: ...

Remarks

The ConnectionID parameter specifies in which session the request was received.

on_close_command Event

This event is fired when a client has closed a previously opened SSH command channel.

Syntax

class SFTPServerCloseCommandEventParams(object):
  @property
  def connection_id() -> int: ...

  @property
  def command() -> str: ...

# In class SFTPServer:
@property
def on_close_command() -> Callable[[SFTPServerCloseCommandEventParams], None]: ...
@on_close_command.setter
def on_close_command(event_hook: Callable[[SFTPServerCloseCommandEventParams], None]) -> None: ...

Remarks

The ConnectionID parameter specifies in which session the request was received.

on_close_file Event

This event instructs the application to close an opened file.

Syntax

class SFTPServerCloseFileEventParams(object):
  @property
  def connection_id() -> int: ...

  @property
  def handle() -> str: ...

  @property
  def operation_status() -> int: ...
  @operation_status.setter
  def operation_status(value) -> None: ...

# In class SFTPServer:
@property
def on_close_file() -> Callable[[SFTPServerCloseFileEventParams], None]: ...
@on_close_file.setter
def on_close_file(event_hook: Callable[[SFTPServerCloseFileEventParams], None]) -> None: ...

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:

ostOk1
ostNoSuchFile2
ostAccessDenied3
ostWriteProtect4
ostUnsupported5
ostInvalidParameter6
ostEOF7

on_close_server_forwarding Event

This event is fired when a client has closed a previously opened forwarding channel.

Syntax

class SFTPServerCloseServerForwardingEventParams(object):
  @property
  def connection_id() -> int: ...

  @property
  def local_host() -> str: ...

  @property
  def local_port() -> int: ...

  @property
  def src_host() -> str: ...

  @property
  def src_port() -> int: ...

# In class SFTPServer:
@property
def on_close_server_forwarding() -> Callable[[SFTPServerCloseServerForwardingEventParams], None]: ...
@on_close_server_forwarding.setter
def on_close_server_forwarding(event_hook: Callable[[SFTPServerCloseServerForwardingEventParams], None]) -> None: ...

Remarks

The ConnectionID parameter specifies in which session the request was received.

on_close_shell Event

This event is fired when a client has closed a previously opened shell channel.

Syntax

class SFTPServerCloseShellEventParams(object):
  @property
  def connection_id() -> int: ...

# In class SFTPServer:
@property
def on_close_shell() -> Callable[[SFTPServerCloseShellEventParams], None]: ...
@on_close_shell.setter
def on_close_shell(event_hook: Callable[[SFTPServerCloseShellEventParams], None]) -> None: ...

Remarks

The ConnectionID parameter specifies in which session the request was received.

on_connect Event

This event is fired when a remote connection has been established.

Syntax

class SFTPServerConnectEventParams(object):
  @property
  def connection_id() -> int: ...

  @property
  def remote_address() -> str: ...

  @property
  def remote_port() -> int: ...

# In class SFTPServer:
@property
def on_connect() -> Callable[[SFTPServerConnectEventParams], None]: ...
@on_connect.setter
def on_connect(event_hook: Callable[[SFTPServerConnectEventParams], None]) -> None: ...

Remarks

ConnectionID contains a session identifier, and RemoteAddress specifies the client's IP address.

on_create_directory Event

This event instructs the application to create a directory.

Syntax

class SFTPServerCreateDirectoryEventParams(object):
  @property
  def connection_id() -> int: ...

  @property
  def path() -> str: ...

  @property
  def operation_status() -> int: ...
  @operation_status.setter
  def operation_status(value) -> None: ...

# In class SFTPServer:
@property
def on_create_directory() -> Callable[[SFTPServerCreateDirectoryEventParams], None]: ...
@on_create_directory.setter
def on_create_directory(event_hook: Callable[[SFTPServerCreateDirectoryEventParams], None]) -> None: ...

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:

ostOk1
ostNoSuchFile2
ostAccessDenied3
ostWriteProtect4
ostUnsupported5
ostInvalidParameter6
ostEOF7

on_disconnect Event

This event is fired when a client has disconnected.

Syntax

class SFTPServerDisconnectEventParams(object):
  @property
  def connection_id() -> int: ...

# In class SFTPServer:
@property
def on_disconnect() -> Callable[[SFTPServerDisconnectEventParams], None]: ...
@on_disconnect.setter
def on_disconnect(event_hook: Callable[[SFTPServerDisconnectEventParams], None]) -> None: ...

Remarks

This event reports loss of connection to the client within the session specified by ConnectionID.

on_error Event

Information about errors during data delivery.

Syntax

class SFTPServerErrorEventParams(object):
  @property
  def connection_id() -> int: ...

  @property
  def error_code() -> int: ...

  @property
  def fatal() -> bool: ...

  @property
  def remote() -> bool: ...

  @property
  def description() -> str: ...

# In class SFTPServer:
@property
def on_error() -> Callable[[SFTPServerErrorEventParams], None]: ...
@on_error.setter
def on_error(event_hook: Callable[[SFTPServerErrorEventParams], None]) -> None: ...

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.

on_external_sign Event

Handles remote or external signing initiated by the server protocol.

Syntax

class SFTPServerExternalSignEventParams(object):
  @property
  def connection_id() -> int: ...

  @property
  def operation_id() -> str: ...

  @property
  def hash_algorithm() -> str: ...

  @property
  def pars() -> str: ...

  @property
  def data() -> str: ...

  @property
  def signed_data() -> str: ...
  @signed_data.setter
  def signed_data(value) -> None: ...

# In class SFTPServer:
@property
def on_external_sign() -> Callable[[SFTPServerExternalSignEventParams], None]: ...
@on_external_sign.setter
def on_external_sign(event_hook: Callable[[SFTPServerExternalSignEventParams], None]) -> None: ...

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(); };

on_find_close Event

This event signifies the completion of a custom file listing operation.

Syntax

class SFTPServerFindCloseEventParams(object):
  @property
  def connection_id() -> int: ...

  @property
  def handle() -> str: ...

  @property
  def operation_status() -> int: ...
  @operation_status.setter
  def operation_status(value) -> None: ...

# In class SFTPServer:
@property
def on_find_close() -> Callable[[SFTPServerFindCloseEventParams], None]: ...
@on_find_close.setter
def on_find_close(event_hook: Callable[[SFTPServerFindCloseEventParams], None]) -> None: ...

Remarks

on_find_close notifies your code about the completion of a custom file listing request. Use it in conjunction with on_find_first and on_find_next to handle file listing requests manually.

See on_find_first 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:

ostOk1
ostNoSuchFile2
ostAccessDenied3
ostWriteProtect4
ostUnsupported5
ostInvalidParameter6
ostEOF7

on_find_first Event

This event signifies the start of the custom file listing retrieval mechanism.

Syntax

class SFTPServerFindFirstEventParams(object):
  @property
  def connection_id() -> int: ...

  @property
  def path() -> str: ...

  @property
  def operation_status() -> int: ...
  @operation_status.setter
  def operation_status(value) -> None: ...

  @property
  def handle() -> str: ...
  @handle.setter
  def handle(value) -> None: ...

# In class SFTPServer:
@property
def on_find_first() -> Callable[[SFTPServerFindFirstEventParams], None]: ...
@on_find_first.setter
def on_find_first(event_hook: Callable[[SFTPServerFindFirstEventParams], None]) -> None: ...

Remarks

on_find_first, on_find_next, and on_find_close events represent a mechanism for providing customized file listings to class. They are only fired if Action parameter of the preceding on_before_find 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. on_find_first fires once to request the first list entry; on_find_next 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 on_find_next infinitely waiting for the EOF marker.

The handlers for both on_find_first and on_find_next 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 client_file_entry with the details of the next entry,
  • commit the entry to the server using set_client_file_entry method.
When all the entries from the requested directory have been passed to the server component, set OperationStatus to ostEOF. The server will then fire on_find_close event to notify your code that the file listing is completed.

Use the by-ref Handle parameter to assign a handle (a unique identifier) to the file listing procedure inside the on_find_first event handler. This identifier will then be passed to all subsequent on_find_next and on_find_close 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:

ostOk1
ostNoSuchFile2
ostAccessDenied3
ostWriteProtect4
ostUnsupported5
ostInvalidParameter6
ostEOF7

on_find_next Event

This event retrieves the next entry of a custom file listing.

Syntax

class SFTPServerFindNextEventParams(object):
  @property
  def connection_id() -> int: ...

  @property
  def handle() -> str: ...

  @property
  def operation_status() -> int: ...
  @operation_status.setter
  def operation_status(value) -> None: ...

# In class SFTPServer:
@property
def on_find_next() -> Callable[[SFTPServerFindNextEventParams], None]: ...
@on_find_next.setter
def on_find_next(event_hook: Callable[[SFTPServerFindNextEventParams], None]) -> None: ...

Remarks

This event is fired repeatedly after on_find_first to retrieve the directory contents entry-by-entry. Please see the on_find_first 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:

ostOk1
ostNoSuchFile2
ostAccessDenied3
ostWriteProtect4
ostUnsupported5
ostInvalidParameter6
ostEOF7

on_listening_started Event

Fires when the server has started accepting connections on a local port.

Syntax

class SFTPServerListeningStartedEventParams(object):
  @property
  def host() -> str: ...

  @property
  def port() -> int: ...

# In class SFTPServer:
@property
def on_listening_started() -> Callable[[SFTPServerListeningStartedEventParams], None]: ...
@on_listening_started.setter
def on_listening_started(event_hook: Callable[[SFTPServerListeningStartedEventParams], None]) -> None: ...

Remarks

This event is fired when the server is ready to accept incoming SSH/SFTP connections.

on_listening_stopped Event

Fires when the server has stopped accepting connections on a local port.

Syntax

class SFTPServerListeningStoppedEventParams(object):
  @property
  def host() -> str: ...

  @property
  def port() -> int: ...

# In class SFTPServer:
@property
def on_listening_stopped() -> Callable[[SFTPServerListeningStoppedEventParams], None]: ...
@on_listening_stopped.setter
def on_listening_stopped(event_hook: Callable[[SFTPServerListeningStoppedEventParams], None]) -> None: ...

Remarks

This event is fired when the server has closed the listening socket and can no longer accept incoming SSH/SFTP connections.

on_notification Event

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

Syntax

class SFTPServerNotificationEventParams(object):
  @property
  def event_id() -> str: ...

  @property
  def event_param() -> str: ...

# In class SFTPServer:
@property
def on_notification() -> Callable[[SFTPServerNotificationEventParams], None]: ...
@on_notification.setter
def on_notification(event_hook: Callable[[SFTPServerNotificationEventParams], None]) -> None: ...

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:

FileOpenNotifies 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.

FileReadNotifies 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.

FileWriteNotifies 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.

FileCloseNotifies 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.

OpenShellNotifies your code about an opened shell tunnel. The EventParam has the following format: ConnectionID=9;LocalChannel=1;RemoteChannel=2
OpenCommandNotifies your code about an opened command tunnel. The EventParam value has the following format:

ConnectionID=8;LocalChannel=3;RemoteChannel=3;Command=ls -l

CloseShellIndicates the closure of a shell tunnel. The EventParam format is the same as with the OpenShell event ID.
CloseCommandIndicates the closure of a command tunnel. The EventParam format is the same as with the OpenCommand event ID.
BannerNotifies the application that the banner has been prepared and is about to be sent to the other side. The application can adjust the content of the banner by using Banner[ConnID] and Lang[ConnID] configuration settings.
ListeningStartedNotifies the application that the server has started listening for incoming connections.
ListeningStoppedNotifies the application that the server has stopped listening to incoming connections.

on_open_client_forwarding Event

This event is fired when a client opens a client-side (local) forwarding channel.

Syntax

class SFTPServerOpenClientForwardingEventParams(object):
  @property
  def connection_id() -> int: ...

  @property
  def dest_host() -> str: ...

  @property
  def dest_port() -> int: ...

  @property
  def src_host() -> str: ...

  @property
  def src_port() -> int: ...

# In class SFTPServer:
@property
def on_open_client_forwarding() -> Callable[[SFTPServerOpenClientForwardingEventParams], None]: ...
@on_open_client_forwarding.setter
def on_open_client_forwarding(event_hook: Callable[[SFTPServerOpenClientForwardingEventParams], None]) -> None: ...

Remarks

This event notifies the application that a client-side forwarding channel has been set up. The ConnectionID parameter specifies in which session the request was received.

The DestHost and DestPort parameters specify the address that the data received from the client will be forwarded to. The SrcHost and SrcPort specify the connection origin that is reported by the client. Note that the details of the origin cannot be verified.

on_open_command Event

This event is fired when a client has opened an SSH command channel.

Syntax

class SFTPServerOpenCommandEventParams(object):
  @property
  def connection_id() -> int: ...

  @property
  def command() -> str: ...

# In class SFTPServer:
@property
def on_open_command() -> Callable[[SFTPServerOpenCommandEventParams], None]: ...
@on_open_command.setter
def on_open_command(event_hook: Callable[[SFTPServerOpenCommandEventParams], None]) -> None: ...

Remarks

The ConnectionID parameter specifies in which session the request was received.

The component fires on_close_command when the command channel is closed.

on_open_file Event

This event instructs the application to handle the file open request.

Syntax

class SFTPServerOpenFileEventParams(object):
  @property
  def connection_id() -> int: ...

  @property
  def path() -> str: ...

  @property
  def modes() -> int: ...

  @property
  def access() -> int: ...

  @property
  def operation_status() -> int: ...
  @operation_status.setter
  def operation_status(value) -> None: ...

  @property
  def handle() -> str: ...
  @handle.setter
  def handle(value) -> None: ...

# In class SFTPServer:
@property
def on_open_file() -> Callable[[SFTPServerOpenFileEventParams], None]: ...
@on_open_file.setter
def on_open_file(event_hook: Callable[[SFTPServerOpenFileEventParams], None]) -> None: ...

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:

cfmRead1
cfmWrite2
cfmAppend4
cfmCreate8
cfmTruncate16
cfmExcl32
cfmText64
cfmOpenOrCreate128
cfmAppendAtomic256
cfmNoFollow512
cfmDeleteOnClose1024

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:

cfaReadLock1
cfaWriteLock2
cfaDeleteLock4
cfaBlockAdvisory8
These parameter may also contain a combination of the above flags. Access modifiers are only supported in SFTPv6, and in practice are rarely used by client applications.

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:

ostOk1
ostNoSuchFile2
ostAccessDenied3
ostWriteProtect4
ostUnsupported5
ostInvalidParameter6
ostEOF7

on_open_server_forwarding Event

This event is fired when the server opens a server-side (remote) forwarding channel.

Syntax

class SFTPServerOpenServerForwardingEventParams(object):
  @property
  def connection_id() -> int: ...

  @property
  def local_host() -> str: ...

  @property
  def local_port() -> int: ...

  @property
  def src_host() -> str: ...

  @property
  def src_port() -> int: ...

# In class SFTPServer:
@property
def on_open_server_forwarding() -> Callable[[SFTPServerOpenServerForwardingEventParams], None]: ...
@on_open_server_forwarding.setter
def on_open_server_forwarding(event_hook: Callable[[SFTPServerOpenServerForwardingEventParams], None]) -> None: ...

Remarks

This event notifies the application that a server-side forwarding channel has been set up. The ConnectionID parameter specifies in which session the request was received.

The DestHost and DestPort parameters specify the address that the data received from the connection accepted by the server will be forwarded to, according to the client. The SrcHost and SrcPort specify the connection origin.

on_open_shell Event

This event is fired when a client has opened a shell channel.

Syntax

class SFTPServerOpenShellEventParams(object):
  @property
  def connection_id() -> int: ...

# In class SFTPServer:
@property
def on_open_shell() -> Callable[[SFTPServerOpenShellEventParams], None]: ...
@on_open_shell.setter
def on_open_shell(event_hook: Callable[[SFTPServerOpenShellEventParams], None]) -> None: ...

Remarks

The ConnectionID parameter specifies in which session the request was received.

The component fires on_close_shell when the shell channel is closed.

on_read_file Event

This event is fired when a file read request is received.

Syntax

class SFTPServerReadFileEventParams(object):
  @property
  def connection_id() -> int: ...

  @property
  def handle() -> str: ...

  @property
  def offset() -> int: ...

  @property
  def size() -> int: ...

  @property
  def operation_status() -> int: ...
  @operation_status.setter
  def operation_status(value) -> None: ...

# In class SFTPServer:
@property
def on_read_file() -> Callable[[SFTPServerReadFileEventParams], None]: ...
@on_read_file.setter
def on_read_file(event_hook: Callable[[SFTPServerReadFileEventParams], None]) -> None: ...

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 set_client_buffer method.

Set OperationStatus to one of the below values according to the outcome of the request processing:

ostOk1
ostNoSuchFile2
ostAccessDenied3
ostWriteProtect4
ostUnsupported5
ostInvalidParameter6
ostEOF7

on_remove Event

This event is fired when a client requests to delete a file or directory.

Syntax

class SFTPServerRemoveEventParams(object):
  @property
  def connection_id() -> int: ...

  @property
  def path() -> str: ...

  @property
  def operation_status() -> int: ...
  @operation_status.setter
  def operation_status(value) -> None: ...

# In class SFTPServer:
@property
def on_remove() -> Callable[[SFTPServerRemoveEventParams], None]: ...
@on_remove.setter
def on_remove(event_hook: Callable[[SFTPServerRemoveEventParams], None]) -> None: ...

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:

ostOk1
ostNoSuchFile2
ostAccessDenied3
ostWriteProtect4
ostUnsupported5
ostInvalidParameter6
ostEOF7

on_rename_file Event

This event is fired when a client requests to rename a file.

Syntax

class SFTPServerRenameFileEventParams(object):
  @property
  def connection_id() -> int: ...

  @property
  def old_path() -> str: ...

  @property
  def new_path() -> str: ...

  @property
  def operation_status() -> int: ...
  @operation_status.setter
  def operation_status(value) -> None: ...

# In class SFTPServer:
@property
def on_rename_file() -> Callable[[SFTPServerRenameFileEventParams], None]: ...
@on_rename_file.setter
def on_rename_file(event_hook: Callable[[SFTPServerRenameFileEventParams], None]) -> None: ...

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:

ostOk1
ostNoSuchFile2
ostAccessDenied3
ostWriteProtect4
ostUnsupported5
ostInvalidParameter6
ostEOF7

on_request_attributes Event

This event is fired when a get file attributes request is received.

Syntax

class SFTPServerRequestAttributesEventParams(object):
  @property
  def connection_id() -> int: ...

  @property
  def path() -> str: ...

  @property
  def handle() -> str: ...

  @property
  def operation_status() -> int: ...
  @operation_status.setter
  def operation_status(value) -> None: ...

# In class SFTPServer:
@property
def on_request_attributes() -> Callable[[SFTPServerRequestAttributesEventParams], None]: ...
@on_request_attributes.setter
def on_request_attributes(event_hook: Callable[[SFTPServerRequestAttributesEventParams], None]) -> None: ...

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:

ostOk1
ostNoSuchFile2
ostAccessDenied3
ostWriteProtect4
ostUnsupported5
ostInvalidParameter6
ostEOF7

on_server_forwarding_cancel Event

This event is fired when the client cancels a previously negotiated server-side (remote) forwarding.

Syntax

class SFTPServerServerForwardingCancelEventParams(object):
  @property
  def connection_id() -> int: ...

  @property
  def local_host() -> str: ...

  @property
  def local_port() -> int: ...

# In class SFTPServer:
@property
def on_server_forwarding_cancel() -> Callable[[SFTPServerServerForwardingCancelEventParams], None]: ...
@on_server_forwarding_cancel.setter
def on_server_forwarding_cancel(event_hook: Callable[[SFTPServerServerForwardingCancelEventParams], None]) -> None: ...

Remarks

The ConnectionID parameter specifies in which session the request was received. The LocalHost:LocalPort specify the endpoint that the server is listening on.

After receiving the cancellation request the server will no longer listen to connections at the mentioned endpoint.

Choose Action as one of the following values:

fraAuto1Handle the requested action automatically by the server

fraCustom2Override the action using the user code logic

fraAbort3Abort the requested action

on_server_forwarding_open_failed Event

This event is fired when the client rejects the server request to establish a server forwarding channel.

Syntax

class SFTPServerServerForwardingOpenFailedEventParams(object):
  @property
  def connection_id() -> int: ...

  @property
  def local_host() -> str: ...

  @property
  def local_port() -> int: ...

  @property
  def src_host() -> str: ...

  @property
  def src_port() -> int: ...

# In class SFTPServer:
@property
def on_server_forwarding_open_failed() -> Callable[[SFTPServerServerForwardingOpenFailedEventParams], None]: ...
@on_server_forwarding_open_failed.setter
def on_server_forwarding_open_failed(event_hook: Callable[[SFTPServerServerForwardingOpenFailedEventParams], None]) -> None: ...

Remarks

This event can follow the on_before_open_server_forwarding and on_open_server_forwarding if the client rejects the server request to forward an accepted TCP connection.

The ConnectionID parameter specifies in which session the request was received. The LocalHost:LocalPort specify the endpoint that the server has received the connection on.

on_server_forwarding_request Event

This event is fired when the client requests the server to set up server-side (remote) forwarding.

Syntax

class SFTPServerServerForwardingRequestEventParams(object):
  @property
  def connection_id() -> int: ...

  @property
  def local_host() -> str: ...

  @property
  def local_port() -> int: ...
  @local_port.setter
  def local_port(value) -> None: ...

  @property
  def action() -> int: ...
  @action.setter
  def action(value) -> None: ...

# In class SFTPServer:
@property
def on_server_forwarding_request() -> Callable[[SFTPServerServerForwardingRequestEventParams], None]: ...
@on_server_forwarding_request.setter
def on_server_forwarding_request(event_hook: Callable[[SFTPServerServerForwardingRequestEventParams], None]) -> None: ...

Remarks

The ConnectionID parameter specifies in which session the request was received. The LocalHost:LocalPort specify the endpoint that the client expects the server to listen on. The server may choose to use a different port, in which case please adjust the LocalPort in the event handler.

If permitted, the server will open the requested port and start listening to incoming connections. All such connections will be reported via on_before_open_server_forwarding and on_open_server_forwarding events.

You can enable or disable server forwarding blanketly via the capabilities property.

Choose Action as one of the following values:

fraAuto1Handle the requested action automatically by the server

fraCustom2Override the action using the user code logic

fraAbort3Abort the requested action

on_session_closed Event

Reports session closure.

Syntax

class SFTPServerSessionClosedEventParams(object):
  @property
  def connection_id() -> int: ...

# In class SFTPServer:
@property
def on_session_closed() -> Callable[[SFTPServerSessionClosedEventParams], None]: ...
@on_session_closed.setter
def on_session_closed(event_hook: Callable[[SFTPServerSessionClosedEventParams], None]) -> None: ...

Remarks

This event is fired when a connection identified by ConnectionID has been gracefully closed.

on_session_established Event

This event is fired when a new session is established.

Syntax

class SFTPServerSessionEstablishedEventParams(object):
  @property
  def connection_id() -> int: ...

# In class SFTPServer:
@property
def on_session_established() -> Callable[[SFTPServerSessionEstablishedEventParams], None]: ...
@on_session_established.setter
def on_session_established(event_hook: Callable[[SFTPServerSessionEstablishedEventParams], None]) -> None: ...

Remarks

This event is fired when a new connection identified by ConnectionID has been established with a client.

on_set_attributes Event

This event is fired when an set file attributes request is received.

Syntax

class SFTPServerSetAttributesEventParams(object):
  @property
  def connection_id() -> int: ...

  @property
  def path() -> str: ...

  @property
  def handle() -> str: ...

  @property
  def operation_status() -> int: ...
  @operation_status.setter
  def operation_status(value) -> None: ...

# In class SFTPServer:
@property
def on_set_attributes() -> Callable[[SFTPServerSetAttributesEventParams], None]: ...
@on_set_attributes.setter
def on_set_attributes(event_hook: Callable[[SFTPServerSetAttributesEventParams], None]) -> None: ...

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:

ostOk1
ostNoSuchFile2
ostAccessDenied3
ostWriteProtect4
ostUnsupported5
ostInvalidParameter6
ostEOF7

on_translate_path Event

This event is fired when a client requests the server to translate a path to its absolute form.

Syntax

class SFTPServerTranslatePathEventParams(object):
  @property
  def connection_id() -> int: ...

  @property
  def path() -> str: ...

  @property
  def absolute_path() -> str: ...
  @absolute_path.setter
  def absolute_path(value) -> None: ...

  @property
  def action() -> int: ...
  @action.setter
  def action(value) -> None: ...

# In class SFTPServer:
@property
def on_translate_path() -> Callable[[SFTPServerTranslatePathEventParams], None]: ...
@on_translate_path.setter
def on_translate_path(event_hook: Callable[[SFTPServerTranslatePathEventParams], None]) -> None: ...

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:

fraAuto1Handle the requested action automatically by the server

fraCustom2Override the action using the user code logic

fraAbort3Abort the requested action

on_write_file Event

This event is fired when a file write request is received.

Syntax

class SFTPServerWriteFileEventParams(object):
  @property
  def connection_id() -> int: ...

  @property
  def handle() -> str: ...

  @property
  def offset() -> int: ...

  @property
  def operation_status() -> int: ...
  @operation_status.setter
  def operation_status(value) -> None: ...

# In class SFTPServer:
@property
def on_write_file() -> Callable[[SFTPServerWriteFileEventParams], None]: ...
@on_write_file.setter
def on_write_file(event_hook: Callable[[SFTPServerWriteFileEventParams], None]) -> None: ...

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 get_client_buffer 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:

ostOk1
ostNoSuchFile2
ostAccessDenied3
ostWriteProtect4
ostUnsupported5
ostInvalidParameter6
ostEOF7

SFTPServer Config Settings

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

AllAlgorithms:   Returns the list of algorithms enabled in the component.

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

AuthMode:   Controls dual/multi-type authentication mode.

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").

AutoGenerateLongNames:   TBD.

TBD

Banner[i]:   TBD.

TBD

BannerSendStage:   TBD.

TBD

CommandModeEnabled:   TBD.

TBD

CompressionAlgorithms:   Returns the list of compression algorithms enabled in the component.

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

CustomDHGroupIndex:   Sets a specific Diffie-Hellman group index to enforce.

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.

DefBanner:   TBD.

TBD

DefLanguageTag:   TBD.

TBD

DualStack:   Allows the use of ip4 and ip6 simultaneously.

This setting specifies a socket can use ip4 and ip6 simultaneously.

EncryptionAlgorithms:   Returns the list of encryption algorithms enabled in the component.

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

KexAlgorithms:   Returns the list of key exchange algorithms enabled in the component.

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

LanguageTag[i]:   TBD.

TBD

MacAlgorithms:   Returns the list of MAC algorithms enabled in the component.

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

MaxDHGroupSize:   Sets the maximal Diffie-Hellman group size.

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.

MinDHGroupSize:   Sets the minimal Diffie-Hellman group size.

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.

NotifyOnFileOperations:   Enables low-level file operation notifications.

If set, the component will report low-level file operations, such as Open, Read, Write, and Close, via its Notification event.

PublicKeyAlgorithms:   Returns the list of public key algorithms enabled in the component.

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

RefreshUsers:   Enables or disables real-time propagation of user information.

Set this property to true to make the content of the Users property propagate to the server immediately. The default setting is false, which delays the effect of any changes in the Users setting until the server is restarted.

SFTPModeEnabled:   TBD.

TBD

ShellModeEnabled:   TBD.

TBD

UseStrictKeyExchange:   Specifies how strict key exchange is supported.

This setting controls whether strict key exchange (strict kex) is enabled to mitigate the Terrapin attack. When enabled, the 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:

0Disabled. 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.
2Enabled, 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.
3Required. If the remote host does not support strict key exchange the connection will fail.

Base Config Settings

ASN1UseGlobalTagCache:   Controls whether ASN.1 module should use a global object cache.

This is a performance setting. It is unlikely that you will ever need to adjust it.

AssignSystemSmartCardPins:   Specifies whether CSP-level PINs should be assigned to CNG keys.

This is a low-level tweak for certain cryptographic providers. It is unlikely that you will ever need to adjust it.

CheckKeyIntegrityBeforeUse:   Enables or disable private key integrity check before use.

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

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

CookieCaching:   Specifies whether a cookie cache should be used for HTTP(S) transports.

Set this property to enable or disable cookies caching for the class.

Supported values are:

offNo caching (default)
localLocal caching
globalGlobal caching

Cookies:   Gets or sets local cookies for the class.

Use this property to get cookies from the internal cookie storage of the class and/or restore them back between application sessions.

DefDeriveKeyIterations:   Specifies the default key derivation algorithm iteration count.

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

DNSLocalSuffix:   The suffix to assign for TLD names.

Use this global setting to adjust the default suffix to assign to top-level domain names. The default is .local.

EnableClientSideSSLFFDHE:   Enables or disables finite field DHE key exchange support in TLS clients.

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

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

GlobalCookies:   Gets or sets global cookies for all the HTTP transports.

Use this property to get cookies from the GLOBAL cookie storage or restore them back between application sessions. These cookies will be used by all the classes that have its CookieCaching property set to "global".

HardwareCryptoUsePolicy:   The hardware crypto usage policy.

This global setting controls the hardware cryptography usage policy: auto, enable, or disable.

HttpUserAgent:   Specifies the user agent name to be used by all HTTP clients.

This global setting defines the User-Agent field of the HTTP request provides information about the software that initiates the request. This value will be used by all the HTTP clients including the ones used internally in other classes.

HttpVersion:   The HTTP version to use in any inner HTTP client components created.

Set this property to 1.0 or 1.1 to indicate the HTTP version that any internal HTTP clients should use.

IgnoreExpiredMSCTLSigningCert:   Whether to tolerate the expired Windows Update signing certificate.

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

ListDelimiter:   The delimiter character for multi-element lists.

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

LogDestination:   Specifies the debug log destination.

Contains a comma-separated list of values that specifies where debug log should be dumped.

Supported values are:

fileFile
consoleConsole
systemlogSystem Log (supported for Android only)
debuggerDebugger (supported for VCL for Windows and .Net)

LogDetails:   Specifies the debug log details to dump.

Contains a comma-separated list of values that specifies which debug log details to dump.

Supported values are:

timeCurrent time
levelLevel
packagePackage name
moduleModule name
classClass name
methodMethod name
threadidThread Id
contenttypeContent type
contentContent
allAll details

LogFile:   Specifies the debug log filename.

Use this property to provide a path to the log file.

LogFilters:   Specifies the debug log filters.

Contains a comma-separated list of value pairs ("name:value") that describe filters.

Supported filter names are:

exclude-packageExclude a package specified in the value
exclude-moduleExclude a module specified in the value
exclude-classExclude a class specified in the value
exclude-methodExclude a method specified in the value
include-packageInclude a package specified in the value
include-moduleInclude a module specified in the value
include-classInclude a class specified in the value
include-methodInclude a method specified in the value

LogFlushMode:   Specifies the log flush mode.

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

noneNo flush (caching only)
immediateImmediate flush (real-time logging)
maxcountFlush cached entries upon reaching LogMaxEventCount entries in the cache.

LogLevel:   Specifies the debug log level.

Use this property to provide the desired debug log level.

Supported values are:

noneNone (by default)
fatalSevere errors that cause premature termination.
errorOther runtime errors or unexpected conditions.
warningUse of deprecated APIs, poor use of API, 'almost' errors, other runtime situations that are undesirable or unexpected, but not necessarily "wrong".
infoInteresting runtime events (startup/shutdown).
debugDetailed information on flow of through the system.
traceMore detailed information.

LogMaxEventCount:   Specifies the maximum number of events to cache before further action is taken.

Use this property to specify the log event number threshold. This threshold may have different effects, depending on the rotation setting and/or the flush mode.

The default value of this setting is 100.

LogRotationMode:   Specifies the log rotation mode.

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

noneNo rotation
deleteolderDelete older entries from the cache upon reaching LogMaxEventCount
keepolderKeep older entries in the cache upon reaching LogMaxEventCount (newer entries are discarded)

MaxASN1BufferLength:   Specifies the maximal allowed length for ASN.1 primitive tag data.

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

MaxASN1TreeDepth:   Specifies the maximal depth for processed ASN.1 trees.

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

OCSPHashAlgorithm:   Specifies the hash algorithm to be used to identify certificates in OCSP requests.

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

OldClientSideRSAFallback:   Specifies whether the SSH client should use a SHA1 fallback.

Tells the SSH client to use a legacy ssh-rsa authentication even if the server indicates support for newer algorithms, such as rsa-sha-256. This is a backward-compatibility tweak.

PKICache:   Specifies which PKI elements (certificates, CRLs, OCSP responses) should be cached.

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

Supported Values:

certificateEnables caching of certificates.
crlEnables caching of Certificate Revocation Lists (CRLs).
ocspEnables caching of OCSP (Online Certificate Status Protocol) responses.

Example (default value): PKICache=certificate,crl,ocsp In this example, the component caches certificates, CRLs, and OCSP responses.

PKICachePath:   Specifies the file system path where cached PKI data is stored.

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

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

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

ProductVersion:   Returns the version of the SecureBlackbox library.

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

ServerSSLDHKeyLength:   Sets the size of the TLS DHE key exchange group.

Use this property to adjust the length, in bits, of the DHE prime to be used by the TLS server.

StaticDNS:   Specifies whether static DNS rules should be used.

Set this property to enable or disable static DNS rules for the class. Works only if UseOwnDNSResolver is set to true.

Supported values are:

noneNo static DNS rules (default)
localLocal static DNS rules
globalGlobal static DNS rules

StaticIPAddress[domain]:   Gets or sets an IP address for the specified domain name.

Use this property to get or set an IP address for the specified domain name in the internal (of the 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.

StaticIPAddresses:   Gets or sets all the static DNS rules.

Use this property to get static DNS rules from the current rules storage or restore them back between application sessions. If StaticDNS of the 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.

Tag:   Allows to store any custom data.

Use this config property to store any custom data.

TLSSessionGroup:   Specifies the group name of TLS sessions to be used for session resumption.

Use this property to limit the search of 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.

TLSSessionLifetime:   Specifies lifetime in seconds of the cached TLS session.

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

TLSSessionPurgeInterval:   Specifies how often the session cache should remove the expired TLS sessions.

Use this property to specify the time interval of purging the expired TLS sessions from the session cache. Default value is 60 seconds (1 minute).

UseCRLObjectCaching:   Specifies whether reuse of loaded CRL objects is enabled.

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

UseInternalRandom:   Switches between SecureBlackbox-own and platform PRNGs.

Allows to switch between internal/native PRNG implementation and the one provided by the platform.

UseLegacyAdESValidation:   Enables legacy AdES validation mode.

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

UseOCSPResponseObjectCaching:   Specifies whether reuse of loaded OCSP response objects is enabled.

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

UseOwnDNSResolver:   Specifies whether the client components should use own DNS resolver.

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

UseSharedSystemStorages:   Specifies whether the validation engine should use a global per-process copy of the system certificate stores.

Set this global property to false to make each validation run use its own copy of system certificate stores.

UseSystemNativeSizeCalculation:   An internal CryptoAPI access tweak.

This is an internal setting. Please do not use it unless instructed by the support team.

UseSystemOAEPAndPSS:   Enforces or disables the use of system-driven RSA OAEP and PSS computations.

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

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

UseSystemRandom:   Enables or disables the use of the OS PRNG.

Use this global property to enable or disable the use of operating system-driven pseudorandom number generation.

XMLRDNDescriptorName[OID]:   Defines an OID mapping to descriptor names for the certificate's IssuerRDN or SubjectRDN.

This property defines custom mappings between Object Identifiers (OIDs) and descriptor names. This mapping specifies how the certificate's issuer and subject information (ds:IssuerRDN and ds:SubjectRDN elements respectively) are represented in XML signatures.

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

Syntax: Config("XMLRDNDescriptorName[OID]=PrimaryName,Alias1,Alias2");

Where:

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

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

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

Usage Examples:

Map OID 2.5.4.5 to SERIALNUMBER: Config("XMLRDNDescriptorName[2.5.4.5]=SERIALNUMBER");

Map OID 1.2.840.113549.1.9.1 to E, with aliases EMAIL and EMAILADDRESS: Config("XMLRDNDescriptorName[1.2.840.113549.1.9.1]=E,EMAIL,EMAILADDRESS");

XMLRDNDescriptorPriority[OID]:   Specifies the priority of descriptor names associated with a specific OID.

This property specifies the priority of descriptor names associated with a specific OID that allows to reorder descriptors in the ds:IssuerRDN and ds:SubjectRDN elements during signing.

XMLRDNDescriptorReverseOrder:   Specifies whether to reverse the order of descriptors in RDN.

Specifies whether to reverse the order of descriptors in the ds:IssuerRDN and ds:SubjectRDN elements during XML signing. By default, this property is set to true (as specified in RFC 2253, 2.1).

XMLRDNDescriptorSeparator:   Specifies the separator used between descriptors in RDN.

Specifies the separator used between descriptors in the ds:IssuerRDN and ds:SubjectRDN elements during XML signing. By default, this property is set to ", " value.

SFTPServer Errors

SFTPServer Errors

1048577   Invalid parameter (SB_ERROR_INVALID_PARAMETER)
1048578   Invalid configuration (SB_ERROR_INVALID_SETUP)
1048579   Invalid state (SB_ERROR_INVALID_STATE)
1048580   Invalid value (SB_ERROR_INVALID_VALUE)
1048581   Private key not found (SB_ERROR_NO_PRIVATE_KEY)
1048582   Cancelled by the user (SB_ERROR_CANCELLED_BY_USER)
1048583   The file was not found (SB_ERROR_NO_SUCH_FILE)
1048584   Unsupported feature or operation (SB_ERROR_UNSUPPORTED_FEATURE)
1048585   General error (SB_ERROR_GENERAL_ERROR)
31457281   Unsupported file operation (SB_ERROR_SFTP_UNSUPPORTED_FILE_OPERATION)
31457282   Invalid authentication type (SB_ERROR_SFTP_INVALID_AUTH_TYPE)