SecureBlackbox 2020 Python Edition

Questions / Feedback?

FTPServer Class

Properties   Methods   Events   Configuration Settings   Errors  

The FTPServer class provides server-side functionality for FTP and FTPS protocols.


class secureblackbox.FTPServer


FTPServer supports FTP (File Transfer Protocol) and FTPS (FTP-over-SSL) protocols. The FTPS protocol allows you to securely perform file transfer operations on the server over Transport Layer Security (TLS). TLS is a successor to the now deprecated SSL protocol, although the latter abbreviation is still widely used.

Property List

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

activeWhether the server is active and can accept incoming connections.
allow_anonymousAllows and disallows anonymous connections.
client_file_entry_entry_formatThe file listing format: cfefUnknown 0 cfefUnix 1 cfefWindows 2 cfefMLSD 3 .
client_file_entry_file_dateFile last modification date.
client_file_entry_file_typeThe type of the entry: cfetUnknown 0 cfetDirectory 1 cfetFile 2 cfetSymlink 3 cfetSpecial 4 cfetCurrentDirectory 5 cfetParentDirectory 6 .
client_file_entry_handleAllows to get or set a 'handle', a unique identifier of the underlying property object.
client_file_entry_nameThe file or directory name.
client_file_entry_pathThe full path to the file or directory.
client_file_entry_raw_dataThe unparsed entry as returned by the server.
client_file_entry_sizeFile size in bytes.
data_hostHost address for incoming data channel connections.
data_port_range_fromSpecifies the lower port range bound for passive mode data connections.
data_port_range_toSpecifies the upper port range bound for passive mode data connections.
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 public key algorithm here if the certificate is not available on the pre-signing stage.
handshake_timeoutSpecifies the handshake timeout in milliseconds.
hostSpecifies the server host.
implicit_sslEnables or disables implicit SSL mode.
passive_mode_hostThe IP address of the passive mode host.
pinned_client_addressThe client's IP address.
pinned_client_chain_validation_detailsThe details of a certificate chain validation outcome.
pinned_client_chain_validation_resultThe outcome of a certificate chain validation routine.
pinned_client_ciphersuiteThe cipher suite employed by this connection.
pinned_client_client_authenticatedSpecifies whether client authentication was performed during this connection.
pinned_client_digest_algorithmThe digest algorithm used in a TLS-enabled connection.
pinned_client_encryption_algorithmThe symmetric encryption algorithm used in a TLS-enabled connection.
pinned_client_idThe client connection's unique identifier.
pinned_client_key_exchange_algorithmThe key exchange algorithm used in a TLS-enabled connection.
pinned_client_key_exchange_key_bitsThe length of the key exchange key of a TLS-enabled connection.
pinned_client_named_ec_curveThe elliptic curve used in this connection.
pinned_client_pfs_cipherIndicates whether the chosen ciphersuite provides perfect forward secrecy (PFS).
pinned_client_portThe remote port of the client connection.
pinned_client_public_key_bitsThe length of the public key.
pinned_client_resumed_sessionIndicates whether a TLS-enabled connection was spawned from another TLS connection.
pinned_client_secure_connectionIndicates whether TLS or SSL is enabled for this connection.
pinned_client_signature_algorithmThe signature algorithm used in a TLS handshake.
pinned_client_symmetric_block_sizeThe block size of the symmetric algorithm used.
pinned_client_symmetric_key_bitsThe key length of the symmetric algorithm used.
pinned_client_total_bytes_receivedThe total number of bytes received over this connection.
pinned_client_total_bytes_sentThe total number of bytes sent over this connection.
pinned_client_validation_logContains the server certificate's chain validation log.
pinned_client_versionIndicates the version of SSL/TLS protocol negotiated during this connection.
pinned_client_cert_countThe number of records in the PinnedClientCert arrays.
pinned_client_cert_bytesReturns raw certificate data in DER format.
pinned_client_cert_ca_key_idA unique identifier (fingerprint) of the CA certificate's private key.
pinned_client_cert_fingerprintContains the fingerprint (a hash imprint) of this certificate.
pinned_client_cert_handleAllows to get or set a 'handle', a unique identifier of the underlying property object.
pinned_client_cert_issuerThe common name of the certificate issuer (CA), typically a company name.
pinned_client_cert_issuer_rdnA collection of information, in the form of [OID, Value] pairs, uniquely identifying the certificate issuer.
pinned_client_cert_key_algorithmSpecifies the public key algorithm of this certificate.
pinned_client_cert_key_bitsReturns the length of the public key.
pinned_client_cert_key_fingerprintReturns a fingerprint of the public key contained in the certificate.
pinned_client_cert_key_usageIndicates the purposes of the key contained in the certificate, in the form of an OR'ed flag set.
pinned_client_cert_public_key_bytesContains the certificate's public key in DER format.
pinned_client_cert_self_signedIndicates whether the certificate is self-signed (root) or signed by an external CA.
pinned_client_cert_serial_numberReturns the certificate's serial number.
pinned_client_cert_sig_algorithmIndicates the algorithm that was used by the CA to sign this certificate.
pinned_client_cert_subjectThe common name of the certificate holder, typically an individual's name, a URL, an e-mail address, or a company name.
pinned_client_cert_subject_key_idContains a unique identifier (fingerprint) of the certificate's private key.
pinned_client_cert_subject_rdnA collection of information, in the form of [OID, Value] pairs, uniquely identifying the certificate holder (subject).
pinned_client_cert_valid_fromThe time point at which the certificate becomes valid, in UTC.
pinned_client_cert_valid_toThe time point at which the certificate expires, in UTC.
portThe port number to listen for incoming connections on.
read_onlyMakes the server's file system read-only for all users.
root_directorySpecifies the server's root directory.
server_cert_countThe number of records in the ServerCert arrays.
server_cert_bytesReturns raw certificate data in DER format.
server_cert_handleAllows to get or set a 'handle', a unique identifier of the underlying property object.
session_timeoutSpecifies the session timeout in milliseconds.
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_i_pv6Enables or disables IP protocol version 6.
tls_auto_validate_certificatesSpecifies whether server-side TLS certificates should be validated automatically using internal validation rules.
tls_base_configurationSelects the base configuration for the TLS settings.
tls_ciphersuitesA list of ciphersuites separated with commas or semicolons.
tlsec_curvesDefines the elliptic curves to enable.
tls_force_resume_if_destination_changesWhether to force TLS session resumption when the destination address changes.
tls_pre_shared_identityDefines the identity used when the PSK (Pre-Shared Key) key-exchange mechanism is negotiated.
tls_pre_shared_keyContains the pre-shared for the PSK (Pre-Shared Key) key-exchange mechanism, encoded with base16.
tls_pre_shared_key_ciphersuiteDefines the ciphersuite used for PSK (Pre-Shared Key) negotiation.
tls_renegotiation_attack_prevention_modeSelects renegotiation attack prevention mechanism.
tls_revocation_checkSpecifies the kind(s) of revocation check to perform.
tlsssl_optionsVarious SSL (TLS) protocol options, set of cssloExpectShutdownMessage 0x001 Wait for the close-notify message when shutting down the connection cssloOpenSSLDTLSWorkaround 0x002 (DEPRECATED) Use a DTLS version workaround when talking to very old OpenSSL versions cssloDisableKexLengthAlignment 0x004 Do not align the client-side PMS by the RSA modulus size.
tlstls_modeSpecifies the TLS mode to use.
tls_use_extended_master_secretEnables Extended Master Secret Extension, as defined in RFC 7627.
tls_use_session_resumptionEnables or disables TLS session resumption capability.
tls_versionsTh SSL/TLS versions to enable by default.
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_certContains 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_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_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_usernameThe registered name (login) of the user.
use_utf8Enables or disables UTF8 file name conversions.

Method List

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

configSets or retrieves a configuration setting.
drop_clientTerminates a client connection.
get_client_bufferObtains a pending connection buffer.
list_clientsEnumerates the connected clients.
pin_clientTakes a snapshot of the connection's properties.
set_client_bufferCommits a data buffer to the connection.
set_client_file_entryCommits a file entry to the connection.
startStarts the server.
stopStops the 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_acceptReports an incoming connection.
on_after_change_directorySignals the completion of a directory change operation.
on_after_create_directorySignals the completion of a directory creation operation.
on_after_remove_directorySignals the completion of a directory removal operation.
on_after_remove_fileSignals the completion of a file removal operation.
on_after_rename_fileSignals the completion of a file renaming operation.
on_after_request_attributesSignals the completion of an attribute request.
on_auth_attemptFires when a connected client makes an authentication attempt.
on_before_change_directoryNotifies about an incoming change directory request.
on_before_create_directoryNotifies about an incoming create directory request.
on_before_download_fileNotifies about an incoming file download request.
on_before_findNotifies about an incoming file listing request.
on_before_remove_directoryNotifies about an incoming directory removal request.
on_before_remove_fileNotifies about an incoming file removal request.
on_before_rename_fileNotifies about an incoming file rename request.
on_before_request_attributesNotifies about an incoming attributes request.
on_before_send_replyNotifies the application of a command reply being sent.
on_before_upload_fileNotifies about an incoming file upload request.
on_certificate_validateFires when a client certificate needs to be validated.
on_change_directoryAn override for a directory change operation.
on_command_processedSignals that a command has been processed by the server.
on_command_receivedSignals that a command has been received from the client.
on_connectReports an accepted connection.
on_create_directoryAn override for a directory creation operation.
on_disconnectFires to report a disconnected client.
on_download_fileAn override for a file download initiation operation.
on_errorInformation about errors during data delivery.
on_external_signHandles remote or external signing initiated by the server protocol.
on_find_closeSignals the completion of a directory listing request.
on_find_initAn override for a directory listing initiation operation.
on_find_nextAn override for a directory listing entry request operation.
on_notificationThis event notifies the application about an underlying control flow event.
on_read_fileRequests a piece of file data from the application.
on_remove_directoryAn override for a directory removal operation.
on_remove_fileAn override for a file remove operation.
on_rename_fileAn override for a file rename operation.
on_request_attributesAn override for an attribute request.
on_transfer_completedThis event is fired when a customized upload or download operation completes.
on_upload_fileAn override for a file upload initiation operation.
on_write_fileHands a piece of file data to the application.

Configuration Settings

The following is a list of configuration settings for the class with short descriptions. Click on the links for further details.

ActiveChannelThe channel to which the event that is being invoked corresponds.
ClientAuthEnables or disables certificate-based client authentication.
DualStackAllows the use of IPv4 and IPv6 simultaneously.
RefreshUsersEnables or disables real-time propagation of user information.
SecurityOptionsVarious options of the secure connection.
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 (supported for HTTPClient, RESTClient and SOAPClient only).
DefDeriveKeyIterationsSpecifies the default key derivation algorithm iteration count.
EnableClientSideSSLFFDHEEnables or disables finite field DHE key exchange support in TLS clients.
GlobalCookiesGets or sets global cookies for all the HTTP transports.
HttpUserAgentSpecifies the user agent name to be used by all HTTP clients.
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.
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.
UseSystemOAEPAndPSSEnforces or disables the use of system-driven RSA OAEP and PSS computations.
UseSystemRandomEnables or disables the use of the OS PRNG.

Copyright (c) 2022 /n software inc. - All rights reserved.
SecureBlackbox 2020 Python Edition - Version 20.0 [Build 8154]