HTTPServer Component
Properties Methods Events Config Settings Errors
The HTTPServer component offers server-side functionality for the HTTP/HTTPS protocols.
Syntax
TsbxHTTPServer
Remarks
Both plain (HTTP) and secure (HTTPS) connection types are supported.
Follow the below steps to set up and run the server in your code:
- Create an instance of the server component and set up the license, if assumed by the edition you are using:
var server = new Httpserver(); server.RuntimeLicense = "5342..0000";
- Set up the listening port (make sure it is not in use):
server.Port = 443;
- Tell the component whether TLS connections should be enforced:
server.UseTLS = true; // set to false to disable TLS and server plain HTTP requests
- Set up the document root (a directory where all static files are kept):
server.DocumentRoot = "c:\\inetpub\\mywebserver";
- (TLS-enabled servers only) Configure TLS parameters. The exact way of doing that may vary for different scenarios and security requirements.
At the very least you need to set up the certificate chain that the server will use to authenticate itself to connecting clients. If you don't,
the component will generate a dummy certificate itself, however, that certificate is unlikely to pass any security requirements.
It will let you accept test connections though.
Below is an example of tuning up the TLS parameters of the server:
// *** Switching TLS on and enabling the implicit mode *** server.UseTLS = true; server.TLSSettings.TLSMode = smImplicitTLS; // this must be implicit for HTTPS // Loading the certificate chain var mgr = new Certificatemanager(); mgr.RuntimeLicense = "5342..0000"; // *** Setting up the host certificate *** // - it should be issued in the name that matches the hostname (such as domain.com) or its IP address (1.2.3.4), // - it must have an associated private key - so likely is provided in PFX or PEM format. mgr.ImportFromFile("CertTLSServer.pfx", "password"); server.ServerCertificates.Add(mgr.Certificate); // The CA certificate: this is to help connecting clients validate the chain. mgr.ImportFromFile("CertCA.cer", ""); server.ServerCertificates.Add(mgr.Certificate); // *** Adjusting finer-grained TLS settings *** // - session resumption (allows for faster handshakes for connections from the same origin) server.TLSSettings.UseSessionResumption = true; // - secure configuration server.TLSSettings.BaseConfiguration = stpcHighlySecure; // - disabling a ciphersuite we dislike (just because we can): server.TLSSettings.Ciphersuites = "-DHE_RSA_AES128_SHA" // *** Configuring versions *** // The default version setting at the time of writing (May 2021) is TLS 1.2 and TLS 1.3, // but that may change in future versions. The following tune-up additionally activates TLS 1.1 and TLS 1.0, // which weakens security, but may be necessary to accept connections from older clients: server.TLSSettings.Versions = csbTLS1 | csbTLS11 | csbTLS12 | csbTLS13;
- Now that your server has been fully set up, activate it:
server.Start();
- Once the Start call completes, your server can accept connections from clients. Each accepted connection runs in a separate thread, not interfering with each other
or your own threads. The server communicates its ongoing activities to your application by throwing events. The lower-level events deal with the underlying network
connections:
- Accept notifies you about a new incoming connection. This event lets you accept or reject it.
- Connect notifies your code of an accepted connection. This event introduces a ConnectionID, a unique identifier that you can use to track the connection throughout its lifetime.
- Disconnect notifies you that a connection has been closed.
- TLSEstablished and TLSShutdown let you know that a TLS layer has been activated/deactivated.
- Error reports a protocol or other error.
- CertificateValidate communicates the client authentication event to your code. To access the certificate(s) provided by the authenticating client,
pin the client and use the PinnedClientChain property to access its chain:
server.PinClient(e.ConnectionID); e.Accept = CheckCert(server.PinnedClientChain);
- GetRequest fires when a GET request is received from a connection.
- PostRequest notifies your code about a POST request. Similar events for other HTTP request types (e.g. DELETE) are also available.
- AuthAttempt fires when a connected client tries HTTP authentication (such as basic or digest) and let you accept or reject it.
Note: every such event is thrown from the respective connection thread, so make sure you use some synchronization mechanism when dispatching the events to your UI thread - for example, by updating UI controls by sending a Window Message rather than accessing the controls directly.
- Use GetRequestStream, GetRequestString, and GetRequestHeader methods inside your GetRequest and similar event handlers to access
request parameters and content supplied by the client. Use SetResponseHeader and SetResponseString method to supply the response content:
void serverGetRequest(object sender, EventArgs e) { e.Handled = true; // telling the Httpserver object that we will supply our own content if (e.URI == "/index.html") { server.SetResponseStatus(e.ConnectionID, 200); server.SetResponseString(e.ConnectionID, "<html><head></head><body>Hello!</body></html>", "text/html"); } else if (e.URI == "/secretfile") { server.SetResponseStatus(e.ConnectionID, 200); server.SetResponseBytes(e.ConnectionID, m_secretData, "application/pdf"); } else if (e.URI.StartsWith("/static/")) { e.Handled = false; // letting the server process the content and flush the file from the home directory (c:\inetpub\mywebserver) } else { Flush404Page(e.ConnectionID); } }
- To stop the server, call Stop:
server.Stop();
HTTPServer and SSLLabs
Qualys SSLLabs (https://www.ssllabs.com/) has been long known as a comprehensive TLS site quality checking tool. It is now a de-facto standard and a sign of good taste to aspire for the best SSLLabs test result for your web presence. SecureBlackbox developers share that effort and want to help their customers build secure TLS endpoints that can be independently endorsed by third-party evaluators like SSLLabs.Having said that, when assessing SecureBlackbox TLS-capable servers that are configured to use their default setup, you will often end up with a lower SSLLabs score than you could have. There is a simple reason for that. Being a vendor of a library used by thousands of customers, we have to find a delicate balance between security, compatibility, and keeping class contracts rolling from one product build to another. This makes the default configuration of the components not the strongest possible. To put it simple, we could easily make the default component setup bulletproof - but having done that, we would have likely ended up with hundreds of customers stuck with legacy environments (and there are a lot of them around) losing their connectivity.
If you are looking at achieving the best score at SSLLabs, please read on. The below guidance aims to help you tune up the server component in the way that should give you an A score.
First, switch your server to the highly secure base configuration:
server.TLSSettings.BaseConfiguration = stpcHighlySecure;
This should immediately give you an A, or a T if your server certificate does not chain up to a trusted anchor.
Some warnings will still be included in the report. One of those is related to the session resumption. It is normally shown in orange:
Session resumption (caching): No (IDs assigned but not accepted)
This literally means that the server is not configured to re-use older sessions, which may put extra computational burden on clients and itself.
Use the following setting to enable session caching:
server.TLSSettings.UseSessionResumption = true;
Besides, the report may show that there are some weak ciphersuites. All of those should be shown in orange (there should not be any reds; if
there are - please let us know), which means they are only relatively weak. While switching them off may affect the interoperability level of
the server, you may still want to do that. By using the below approach you can disable individual ciphersuites selectively. For example, if
the report shows that TLS_DHE_RSA_WITH_AES128_CBC_SHA256 and TLS_DHE_RSA_WITH_AES256_CBC_SHA256 are weak (because of their CBC mode), you can
disable them in the following way:
server.TLSSettings.Ciphersuites = '-DHE_RSA_AES128_SHA256;-DHE_RSA_AES256_SHA256';
Note that SBB uses slightly different, simpler naming convention by dropping unnecessart WITH and CBC. Let us know if you have difficulties matching
the ciphersuite names.
Property List
The following is the full list of the properties of the component with short descriptions. Click on the links for further details.
Active | Indicates whether the server is active and is listening to new connections. |
AllowKeepAlive | Enables or disables keep-alive mode. |
AuthBasic | Enables or disables basic authentication. |
AuthDigest | Enables or disables digest authentication. |
AuthDigestExpire | Specifies digest expiration time for digest authentication. |
AuthRealm | Specifies authentication realm for digest and NTLM authentication. |
BoundPort | Indicates the bound listening port. |
ClientAuth | Enables or disables certificate-based client authentication. |
CompressionLevel | The default compression level to use. |
DocumentRoot | The document root of the server. |
ErrorOrigin | Indicates the endpoint where the error originates from. |
ErrorSeverity | The severity of the error that happened. |
ExternalCrypto | Provides access to external signing and DC parameters. |
FIPSMode | Reserved. |
HandshakeTimeout | Specifies the handshake timeout in milliseconds. |
Host | The host to bind the listening port to. |
PinnedClient | Populates the pinned client details. |
PinnedClientChain | Contains the certificate chain of the pinned client. |
Port | Specifies the port number to listen for connections on. |
PortRangeFrom | Specifies the lower limit of the listening port range for incoming connections. |
PortRangeTo | Specifies the upper limit of the listening port range for incoming connections. |
ServerCertificates | The server's TLS certificates. |
SessionTimeout | Specifies the default session timeout value in milliseconds. |
SocketSettings | Manages network connection settings. |
TLSSettings | Manages TLS layer settings. |
UseChunkedTransfer | Enables chunked transfer. |
UseCompression | Enables or disables server-side compression. |
Users | Provides a list of registered users. |
WebsiteName | Specifies the web site name to use in the certificate. |
Method List
The following is the full list of the methods of the component with short descriptions. Click on the links for further details.
Config | Sets or retrieves a configuration setting. |
DoAction | Performs an additional action. |
DropClient | Terminates a client connection. |
GetRequestBytes | Returns the contents of the client's HTTP request. |
GetRequestHeader | Returns a request header value. |
GetRequestStream | Returns the contents of the client's HTTP request. |
GetRequestString | Returns the contents of the client's HTTP request. |
GetRequestUsername | Returns the username for a connection. |
GetResponseHeader | Returns a response header value. |
ListClients | Enumerates the connected clients. |
PinClient | Takes a snapshot of the connection's properties. |
ProcessGenericRequest | Processes a generic HTTP request. |
ProcessGenericRequestStream | Processes a generic HTTP request from a stream. |
SetResponseBytes | Sets a byte array to be served as a response. |
SetResponseFile | Sets a file to be served as a response. |
SetResponseHeader | Sets a response header. |
SetResponseStatus | Sets an HTTP status to be sent with the response. |
SetResponseStream | Sets a stream to be served as a response. |
SetResponseString | Sets a string to be served as a response. |
Start | Starts the server. |
Stop | Stops the server. |
Event List
The following is the full list of the events fired by the component with short descriptions. Click on the links for further details.
Accept | Reports an incoming connection. |
AuthAttempt | Fires when a connected client makes an authentication attempt. |
Connect | Reports an accepted connection. |
CustomRequest | Reports a request of a non-standard type (method). |
Data | Supplies a data chunk received within a POST or PUT upload. |
DeleteRequest | Reports a DELETE request. |
Disconnect | Fires to report a disconnected client. |
Error | Information about errors during data delivery. |
ExternalSign | Handles remote or external signing initiated by the server protocol. |
FileError | Reports a file access error to the application. |
GetRequest | Reports a GET request. |
HeadersPrepared | Fires when the response headers have been formed and are ready to be sent to the server. |
HeadRequest | Reports a HEAD request. |
Notification | This event notifies the application about an underlying control flow event. |
OptionsRequest | Reports an OPTIONS request. |
PatchRequest | Reports a PATCH request. |
PostRequest | Reports a POST request. |
PutRequest | Reports a PUT request. |
ResourceAccess | Reports an attempt to access a resource. |
TLSCertValidate | Fires when a client certificate needs to be validated. |
TLSEstablished | Reports the setup of a TLS session. |
TLSHandshake | Fires when a newly established client connection initiates a TLS handshake. |
TLSPSK | Requests a pre-shared key for TLS-PSK. |
TLSShutdown | Reports closure of a TLS session. |
TraceRequest | Reports a TRACE request. |
Config Settings
The following is a list of config settings for the component with short descriptions. Click on the links for further details.
AllowOptionsResponseWithoutAuth | Enables unauthenticated responses to OPTIONS requests. |
ClientAuth | Enables or disables certificate-based client authentication. |
DualStack | Allows the use of ip4 and ip6 simultaneously. |
HomePage | Specifies the home page resource name. |
Host | The host to bind to. |
RequestFilter | The request string modifier. |
ServerSSLDHKeyLength | Sets the size of the TLS DHE key exchange group. |
TempPath | Path for storing temporary files. |
WebsiteName | The website name for the TLS certificate. |
CheckKeyIntegrityBeforeUse | Enables or disable private key integrity check before use. |
CookieCaching | Specifies whether a cookie cache should be used for HTTP(S) transports. |
Cookies | Gets or sets local cookies for the component (supported for HTTPClient, RESTClient and SOAPClient only). |
DefDeriveKeyIterations | Specifies the default key derivation algorithm iteration count. |
EnableClientSideSSLFFDHE | Enables or disables finite field DHE key exchange support in TLS clients. |
GlobalCookies | Gets or sets global cookies for all the HTTP transports. |
HttpUserAgent | Specifies the user agent name to be used by all HTTP clients. |
LogDestination | Specifies the debug log destination. |
LogDetails | Specifies the debug log details to dump. |
LogFile | Specifies the debug log filename. |
LogFilters | Specifies the debug log filters. |
LogFlushMode | Specifies the log flush mode. |
LogLevel | Specifies the debug log level. |
LogMaxEventCount | Specifies the maximum number of events to cache before further action is taken. |
LogRotationMode | Specifies the log rotation mode. |
MaxASN1BufferLength | Specifies the maximal allowed length for ASN.1 primitive tag data. |
MaxASN1TreeDepth | Specifies the maximal depth for processed ASN.1 trees. |
OCSPHashAlgorithm | Specifies the hash algorithm to be used to identify certificates in OCSP requests. |
StaticDNS | Specifies whether static DNS rules should be used. |
StaticIPAddress[domain] | Gets or sets an IP address for the specified domain name. |
StaticIPAddresses | Gets or sets all the static DNS rules. |
Tag | Allows to store any custom data. |
UseOwnDNSResolver | Specifies whether the client components should use own DNS resolver. |
UseSharedSystemStorages | Specifies whether the validation engine should use a global per-process copy of the system certificate stores. |
UseSystemOAEPAndPSS | Enforces or disables the use of system-driven RSA OAEP and PSS computations. |
UseSystemRandom | Enables or disables the use of the OS PRNG. |
Active Property (HTTPServer Component)
Indicates whether the server is active and is listening to new connections.
Syntax
property Active: Boolean read get_Active;
Default Value
false
Remarks
This read-only property returns True if the server is listening to incoming connections.
This property is read-only and not available at design time.
AllowKeepAlive Property (HTTPServer Component)
Enables or disables keep-alive mode.
Syntax
property AllowKeepAlive: Boolean read get_AllowKeepAlive write set_AllowKeepAlive;
Default Value
true
Remarks
Use this property to enable or disable the keep-alive connection mode. If keep-alive is enabled, clients that choose to use it may stay connected for a while.
AuthBasic Property (HTTPServer Component)
Enables or disables basic authentication.
Syntax
property AuthBasic: Boolean read get_AuthBasic write set_AuthBasic;
Default Value
false
Remarks
Use this property to enable or disable basic user authentication in the HTTP server.
AuthDigest Property (HTTPServer Component)
Enables or disables digest authentication.
Syntax
property AuthDigest: Boolean read get_AuthDigest write set_AuthDigest;
Default Value
false
Remarks
Use this property to enable or disable digest-based user authentication in the HTTP server.
AuthDigestExpire Property (HTTPServer Component)
Specifies digest expiration time for digest authentication.
Syntax
property AuthDigestExpire: Integer read get_AuthDigestExpire write set_AuthDigestExpire;
Default Value
20
Remarks
Use this property to specify the digest expiration time for digest authentication, in seconds.
AuthRealm Property (HTTPServer Component)
Specifies authentication realm for digest and NTLM authentication.
Syntax
property AuthRealm: String read get_AuthRealm write set_AuthRealm;
Default Value
'SecureBlackbox'
Remarks
Specifies authentication realm for digest and NTLM authentication types.
BoundPort Property (HTTPServer Component)
Indicates the bound listening port.
Syntax
property BoundPort: Integer read get_BoundPort;
Default Value
0
Remarks
Check this property to find out the port that has been allocated to the server by the system. The bound port always equals Port if it is provided, or is allocated dynamically if configured to fall in the range between PortRangeFrom and PortRangeTo constraints.
This property is read-only and not available at design time.
ClientAuth Property (HTTPServer Component)
Enables or disables certificate-based client authentication.
Syntax
property ClientAuth: TsbxClientAuthTypes read get_ClientAuth write set_ClientAuth;
TsbxClientAuthTypes = ( ccatNoAuth, ccatRequestCert, ccatRequireCert );
Default Value
ccatNoAuth
Remarks
Set this property to true to tune up the client authentication type: ccatNoAuth = 0; ccatRequestCert = 1; ccatRequireCert = 2;
CompressionLevel Property (HTTPServer Component)
The default compression level to use.
Syntax
property CompressionLevel: Integer read get_CompressionLevel write set_CompressionLevel;
Default Value
6
Remarks
Assign this property with the compression level (1 to 9) to apply for gzipped responses. 1 stands for the lightest but fastest compression, and 9 for the best but the slowest.
DocumentRoot Property (HTTPServer Component)
The document root of the server.
Syntax
property DocumentRoot: String read get_DocumentRoot write set_DocumentRoot;
Default Value
''
Remarks
Use this property to specify a local folder which is going to be the server's document root (the mount point of the virtual home directory).
ErrorOrigin Property (HTTPServer Component)
Indicates the endpoint where the error originates from.
Syntax
property ErrorOrigin: TsbxErrorOrigins read get_ErrorOrigin write set_ErrorOrigin;
TsbxErrorOrigins = ( eoLocal, eoRemote );
Default Value
eoLocal
Remarks
Use this property to establish whether the reported error originates from a local or remote endpoint.
eoLocal | 0 | |
eoRemote | 1 |
This property is not available at design time.
ErrorSeverity Property (HTTPServer Component)
The severity of the error that happened.
Syntax
property ErrorSeverity: TsbxErrorSeverities read get_ErrorSeverity write set_ErrorSeverity;
TsbxErrorSeverities = ( esInfo, esWarning, esFatal );
Default Value
esWarning
Remarks
Use this property to establish whether the error is fatal.
esWarning | 1 | |
esFatal | 2 |
This property is not available at design time.
ExternalCrypto Property (HTTPServer Component)
Provides access to external signing and DC parameters.
Syntax
property ExternalCrypto: TsbxExternalCrypto read get_ExternalCrypto;
Remarks
Use this property to tune-up remote cryptography settings. SecureBlackbox supports two independent types of external cryptography: synchronous (based on OnExternalSign event) and asynchronous (based on DC protocol and DCAuth signing component).
This property is read-only.
FIPSMode Property (HTTPServer Component)
Reserved.
Syntax
property FIPSMode: Boolean read get_FIPSMode write set_FIPSMode;
Default Value
false
Remarks
This property is reserved for future use.
HandshakeTimeout Property (HTTPServer Component)
Specifies the handshake timeout in milliseconds.
Syntax
property HandshakeTimeout: Integer read get_HandshakeTimeout write set_HandshakeTimeout;
Default Value
20000
Remarks
Use this property to set the TLS handshake timeout.
Host Property (HTTPServer Component)
The host to bind the listening port to.
Syntax
property Host: String read get_Host write set_Host;
Default Value
''
Remarks
Use this property to specify the IP address on which to listen to incoming connections.
PinnedClient Property (HTTPServer Component)
Populates the pinned client details.
Syntax
property PinnedClient: TsbxTLSClientEntry read get_PinnedClient;
Remarks
Use this property to access the details of the client connection previously pinned with PinClient method.
This property is read-only and not available at design time.
PinnedClientChain Property (HTTPServer Component)
Contains the certificate chain of the pinned client.
Syntax
property PinnedClientChain: TsbxCertificateList read get_PinnedClientChain;
Remarks
Use this property to access the certificate chain of the client connection pinned previously with a PinClient call.
This property is read-only and not available at design time.
Port Property (HTTPServer Component)
Specifies the port number to listen for connections on.
Syntax
property Port: Integer read get_Port write set_Port;
Default Value
80
Remarks
Use this property to specify the port number to listen to connections on. Standard port numbers are 80 for an HTTP server, and 443 for an HTTPS server.
Alternatively, you may specify the acceptable range of listening ports via PortRangeFrom and PortRangeTo properties. In this case the port will be allocated within the requested range by the operating system, and reported in BoundPort.
PortRangeFrom Property (HTTPServer Component)
Specifies the lower limit of the listening port range for incoming connections.
Syntax
property PortRangeFrom: Integer read get_PortRangeFrom write set_PortRangeFrom;
Default Value
0
Remarks
Use this property to specify the lower limit of the port range to listen to connections on. When a port range is used to specify the listening port (as opposed to a fixed value provided via Port), the port will be allocated within the requested range by the operating system, and reported in BoundPort.
Note that this property is ignored if the Port property is set to a non-zero value, in which case the server always aims to listen on that fixed port.
PortRangeTo Property (HTTPServer Component)
Specifies the upper limit of the listening port range for incoming connections.
Syntax
property PortRangeTo: Integer read get_PortRangeTo write set_PortRangeTo;
Default Value
0
Remarks
Use this property to specify the upper limit of the port range to listen to connections on. When a port range is used to specify the listening port (as opposed to a fixed value provided via Port), the port will be allocated within the requested range by the operating system, and reported in BoundPort.
Note that this property is ignored if the Port property is set to a non-zero value, in which case the server always aims to listen on that fixed port.
ServerCertificates Property (HTTPServer Component)
The server's TLS certificates.
Syntax
property ServerCertificates: TsbxCertificateList read get_ServerCertificates write set_ServerCertificates;
Remarks
Use this property to provide a list of TLS certificates for the server endpoint.
A TLS endpoint needs a certificate to be able to accept TLS connections. At least one of the certificates in the collection - the endpoint certificate - must have a private key associated with it.
The collection may include more than one endpoint certificate, and more than one chain. A typical usage scenario is to include two chains (ECDSA and RSA), to cater for clients with different ciphersuite preferences.
This property is not available at design time.
SessionTimeout Property (HTTPServer Component)
Specifies the default session timeout value in milliseconds.
Syntax
property SessionTimeout: Integer read get_SessionTimeout write set_SessionTimeout;
Default Value
360000
Remarks
Specifies the period of inactivity (in milliseconds) after which the connection will be terminated by the server.
SocketSettings Property (HTTPServer Component)
Manages network connection settings.
Syntax
property SocketSettings: TsbxSocketSettings read get_SocketSettings;
Remarks
Use this property to tune up network connection parameters.
This property is read-only.
TLSSettings Property (HTTPServer Component)
Manages TLS layer settings.
Syntax
property TLSSettings: TsbxTLSSettings read get_TLSSettings;
Remarks
Use this property to tune up the TLS layer parameters.
This property is read-only.
UseChunkedTransfer Property (HTTPServer Component)
Enables chunked transfer.
Syntax
property UseChunkedTransfer: Boolean read get_UseChunkedTransfer write set_UseChunkedTransfer;
Default Value
false
Remarks
Use this property to enable chunked content encoding.
UseCompression Property (HTTPServer Component)
Enables or disables server-side compression.
Syntax
property UseCompression: Boolean read get_UseCompression write set_UseCompression;
Default Value
false
Remarks
Use this property to enable or disable server-side content compression.
Users Property (HTTPServer Component)
Provides a list of registered users.
Syntax
property Users: TsbxUserAccountList read get_Users write set_Users;
Remarks
Assign a list of 'known' users to this property to automate authentication handling by the component.
This property is not available at design time.
WebsiteName Property (HTTPServer Component)
Specifies the web site name to use in the certificate.
Syntax
property WebsiteName: String read get_WebsiteName write set_WebsiteName;
Default Value
'SecureBlackbox'
Remarks
If using an internally-generated certificate, use this property to specify the web site name to be included as a common name. A typical common name consists of the host name, such as '192.168.10.10' or 'domain.com'.
Config Method (HTTPServer Component)
Sets or retrieves a configuration setting.
Syntax
function Config(ConfigurationString: String): String;
Remarks
Config is a generic method available in every component. It is used to set and retrieve configuration settings for the component.
These settings are similar in functionality to properties, but they are rarely used. In order to avoid "polluting" the property namespace of the component, 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.
DoAction Method (HTTPServer Component)
Performs an additional action.
Syntax
function DoAction(ActionID: String; ActionParams: String): String;
Remarks
DoAction is a generic method available in every component. 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 of the action is provided in ActionID parameter. ActionParams contains a list of parameters for the action in the form of PARAM1=VALUE1;PARAM2=VALUE2;....
DropClient Method (HTTPServer Component)
Terminates a client connection.
Syntax
procedure DropClient(ConnectionId: Int64; Forced: Boolean);
Remarks
Call this method to shut down a connected client. Forced indicates whether the connection should be closed in a graceful manner.
GetRequestBytes Method (HTTPServer Component)
Returns the contents of the client's HTTP request.
Syntax
function GetRequestBytes(ConnectionId: Int64; RequestFilter: String): TBytes;
Remarks
Use this method to get the body of the client's HTTP request. Note that the body of GET and HEAD requests is empty. The method returns the requested content.
The RequestFilter parameter allows you to select the element(s) that you would like to get. An empty request filter makes the whole body to be returned. The following request filters are currently supported:
params | Request query parameters only. |
params[Index] | A specific request parameter, by index. |
params['Name'] | A specific request parameter, by name. |
parts[Index] | The body of a particular part of a multipart message. |
GetRequestHeader Method (HTTPServer Component)
Returns a request header value.
Syntax
function GetRequestHeader(ConnectionId: Int64; HeaderName: String): String;
Remarks
Use this method to get the value of a request header. A good place to call this method is a request-marking event, such as GetRequest or PostRequest.
GetRequestStream Method (HTTPServer Component)
Returns the contents of the client's HTTP request.
Syntax
procedure GetRequestStream(ConnectionId: Int64; RequestFilter: String; OutputStream: TStream);
Remarks
Use this method to get the body of the client's HTTP request into a stream. Note that the body of GET and HEAD requests is empty.
The RequestFilter parameter allows you to select the element(s) of the requests that you would like to get. An empty request filter makes the whole body to be returned. The following request filters are currently supported:
params | Request query parameters only. |
params[Index] | A specific request parameter, by index. |
params['Name'] | A specific request parameter, by name. |
parts[Index] | The body of a particular part of a multipart message. |
GetRequestString Method (HTTPServer Component)
Returns the contents of the client's HTTP request.
Syntax
function GetRequestString(ConnectionId: Int64; RequestFilter: String): String;
Remarks
Use this method to get the body of the client's HTTP request to a string. Note that the body of GET and HEAD requests is empty.
The RequestFilter parameter allows you to select the element(s) of the requests that you would like to get. An empty request filter makes the whole body to be returned. The following request filters are currently supported:
params | Request query parameters only. |
params[Index] | A specific request parameter, by index. |
params['Name'] | A specific request parameter, by name. |
parts[Index] | The body of a particular part of a multipart message. |
GetRequestUsername Method (HTTPServer Component)
Returns the username for a connection.
Syntax
function GetRequestUsername(ConnectionId: Int64): String;
Remarks
Use this method to obtain a username for an active connection. The method will return an empty string if no authentication has been performed on the connection.
GetResponseHeader Method (HTTPServer Component)
Returns a response header value.
Syntax
function GetResponseHeader(ConnectionId: Int64; HeaderName: String): String;
Remarks
Use this method to get the value of a response header. A good place to call this method is HeadersPrepared event. Call the method with empty HeaderName to get the whole response header.
ListClients Method (HTTPServer Component)
Enumerates the connected clients.
Syntax
function ListClients(): String;
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.
PinClient Method (HTTPServer Component)
Takes a snapshot of the connection's properties.
Syntax
procedure PinClient(ConnectionId: Int64);
Remarks
Use this method to take a snapshot of a connected client. The captured properties are populated in PinnedClient and PinnedClientChain properties.
ProcessGenericRequest Method (HTTPServer Component)
Processes a generic HTTP request.
Syntax
function ProcessGenericRequest(ConnectionId: Int64; RequestBytes: TBytes): TBytes;
Remarks
This method processes a generic HTTP request and produces a response. Use it to generate HTTP responses for requests obtained externally, out of the default HTTP channel.
This method respects all current settings of the server object, and invokes the corresponding events to consult about the request and response details with the application. ConnectionId allows to identify the request in the events.
The method returns the complete HTTP response including HTTP headers.
ProcessGenericRequestStream Method (HTTPServer Component)
Processes a generic HTTP request from a stream.
Syntax
procedure ProcessGenericRequestStream(ConnectionId: Int64; RequestHeaders: String; RequestData: TStream; ResponseData: TStream);
Remarks
This method processes a generic HTTP request and produces a response. Use it to generate HTTP responses for requests obtained externally, out of the default HTTP channel.
The method expects the request headers in RequestHeaders, and the request data is read from RequestData stream. Once the request is processed, the response headers are reported through HeadersPrepared event before any data is written to ResponseData stream. ConnectionId allows to identify the request in the events.
This method respects all current settings of the server object, and invokes the corresponding events to consult about the request and response details with the application.
SetResponseBytes Method (HTTPServer Component)
Sets a byte array to be served as a response.
Syntax
procedure SetResponseBytes(ConnectionId: Int64; Bytes: TBytes; ContentType: String; ResponseFilter: String);
Remarks
Use this property to provide the response content in a byte array. The ResponseFilter parameter lets you select the element of the response that you would like to set with this call. The empty filter stands for the entire response body. The only response filter currently supported is parts:
parts[Index] | The body of a particular part of a multipart response. |
SetResponseFile Method (HTTPServer Component)
Sets a file to be served as a response.
Syntax
procedure SetResponseFile(ConnectionId: Int64; FileName: String; ContentType: String; ResponseFilter: String);
Remarks
Use this property to provide the response content in a file. The ResponseFilter parameter lets you select the element of the response that you would like to set with this call. The empty filter stands for the entire response body. The only response filter currently supported is parts:
parts[Index] | The body of a particular part of a multipart response. |
SetResponseHeader Method (HTTPServer Component)
Sets a response header.
Syntax
function SetResponseHeader(ConnectionId: Int64; HeaderName: String; Value: String): Boolean;
Remarks
Use this method to set a response header. A good place to call this method is a request-marking event, such as GetRequest or PostRequest.
SetResponseStatus Method (HTTPServer Component)
Sets an HTTP status to be sent with the response.
Syntax
procedure SetResponseStatus(ConnectionId: Int64; StatusCode: Integer);
Remarks
Use this method to set an HTTP status for the request. A good place to call this method is a request-marking event, such as GetRequest.
SetResponseStream Method (HTTPServer Component)
Sets a stream to be served as a response.
Syntax
procedure SetResponseStream(ConnectionId: Int64; DataStream: TStream; CloseStream: Boolean; ContentType: String; ResponseFilter: String);
Remarks
Use this property to provide the response content in a stream. Set CloseStream to indicate that the stream should be disposed of once sent. The ResponseFilter parameter lets you select the element of the response that you would like to set with this call. The empty filter stands for the entire response body. The only response filter currently supported is parts:
parts[Index] | The body of a particular part of a multipart response. |
SetResponseString Method (HTTPServer Component)
Sets a string to be served as a response.
Syntax
procedure SetResponseString(ConnectionId: Int64; DataStr: String; ContentType: String; ResponseFilter: String);
Remarks
Use this property to provide the response content in a string. The ResponseFilter parameter lets you select the element of the response that you would like to set with this call. The empty filter stands for the entire response body. The only response filter currently supported is parts:
parts[Index] | The body of a particular part of a multipart response. |
Start Method (HTTPServer Component)
Starts the server.
Syntax
procedure Start();
Remarks
Use this method to activate the server and start listening to incoming connections.
Stop Method (HTTPServer Component)
Stops the server.
Syntax
procedure Stop();
Remarks
Call this method to stop listening to incoming connections and deactivate the server.
Accept Event (HTTPServer Component)
Reports an incoming connection.
Syntax
type TAcceptEvent = procedure ( Sender: TObject; const RemoteAddress: String; RemotePort: Integer; var Accept: Boolean ) of Object;
property OnAccept: TAcceptEvent read FOnAccept write FOnAccept;
Remarks
This event is fired when a new connection from RemoteAddress:RemotePort is ready to be accepted. Use the Accept parameter to accept or decline it.
Subscribe to Connect event to be notified of every connection that has been set up.
AuthAttempt Event (HTTPServer Component)
Fires when a connected client makes an authentication attempt.
Syntax
type TAuthAttemptEvent = procedure ( Sender: TObject; ConnectionID: Int64; const HTTPMethod: String; const URI: String; const AuthMethod: String; const Username: String; const Password: String; var Allow: Boolean ) of Object;
property OnAuthAttempt: TAuthAttemptEvent read FOnAuthAttempt write FOnAuthAttempt;
Remarks
The component fires this event whenever a client attempts to authenticate itself. Use the Allow parameter to let the client through.
ConnectionID contains the unique session identifier for that client, HTTPMethod specifies the HTTP method (GET, POST, etc.) used to access the URI resource, AuthMethod specifies the authentication method, and Username and Password contain the professed credentials.
Connect Event (HTTPServer Component)
Reports an accepted connection.
Syntax
type TConnectEvent = procedure ( Sender: TObject; ConnectionID: Int64; const RemoteAddress: String; RemotePort: Integer ) of Object;
property OnConnect: TConnectEvent read FOnConnect write FOnConnect;
Remarks
The component fires this event to report that a new connection has been established. ConnectionId indicates the unique ID assigned to this connection. The same ID will be supplied to any other events related to this connection, such as GetRequest or AuthAttempt.
CustomRequest Event (HTTPServer Component)
Reports a request of a non-standard type (method).
Syntax
type TCustomRequestEvent = procedure ( Sender: TObject; ConnectionID: Int64; const URI: String; const HTTPMethod: String; var Handled: Boolean ) of Object;
property OnCustomRequest: TCustomRequestEvent read FOnCustomRequest write FOnCustomRequest;
Remarks
The component fires this event to notify the application about a non-standard request received from the client. The HTTPMethod contains the non-standard HTTP method.
ConnectionID indicates the connection that sent the request and URI suggests the requested resource.
Set Handled to true to indicate that your application's code will take care of the request. The application does it by providing the necessary details via SetResponseStatus, SetResponseHeader, and SetResponseFile methods. If the returned value of Handled is false, the server will try to take care of the request automatically by searching for the requested resource in DocumentRoot.
Data Event (HTTPServer Component)
Supplies a data chunk received within a POST or PUT upload.
Syntax
type TDataEvent = procedure ( Sender: TObject; ConnectionID: Int64; Buffer: TBytes ) of Object;
property OnData: TDataEvent read FOnData write FOnData;
Remarks
This event is fired to supply another piece of data received within a POST or PUT upload operation. This event may fire multiple times during a single request upload to pass the uploaded data to the application chunk-by-chunk.
DeleteRequest Event (HTTPServer Component)
Reports a DELETE request.
Syntax
type TDeleteRequestEvent = procedure ( Sender: TObject; ConnectionID: Int64; const URI: String; var Handled: Boolean ) of Object;
property OnDeleteRequest: TDeleteRequestEvent read FOnDeleteRequest write FOnDeleteRequest;
Remarks
The component fires this event to notify the application about a DELETE request received from the client.
ConnectionID indicates the connection that sent the request and URI suggests the requested resource.
Set Handled to true to indicate that your application's code will take care of the request. The application does it by providing the necessary details via SetResponseStatus, SetResponseHeader, and SetResponseFile methods. If the returned value of Handled is false, the server will try to take care of the request automatically by searching for the requested resource in DocumentRoot.
Disconnect Event (HTTPServer Component)
Fires to report a disconnected client.
Syntax
type TDisconnectEvent = procedure ( Sender: TObject; ConnectionID: Int64 ) of Object;
property OnDisconnect: TDisconnectEvent read FOnDisconnect write FOnDisconnect;
Remarks
The component fires this event when a connected client disconnects.
Error Event (HTTPServer Component)
Information about errors during data delivery.
Syntax
type TErrorEvent = procedure ( Sender: TObject; ConnectionID: Int64; ErrorCode: Integer; const Description: String ) of Object;
property OnError: TErrorEvent read FOnError write FOnError;
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 HTTPS section.
ExternalSign Event (HTTPServer Component)
Handles remote or external signing initiated by the server protocol.
Syntax
type TExternalSignEvent = procedure ( Sender: TObject; ConnectionID: Int64; const OperationId: String; const HashAlgorithm: String; const Pars: String; const Data: String; var SignedData: String ) of Object;
property OnExternalSign: TExternalSignEvent read FOnExternalSign write FOnExternalSign;
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 component via SignedData parameter.
OperationId provides a comment about the operation and its origin. It depends on the exact component being used, and may be empty. HashAlgorithm specifies the hash algorithm being used for the operation, and Pars contain algorithm-dependent parameters.
The component uses base16 (hex) encoding for 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 a .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();
};
FileError Event (HTTPServer Component)
Reports a file access error to the application.
Syntax
type TFileErrorEvent = procedure ( Sender: TObject; ConnectionID: Int64; const FileName: String; ErrorCode: Integer ) of Object;
property OnFileError: TFileErrorEvent read FOnFileError write FOnFileError;
Remarks
The component uses this event to report a file access errors. FileName and ErrorCode contain the file path and the error code respectively.
GetRequest Event (HTTPServer Component)
Reports a GET request.
Syntax
type TGetRequestEvent = procedure ( Sender: TObject; ConnectionID: Int64; const URI: String; var Handled: Boolean ) of Object;
property OnGetRequest: TGetRequestEvent read FOnGetRequest write FOnGetRequest;
Remarks
The component fires this event to notify the application about a GET request received from the client.
ConnectionID indicates the connection that sent the request and URI suggests the requested resource.
Set Handled to true to indicate that your application's code will take care of the request. The application does it by providing the necessary details via SetResponseStatus, SetResponseHeader, SetResponseFile or SetResponseString methods. If the returned value of Handled is false, the server will try to take care of the request automatically by searching for the requested resource in DocumentRoot.
HeadersPrepared Event (HTTPServer Component)
Fires when the response headers have been formed and are ready to be sent to the server.
Syntax
type THeadersPreparedEvent = procedure ( Sender: TObject; ConnectionID: Int64 ) of Object;
property OnHeadersPrepared: THeadersPreparedEvent read FOnHeadersPrepared write FOnHeadersPrepared;
Remarks
The component fires this event when the response headers are ready to be sent to the server. ConnectionID indicates the connection that processed the request.
Use GetResponseHeader method with an empty header name to get the whole response header.
HeadRequest Event (HTTPServer Component)
Reports a HEAD request.
Syntax
type THeadRequestEvent = procedure ( Sender: TObject; ConnectionID: Int64; const URI: String; var Handled: Boolean ) of Object;
property OnHeadRequest: THeadRequestEvent read FOnHeadRequest write FOnHeadRequest;
Remarks
The component fires this event to notify the application about a HEAD request received from the client.
ConnectionID indicates the connection that sent the request and URI suggests the requested resource.
Set Handled to true to indicate that your application's code will take care of the request. The application does it by providing the necessary details via SetResponseStatus, SetResponseHeader, and SetResponseFile methods. If the returned value of Handled is false, the server will try to take care of the request automatically by searching for the requested resource in DocumentRoot.
Notification Event (HTTPServer Component)
This event notifies the application about an underlying control flow event.
Syntax
type TNotificationEvent = procedure ( Sender: TObject; const EventID: String; const EventParam: String ) of Object;
property OnNotification: TNotificationEvent read FOnNotification write FOnNotification;
Remarks
The component fires this event to let the application know about some event, occurrence, or milestone in the component. 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 EventID parameter. EventParam contains any parameters accompanying the occurrence. Depending on the type of the component, the exact action it is performing, or the document being processed, one or both may be omitted.
OptionsRequest Event (HTTPServer Component)
Reports an OPTIONS request.
Syntax
type TOptionsRequestEvent = procedure ( Sender: TObject; ConnectionID: Int64; const URI: String; var Handled: Boolean ) of Object;
property OnOptionsRequest: TOptionsRequestEvent read FOnOptionsRequest write FOnOptionsRequest;
Remarks
The component fires this event to notify the application about an OPTIONS request received from the client.
ConnectionID indicates the connection that sent the request and URI suggests the requested resource.
Set Handled to true to indicate that your application's code will take care of the request. The application does it by providing the necessary details via SetResponseStatus, SetResponseHeader, and SetResponseFile methods. If the returned value of Handled is false, the server will try to take care of the request automatically by searching for the requested resource in DocumentRoot.
PatchRequest Event (HTTPServer Component)
Reports a PATCH request.
Syntax
type TPatchRequestEvent = procedure ( Sender: TObject; ConnectionID: Int64; const URI: String; var Handled: Boolean ) of Object;
property OnPatchRequest: TPatchRequestEvent read FOnPatchRequest write FOnPatchRequest;
Remarks
The component fires this event to notify the application about a PATCH request received from the client.
ConnectionID indicates the connection that sent the request and URI suggests the requested resource.
Set Handled to true to indicate that your application's code will take care of the request. The application does it by providing the necessary details via SetResponseStatus, SetResponseHeader, and SetResponseFile methods. If the returned value of Handled is false, the server will try to take care of the request automatically by searching for the requested resource in DocumentRoot.
PostRequest Event (HTTPServer Component)
Reports a POST request.
Syntax
type TPostRequestEvent = procedure ( Sender: TObject; ConnectionID: Int64; const URI: String; var Handled: Boolean ) of Object;
property OnPostRequest: TPostRequestEvent read FOnPostRequest write FOnPostRequest;
Remarks
The component fires this event to notify the application about a POST request received from the client.
ConnectionID indicates the connection that sent the request and URI suggests the requested resource.
Set Handled to true to indicate that your application's code will take care of the request. The application does it by providing the necessary details via SetResponseStatus, SetResponseHeader, and SetResponseFile methods. If the returned value of Handled is false, the server will try to take care of the request automatically by searching for the requested resource in DocumentRoot.
PutRequest Event (HTTPServer Component)
Reports a PUT request.
Syntax
type TPutRequestEvent = procedure ( Sender: TObject; ConnectionID: Int64; const URI: String; var Handled: Boolean ) of Object;
property OnPutRequest: TPutRequestEvent read FOnPutRequest write FOnPutRequest;
Remarks
The component fires this event to notify the application about a PUT request received from the client.
ConnectionID indicates the connection that sent the request and URI suggests the requested resource.
Set Handled to true to indicate that your application's code will take care of the request. The application does it by providing the necessary details via SetResponseStatus, SetResponseHeader, and SetResponseFile methods. If the returned value of Handled is false, the server will try to take care of the request automatically by searching for the requested resource in DocumentRoot.
ResourceAccess Event (HTTPServer Component)
Reports an attempt to access a resource.
Syntax
type TResourceAccessEvent = procedure ( Sender: TObject; ConnectionID: Int64; const HTTPMethod: String; const URI: String; var Allow: Boolean; var RedirectURI: String ) of Object;
property OnResourceAccess: TResourceAccessEvent read FOnResourceAccess write FOnResourceAccess;
Remarks
The component fires this event to notify the application about a request received from the client. The HTTPMethod parameter indicates the HTTP method used (GET, POST, etc.)
ConnectionID indicates the connection that sent the request and URI suggests the requested resource.
Set Allow to false to prevent the client from accessing the resource. The component will automatically send a "forbidden" status code (403).
Set a non-empty value to RedirectURI to notify the client that the resource has moved to another place. The component will automatically send a "found" status code (302). If Allow is set to false, the value of RedirectURI is ignored.
TLSCertValidate Event (HTTPServer Component)
Fires when a client certificate needs to be validated.
Syntax
type TTLSCertValidateEvent = procedure ( Sender: TObject; ConnectionID: Int64; var Accept: Boolean ) of Object;
property OnTLSCertValidate: TTLSCertValidateEvent read FOnTLSCertValidate write FOnTLSCertValidate;
Remarks
The component fires this event to notify the application of an authenticating client. Use the event handler to validate the certificate and pass your decision back to the server component via the Accept parameter.
TLSEstablished Event (HTTPServer Component)
Reports the setup of a TLS session.
Syntax
type TTLSEstablishedEvent = procedure ( Sender: TObject; ConnectionID: Int64 ) of Object;
property OnTLSEstablished: TTLSEstablishedEvent read FOnTLSEstablished write FOnTLSEstablished;
Remarks
Subscribe to this event to be notified about the setup of a TLS connection by a connected client.
TLSHandshake Event (HTTPServer Component)
Fires when a newly established client connection initiates a TLS handshake.
Syntax
type TTLSHandshakeEvent = procedure ( Sender: TObject; ConnectionID: Int64; const ServerName: String; var Abort: Boolean ) of Object;
property OnTLSHandshake: TTLSHandshakeEvent read FOnTLSHandshake write FOnTLSHandshake;
Remarks
Use this event to get notified about the initiation of the TLS handshake by the remote client. The ServerName parameter specifies the requested host from the client hello message.
TLSPSK Event (HTTPServer Component)
Requests a pre-shared key for TLS-PSK.
Syntax
type TTLSPSKEvent = procedure ( Sender: TObject; ConnectionID: Int64; const Identity: String; var PSK: String; var Ciphersuite: String ) of Object;
property OnTLSPSK: TTLSPSKEvent read FOnTLSPSK write FOnTLSPSK;
Remarks
The component fires this event to report that a client has requested a TLS-PSK negotiation. ConnectionId indicates the unique connection ID that requested the PSK handshake.
Use Identity to look up for the corresponding pre-shared key in the server's database, then assign the key to the PSK parameter. If TLS 1.3 PSK is used, you will also need to assign the Ciphersuite parameter with the ciphersuite associated with that identity and their key.
TLSShutdown Event (HTTPServer Component)
Reports closure of a TLS session.
Syntax
type TTLSShutdownEvent = procedure ( Sender: TObject; ConnectionID: Int64 ) of Object;
property OnTLSShutdown: TTLSShutdownEvent read FOnTLSShutdown write FOnTLSShutdown;
Remarks
The component fires this event when a connected client closes their TLS session gracefully. This event is typically followed by a Disconnect, which marks the closure of the underlying TCP session.
TraceRequest Event (HTTPServer Component)
Reports a TRACE request.
Syntax
type TTraceRequestEvent = procedure ( Sender: TObject; ConnectionID: Int64; const URI: String; var Handled: Boolean ) of Object;
property OnTraceRequest: TTraceRequestEvent read FOnTraceRequest write FOnTraceRequest;
Remarks
The component fires this event to notify the application about a TRACE request received from the client.
ConnectionID indicates the connection that sent the request and URI suggests the requested resource.
Set Handled to true to indicate that your application's code will take care of the request. The application does it by providing the necessary details via SetResponseStatus, SetResponseHeader, and SetResponseFile methods. If the returned value of Handled is false, the server will try to take care of the request automatically by searching for the requested resource in DocumentRoot.
Certificate Type
Provides details of an individual X.509 certificate.
Remarks
This type provides access to X.509 certificate details.
Fields
Bytes TBytes |
Returns raw certificate data in DER format. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
CA Boolean |
Indicates whether the certificate has a CA capability (a setting in BasicConstraints extension). |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
CAKeyID TBytes |
A unique identifier (fingerprint) of the CA certificate's private key. Authority Key Identifier is a (non-critical) X.509 certificate extension which allows the identification of certificates produced by the same issuer, but with different public keys. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
CRLDistributionPoints String |
Locations of the CRL (Certificate Revocation List) distribution points used to check this certificate's validity. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Curve String |
Specifies the elliptic curve of the EC public key.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Fingerprint TBytes |
Contains the fingerprint (a hash imprint) of this certificate. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
FriendlyName String |
Contains an associated alias (friendly name) of the certificate. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Handle Int64 |
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.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
HashAlgorithm String |
Specifies the hash algorithm to be used in the operations on the certificate (such as key signing)
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Issuer String |
The common name of the certificate issuer (CA), typically a company name. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
IssuerRDN String |
A collection of information, in the form of [OID, Value] pairs, uniquely identifying the certificate issuer. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
KeyAlgorithm String |
Specifies the public key algorithm of this certificate.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
KeyBits Integer |
Returns the length of the public key. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
KeyFingerprint TBytes |
Returns a fingerprint of the public key contained in the certificate. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
KeyUsage Integer |
Indicates the purposes of the key contained in the certificate, in the form of an OR'ed flag set. This value is a bit mask of the following values:
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
KeyValid Boolean |
Returns True if the certificate's key is cryptographically valid, and False otherwise. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
OCSPLocations String |
Locations of OCSP (Online Certificate Status Protocol) services that can be used to check this certificate's validity, as recorded by the CA. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
OCSPNoCheck Boolean |
Accessor to the value of the certificates ocsp-no-check extension. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Origin Integer |
Returns the origin of this certificate. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
PolicyIDs String |
Contains identifiers (OIDs) of the applicable certificate policies. The Certificate Policies extension identifies a sequence of policies under which the certificate has been issued, and which regulate its usage. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
PrivateKeyBytes TBytes |
Contains the certificate's private key. It is normal for this property to be empty if the private key is non-exportable. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
PrivateKeyExists Boolean |
Indicates whether the certificate has an associated private key. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
PrivateKeyExtractable Boolean |
Indicates whether the private key is extractable |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
PublicKeyBytes TBytes |
Contains the certificate's public key in DER format. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
QualifiedStatements TsbxQualifiedStatementsTypes |
Returns the qualified status of the certificate. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
SelfSigned Boolean |
Indicates whether the certificate is self-signed (root) or signed by an external CA. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
SerialNumber TBytes |
Returns the certificate's serial number. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
SigAlgorithm String |
Indicates the algorithm that was used by the CA to sign this certificate. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Subject String |
The common name of the certificate holder, typically an individual's name, a URL, an e-mail address, or a company name. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
SubjectAlternativeName String |
Returns or sets the value of the Subject Alternative Name extension of the certificate. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
SubjectKeyID TBytes |
Contains a unique identifier (fingerprint) of the certificate's private key. Subject Key Identifier is a (non-critical) X.509 certificate extension which allows the identification of certificates containing a particular public key. In SecureBlackbox, the unique identifier is represented with a SHA1 hash of the bit string of the subject public key. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
SubjectRDN String |
A collection of information, in the form of [OID, Value] pairs, uniquely identifying the certificate holder (subject). |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ValidFrom String |
The time point at which the certificate becomes valid, in UTC. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ValidTo String |
The time point at which the certificate expires, in UTC. |
Constructors
>
constructor Create();
Creates a new object with default field values.
ExternalCrypto Type
Specifies the parameters of external cryptographic calls.
Remarks
External cryptocalls are used in a Distributed Cryptography (DC) subsystem, which allows the delegation of security operations to the remote agent. For instance, it can be used to compute the signature value on the server, while retaining the client's private key locally.
Fields
AsyncDocumentID String |
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 pre-signing (SignAsyncBegin) and completion (SignAsyncEnd) stages. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
CustomParams String |
Custom parameters to be passed to the signing service (uninterpreted). |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Data String |
Additional data to be included in the async state and mirrored back by the requestor |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ExternalHashCalculation Boolean |
Specifies whether the message hash is to be calculated at the external endpoint. Please note that this mode is not supported by all components. In particular, components operating with larger objects (PDFSigner, CAdESSigner, XAdESSigner) do not support it. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
HashAlgorithm String |
Specifies the request's signature hash algorithm.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
KeyID String |
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 extra protection layer for the protocol and diminishes the risk of private key becoming abused by foreign parties. Use this property to provide the pre-shared key identifier, and use KeySecret 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:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
KeySecret String |
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 KeyID topic. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Method TsbxAsyncSignMethods |
Specifies the asynchronous signing method. This is typically defined by the DC server capabilities and setup. Available options:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Mode TsbxExternalCryptoModes |
Specifies the external cryptography mode. Available options:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
PublicKeyAlgorithm String |
Provide public key algorithm here if the certificate is not available on the pre-signing stage.
|
Constructors
>
constructor Create();
Creates a new ExternalCrypto object with default field values.
SocketSettings Type
A container for the socket settings.
Remarks
This type is a container for socket-layer parameters.
Fields
DNSMode TsbxDNSResolveModes |
Selects the DNS resolver to use: the component's (secure) built-in one, or the one provided by the system.
|
||||||||
DNSPort Integer |
Specifies the port number to be used for sending queries to the DNS server. |
||||||||
DNSQueryTimeout Integer |
The timeout (in milliseconds) for each DNS query. The value of 0 indicates the infinite timeout. |
||||||||
DNSServers String |
The addresses of DNS servers to use for address resolution, separated by commas or semicolons. |
||||||||
DNSTotalTimeout Integer |
The timeout (in milliseconds) for the whole resolution process. The value of 0 indicates the infinite timeout. |
||||||||
IncomingSpeedLimit Integer |
The maximum number of bytes to read from the socket, per second. |
||||||||
LocalAddress String |
The local network interface to bind the socket to. |
||||||||
LocalPort Integer |
The local port number to bind the socket to. |
||||||||
OutgoingSpeedLimit Integer |
The maximum number of bytes to write to the socket, per second. |
||||||||
Timeout Integer |
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). |
||||||||
UseIPv6 Boolean |
Enables or disables IP protocol version 6. |
Constructors
>
constructor Create();
Creates a new SocketSettings object.
TLSClientEntry Type
A container for a connected TLS client's details.
Remarks
Use this property to access the details of a particular connected client.
Fields
Address String |
The client's IP address. |
||||||||||||||||||||||||||||||||||||||||||||||||
ChainValidationDetails Integer |
The details of a certificate chain validation outcome. They may often suggest what reasons that contributed to the overall validation result. Returns a bit mask of the following options:
|
||||||||||||||||||||||||||||||||||||||||||||||||
ChainValidationResult TsbxChainValidities |
The outcome of a certificate chain validation routine. Available options:
Use the ValidationLog property to access the detailed validation log. |
||||||||||||||||||||||||||||||||||||||||||||||||
Ciphersuite String |
The cipher suite employed by this connection. For TLS connections, this property returns the ciphersuite that was/is employed by the connection. |
||||||||||||||||||||||||||||||||||||||||||||||||
ClientAuthenticated Boolean |
Specifies whether client authentication was performed during this connection. |
||||||||||||||||||||||||||||||||||||||||||||||||
DigestAlgorithm String |
The digest algorithm used in a TLS-enabled connection. |
||||||||||||||||||||||||||||||||||||||||||||||||
EncryptionAlgorithm String |
The symmetric encryption algorithm used in a TLS-enabled connection. |
||||||||||||||||||||||||||||||||||||||||||||||||
ID Int64 |
The client connection's unique identifier. This value is used throughout to refer to a particular client connection. |
||||||||||||||||||||||||||||||||||||||||||||||||
KeyExchangeAlgorithm String |
The key exchange algorithm used in a TLS-enabled connection. |
||||||||||||||||||||||||||||||||||||||||||||||||
KeyExchangeKeyBits Integer |
The length of the key exchange key of a TLS-enabled connection. |
||||||||||||||||||||||||||||||||||||||||||||||||
NamedECCurve String |
The elliptic curve used in this connection. |
||||||||||||||||||||||||||||||||||||||||||||||||
PFSCipher Boolean |
Indicates whether the chosen ciphersuite provides perfect forward secrecy (PFS). |
||||||||||||||||||||||||||||||||||||||||||||||||
Port Integer |
The remote port of the client connection. |
||||||||||||||||||||||||||||||||||||||||||||||||
PreSharedIdentity String |
Specifies the identity used when the PSK (Pre-Shared Key) key-exchange mechanism is negotiated. |
||||||||||||||||||||||||||||||||||||||||||||||||
PublicKeyBits Integer |
The length of the public key. |
||||||||||||||||||||||||||||||||||||||||||||||||
ResumedSession Boolean |
Indicates whether a TLS-enabled connection was spawned from another TLS connection |
||||||||||||||||||||||||||||||||||||||||||||||||
SecureConnection Boolean |
Indicates whether TLS or SSL is enabled for this connection. |
||||||||||||||||||||||||||||||||||||||||||||||||
SignatureAlgorithm String |
The signature algorithm used in a TLS handshake. |
||||||||||||||||||||||||||||||||||||||||||||||||
SymmetricBlockSize Integer |
The block size of the symmetric algorithm used. |
||||||||||||||||||||||||||||||||||||||||||||||||
SymmetricKeyBits Integer |
The key length of the symmetric algorithm used. |
||||||||||||||||||||||||||||||||||||||||||||||||
TotalBytesReceived Int64 |
The total number of bytes received over this connection. |
||||||||||||||||||||||||||||||||||||||||||||||||
TotalBytesSent Int64 |
The total number of bytes sent over this connection. |
||||||||||||||||||||||||||||||||||||||||||||||||
ValidationLog String |
Contains the server certificate's chain validation log. This information may be very useful in investigating chain validation failures. |
||||||||||||||||||||||||||||||||||||||||||||||||
Version String |
Indicates the version of SSL/TLS protocol negotiated during this connection. |
Constructors
>
constructor Create();
Creates a new TLSClientEntry object.
TLSSettings Type
A container for TLS connection settings.
Remarks
TLS (Transport Layer Security) protocol provides security for information exchanged over insecure connections such as TCP/IP.
Fields
AutoValidateCertificates Boolean |
Specifies whether server-side TLS certificates should be validated automatically using internal validation rules. |
|||||||||||||||||||||||||||||||||
BaseConfiguration TsbxSecureTransportPredefinedConfigurations |
Selects the base configuration for the TLS settings. Several profiles are on offer, tuned up for different purposes, such as high security or higher compatibility.
|
|||||||||||||||||||||||||||||||||
Ciphersuites String |
A list of ciphersuites separated with commas or semicolons. Each ciphersuite in the list may be prefixed with a minus sign (-) to indicate that the ciphersuite should be disabled rather than enabled. Besides the specific ciphersuite modifiers, this property supports the all (and -all) aliases that allow to blanketly enable or disable all ciphersuites at once. Note: the list of ciphersuites provided to this property alters the baseline list of ciphersuites as defined by BaseConfiguration. Remember to start your ciphersuite string with -all; if you need to only enable a specific fixed set of ciphersuites. The list of supported ciphersuites is provided below:
|
|||||||||||||||||||||||||||||||||
ECCurves String |
Defines the elliptic curves to enable. |
|||||||||||||||||||||||||||||||||
Extensions String |
Provides access to TLS extensions. |
|||||||||||||||||||||||||||||||||
ForceResumeIfDestinationChanges Boolean |
Whether to force TLS session resumption when the destination address changes. |
|||||||||||||||||||||||||||||||||
PreSharedIdentity String |
Defines the identity used when the PSK (Pre-Shared Key) key-exchange mechanism is negotiated. |
|||||||||||||||||||||||||||||||||
PreSharedKey String |
Contains the pre-shared for the PSK (Pre-Shared Key) key-exchange mechanism, encoded with base16. |
|||||||||||||||||||||||||||||||||
PreSharedKeyCiphersuite String |
Defines the ciphersuite used for PSK (Pre-Shared Key) negotiation. |
|||||||||||||||||||||||||||||||||
RenegotiationAttackPreventionMode TsbxRenegotiationAttackPreventionModes |
Selects renegotiation attack prevention mechanism. The following options are available:
|
|||||||||||||||||||||||||||||||||
RevocationCheck TsbxRevocationCheckKinds |
Specifies the kind(s) of revocation check to perform. Revocation checking is necessary to ensure the integrity of the chain and obtain up-to-date certificate validity and trustworthiness information.
This setting controls the way the revocation checks are performed. Typically certificates come with two types of revocation information sources: CRL (certificate revocation lists) and OCSP responders. CRLs are static objects periodically published by the CA at some online location. OCSP responders are active online services maintained by the CA that can provide up-to-date information on certificate statuses in near real time. There are some conceptual differences between the two. CRLs are normally larger in size. Their use involves some latency because there is normally some delay between the time when a certificate was revoked and the time the subsequent CRL mentioning that is published. The benefits of CRL is that the same object can provide statuses for all certificates issued by a particular CA, and that the whole technology is much simpler than OCSP (and thus is supported by more CAs). This setting lets you adjust the validation course by including or excluding certain types of revocation sources from the validation process. The crcAnyOCSPOrCRL setting (give preference to faster OCSP route and only demand one source to succeed) is a good choice for most of typical validation environments. The 'crcAll*' modes are much stricter, and may be used in scenarios where bulletproof validity information is essential. |
|||||||||||||||||||||||||||||||||
SSLOptions Integer |
Various SSL (TLS) protocol options, set of
|
|||||||||||||||||||||||||||||||||
TLSMode TsbxSSLModes |
Specifies the TLS mode to use.
|
|||||||||||||||||||||||||||||||||
UseExtendedMasterSecret Boolean |
Enables Extended Master Secret Extension, as defined in RFC 7627. |
|||||||||||||||||||||||||||||||||
UseSessionResumption Boolean |
Enables or disables TLS session resumption capability. |
|||||||||||||||||||||||||||||||||
Versions Integer |
Th SSL/TLS versions to enable by default.
|
Constructors
>
constructor Create();
Creates a new TLSSettings object.
UserAccount Type
A container for user account information.
Remarks
UserAccount objects are used to store user account information, such as logins and passwords.
Fields
AssociatedData TBytes |
Contains the user's Associated Data when SSH AEAD (Authenticated Encryption with Associated Data) algorithm is used. |
|||||||||
BasePath String |
Base path for this user in the server's file system. |
|||||||||
Cert TBytes |
Contains the user's certificate. |
|||||||||
Data String |
Contains uninterpreted user-defined data that should be associated with the user account, such as comments or custom settings. |
|||||||||
Handle Int64 |
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.
|
|||||||||
HashAlgorithm String |
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:
|
|||||||||
IncomingSpeedLimit Integer |
Specifies the incoming speed limit for this user. The value of 0 (zero) means "no limitation". |
|||||||||
OtpAlgorithm TsbxOTPAlgorithms |
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.
|
|||||||||
OtpValue Integer |
The user's time interval (TOTP) or Counter (HOTP). |
|||||||||
OutgoingSpeedLimit Integer |
Specifies the outgoing speed limit for this user. The value of 0 (zero) means "no limitation". |
|||||||||
Password String |
The user's authentication password. |
|||||||||
PasswordLen Integer |
Specifies the length of the user's OTP password. |
|||||||||
SharedSecret TBytes |
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. |
|||||||||
SSHKey TBytes |
Contains the user's SSH key. |
|||||||||
Username String |
The registered name (login) of the user. |
Constructors
>
constructor Create();
Creates a new UserAccount object.
Config Settings (HTTPServer Component)
The component 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 component, access to these internal properties is provided through the Config method.HTTPServer Config Settings | ||||||||||||||||||||||||||||||
AllowOptionsResponseWithoutAuth: Enables unauthenticated responses to OPTIONS requests.Set this property to true to allow the server serve OPTIONS requests without prior authentication of the client. | ||||||||||||||||||||||||||||||
ClientAuth:
Enables or disables certificate-based client authentication.Set this property to one of the below values to tune up the client authentication logic:
If this property is set to 1 or 2, the component will request certificates from the connecting clients. Depending on the setting, the clients that fail to provide their certificate in response will be allowed or disallowed to proceed with the connection. The server signals about a received certificate by firing its CertificateValidate event. Use PinClient method in the event handler to pin the client details, and access the provided certificate chain via the PinnedClientChain property. Note that this event is fired from the connecting clients threads, so please make sure you avoid bottlenecks in the event handler and put appropriate thread safety measures in place. Unlike the client-side components, the server component does not perform automated certificate validation against the local security policy. You must perform appropriate certificate validation steps in your CertificateValidate event handler. |
||||||||||||||||||||||||||||||
DualStack: Allows the use of ip4 and ip6 simultaneously.This setting specifies a socket can use ip4 and ip6 simultaneously. | ||||||||||||||||||||||||||||||
HomePage: Specifies the home page resource name.Use this property to specify the home page (/) resource name. | ||||||||||||||||||||||||||||||
Host: The host to bind to.Specifies a specific interface the server should listen on. | ||||||||||||||||||||||||||||||
RequestFilter: The request string modifier.Use this property to tune up the request string as returned by GetRequestString method. Supported filters: params (request parameters only), params[Index] or params['Name'] (a specific request parameter), parts[Index] (the contents of a particular part of a multipart message). An empty request filter makes GetRequestString return the whole body of the request. | ||||||||||||||||||||||||||||||
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. | ||||||||||||||||||||||||||||||
TempPath: Path for storing temporary files.This setting specifies an absolute path to the location on disk where temporary files are stored. | ||||||||||||||||||||||||||||||
WebsiteName: The website name for the TLS certificate.Assign this property with a name to put in a self-generated TLS certificate. | ||||||||||||||||||||||||||||||
Base Config Settings | ||||||||||||||||||||||||||||||
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 component.
Supported values are:
|
||||||||||||||||||||||||||||||
Cookies: Gets or sets local cookies for the component (supported for HTTPClient, RESTClient and SOAPClient only).Use this property to get cookies from the internal cookie storage of the component 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. | ||||||||||||||||||||||||||||||
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 components that have its CookieCaching property set to "global". | ||||||||||||||||||||||||||||||
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 components. | ||||||||||||||||||||||||||||||
LogDestination:
Specifies the debug log destination.Contains a comma-separated list of values that specifies where debug log should be dumped.
Supported values are:
|
||||||||||||||||||||||||||||||
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:
|
||||||||||||||||||||||||||||||
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:
|
||||||||||||||||||||||||||||||
LogFlushMode:
Specifies the log flush mode.Use this property to set the log flush mode. The following values are defined:
|
||||||||||||||||||||||||||||||
LogLevel:
Specifies the debug log level.Use this property to provide the desired debug log level.
Supported values are:
|
||||||||||||||||||||||||||||||
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:
|
||||||||||||||||||||||||||||||
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. | ||||||||||||||||||||||||||||||
StaticDNS:
Specifies whether static DNS rules should be used.Set this property to enable or disable static DNS rules for the component. Works only if UseOwnDNSResolver is set to true.
Supported values are:
|
||||||||||||||||||||||||||||||
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 component) 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 component is set to "local", the property returns/restores the rules from/to the internal storage of the component. If StaticDNS of the component 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. | ||||||||||||||||||||||||||||||
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. | ||||||||||||||||||||||||||||||
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. |
Trappable Errors (HTTPServer Component)
HTTPServer Errors
1048577 Invalid parameter value (SB_ERROR_INVALID_PARAMETER) | |
1048578 Component is configured incorrectly (SB_ERROR_INVALID_SETUP) | |
1048579 Operation cannot be executed in the current state (SB_ERROR_INVALID_STATE) | |
1048580 Attempt to set an invalid value to a property (SB_ERROR_INVALID_VALUE) | |
1048581 Certificate does not have its private key loaded (SB_ERROR_NO_PRIVATE_KEY) | |
1048581 Cancelled by the user (SB_ERROR_CANCELLED_BY_USER) | |
19922945 Unsupported keep-alive policy (SB_ERROR_HTTP_UNSUPPORTED_KEEPALIVEPOLICY) |