For the complete documentation index, see llms.txt. This page is also available as Markdown.

Extended Configuration

LicenseSpring offers many features to tailor the setup to meet user needs through the Configuration and ExtendedOptions classes. Throughout this tutorial, we'll provide a comprehensive overview of these classes and how they are used to manage settings.

In addition to the theoretical understanding, this tutorial also offers practical guidance. You'll find instructions on how to set up a proxy, a crucial element in various software setups. We'll also cover the important topic of SSL checks, discussing their importance and how to integrate them effectively.

This tutorial will provide readers with a solid understanding of the Configuration and ExtendedOptions classes, acquired practical skills in configuring proxies, and obtained insights into enhancing security through SSL checks.

Swift SDK does not have separated ExtendedConfiguration: all properties are defined in the Configuration itself.

Accessing Current Configuration

The current configuration can be retrieved by calling currentConfig() on a LicenseManager instance in the C++ SDK:

configuration = licenseManager->currentConfig();

It is also possible to reconfigure the current configuration, rather than having to create a new Configuration object with:

reconfigure(configuration);

Network Information and Timeout

To activate the gathering of network information, you need to declare it during the configuration phase of the implementation, as follows:

extendedOptions.collectNetworkInfo(true);

Note: Network data collection is deactivated by default when left unset.

Whether network collection is enabled can be checked after configuration with:

bool enabled = extendedOptions.isCollectNetworkInfoEnabled();
//OR
bool enabled = configuration->isCollectNetworkInfoEnabled();

A variety of network-related information can be accessed through both ExtendedOptions and Configuration in C++ and Configuration in .NET.

In C++, a NetworkInfo object is returned when getNetworkInfo is called. The NetworkInfo object consists of the following:

  • IP address

  • MAC address

  • Host name

In .NET, the IP address, MAC address, and host name are stored separately in Configuration.

In the Python SDK, network information is managed within the Python Hardware (Device) IDs class, which is designed to be customizable. If a user prefers not to send network information, they can override the relevant method in the class to return None. This information can be accessed using the following:

Note: The above code snippet assumes that a Configuration object named "configuration" and ExtendedOptions object named "extendedOptions" already exist.

Override Network Information

C++ offers a method for overriding network information, setting the NetworkInfo object stored within ExtendedOptions:

Network Timeout

Similarly, the network timeout of the configuration is stored in the same locations, and can be accessed with:

Note: In C++, the network timeout is represented as a long, while in .NET, it is represented as an int.

Configuring the network timeout is equally straightforward, accomplished in a comparable manner:

The C++ SDK also allows to set and get the connection timeout, i.e. the value used for CURLOPT_CONNECTTIMEOUT. It defaults to 7 seconds.

Proxy Settings

Proxy settings are configuration parameters that allow you to route network traffic through an intermediary server, known as a proxy server. Proxy settings are another feature stored within ExtendedOptions and Configuration that can be accessed with:

Proxy settings can be set as follows:

In the Windows version of the C++ SDK, proxy settings can be automatically fetched through the WinHTTP API.

If the proxy is autoconfigured through a .pac file over the network, the SDK reads which proxy is used to reach api.licensespring.com or some other custom API URL.

Proxy credentials are read from Windows Credential Manager, and the caller needs to supply the exact Windows Credential target that holds the credentials:

Native Transport Layer Security

The C++ SDK offers the opportunity to enable or disable native TLS for curl.

The SDK uses Schannel as a native TLS provider for Windows, and non-native OpenSSL on other platforms. Before modifying the default settings of the SDK, it's crucial to have a clear understanding of the implications.

Make sure to consult the curl documentation for guidance:

SSL/TLS Documentation

Enable native TLS on Windows by running:

To later check for whether native TLS is being used:

Secure Sockets Layer Certificate Verification

Similar to native TLS, the C++ SDK allows developers to decide whether SSL certificate verification is to be enabled or disabled.

Note: By default, SSL certificate verification is enabled.

We strongly discourage disabling this option.

For more information, see the SSL Certificate Verification Documentation.

To disable SSL certificate verification:

There is also a checker for whether SSL certificate verification is enabled:

Last updated

Was this helpful?