WebSocketServer ConfigurationThe class accepts one or more of the following configuration settings. Configuration settings are similar in functionality to properties, but they are rarely used. In order to avoid "polluting" the property namespace of the class, access to these internal properties is provided through the Config method.
WebSocketServer Configuration 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.|
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.|
|TLSExtensions: Provides access to TLS extensions.This property provides access to TLS extensions before they are sent back to the client.|
|WebsiteName: The website name for the TLS certificate.Assign this property with a name to put in a self-generated TLS certificate.|
Base Configuration Settings
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.
Specifies whether a cookie cache should be used for HTTP(S) transports.Set this property to enable or disable cookies caching for the class.
Supported values are:
|Cookies: Gets or sets local cookies for the class (supported for HTTPClient, RESTClient and SOAPClient only).Use this property to get cookies from the internal cookie storage of the class and/or restore them back between application sessions.|
|DefDeriveKeyIterations: Specifies the default key derivation algorithm iteration count.This global property sets the default number of iterations for all supported key derivation algorithms. Note that you can provide the required number of iterations by using properties of the relevant key generation component; this global setting is used in scenarios where specific iteration count is not or cannot be provided.|
Enables or disables finite field DHE key exchange support in TLS clients.This global property enables or disables support for finite field DHE key exchange methods in TLS clients. FF DHE is a slower
algorithm if compared to EC DHE; enabling it may result in slower connections.
This setting only applies to sessions negotiated with TLS version 1.3.
|GlobalCookies: Gets or sets global cookies for all the HTTP transports.Use this property to get cookies from the GLOBAL cookie storage or restore them back between application sessions. These cookies will be used by all the classes that have its CookieCaching property set to "global".|
|HttpUserAgent: Specifies the user agent name to be used by all HTTP clients.This global setting defines the User-Agent field of the HTTP request provides information about the software that initiates the request. This value will be used by all the HTTP clients including the ones used internally in other classes.|
Specifies the debug log destination.Contains a comma-separated list of values that specifies where debug log should be dumped.
Supported values are:
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.|
Specifies the debug log filters.Contains a comma-separated list of value pairs ("name:value") that describe filters.
Supported filter names are:
Specifies the log flush mode.Use this property to set the log flush mode. The following values are defined:
Specifies the debug log level.Use this property to provide the desired debug log level.
Supported values are:
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.
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.|
|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.|
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.|