Summary
The FlexNet Embedded SDK examples that send and receive messages over the network—such as the capability-request and metered examples—are configured to communicate with a server over HTTP.
In some cases, such as communications with FlexNet Operations On-Demand, it is necessary or desirable to communicate over HTTPS. This article describes how to modify the example code to use HTTPS instead of HTTP.
Windows Platforms
To modify the capability-request example to use HTTPS, open the capability request project in the build\capabilityrequest directory, open the source file CapabilityRequest.c, and locate the definition of the TalkToServer helper function.
In the definition of TalkToServer, locate the call to HttpOpenRequest, and add the flag INTERNET_FLAG_SECURE to the next-to-last argument. The call to HttpOpenRequest will then appear as follows:
hRequest = HttpOpenRequest(hConnect,
_T("POST"), /* verb */
serverDirectory, /* object name */
NULL, /* default version */
NULL, /* no referer */
NULL, /* access type, use default */
INTERNET_FLAG_DONT_CACHE | INTERNET_FLAG_SECURE,
0);
After building the example, you can run it using a command such as the following, where the port value 443 is the standard HTTPS port number:
capabilityrequest -server exampleuat.subscribenet.com 443 control/example/DeviceActivationService
Linux and Other Non-Windows Platforms
To modify the capability-request example to use HTTPS on non-Windows platforms, open the source file examples/client_samples/capability_request/CapabilityRequest.c and locate the definition of the TalkToServer helper function.
In the definition of TalkToServer, locate the series of calls to curl_easy_setopt and add the following, where the final argument is the location of the existing certificate store:
curl_easy_setopt(curl, CURLOPT_CAPATH, "/etc/ssl/certs");
As an alternative, you can use the CURLOPT_CAINFO flag and specify the path to a file (such as a PEM file) that contains a root certificate:
curl_easy_setopt(curl, CURLOPT_CAINFO, "path to file containing root certificate");
After building the example, you can run it using a command similar to the following, where the port value 443 is the standard HTTPS port number.
caprequest -server exampleuat.subscribenet.com 443 control/example/DeviceActivationServiceRelated Articles
Unable to use Git connector to create a new project on a GitLab instance 3Number of Views How to Subscribe to the Revenera Status Dashboard 12Number of Views Transfer of Entitlement from Source to Target Account : Without mappings,Splits 9Number of Views Vulnerability: CVE-2021-44832 Log4j vulnerability impact on FlexNet Publisher 20Number of Views CVE-2025-15467 Impact Assessment for FlexNet Embedded 6Number of Views
Hi, I am Reva - Ask me anything.
No new updates
Thanks for the feedback!
Your feedback has been saved.Rate this response:
Add Additional feedback ( Optional )
Are you sure you want to cancel
the case creation?
Are you sure you want to cancel the case creation?
Are you sure you want to close this case
| Products | Region | Phone Numbers |
|---|---|---|
| FlexNet Operations FlexNet Embedded FlexNet Publisher FlexNet Connect FlexNet Code Insight InstallAnywhere InstallShield |
North America * |
+1 630-332-2513 (toll) +1 877-279-2853 (toll-free in North America) |
| Europe * |
+44 1925 944367 (toll) +44 800 047 8642 (toll-free in Europe) |
|
| Japan * | +81 3-4540-5335 (select option 2) | |
| Australia * |
+61 3 9895 2177 +61 1800 560 603 (toll-free in Australia) |
|
|
Usage Intelligence (formerly
Revulytics) Compliance Intelligence |
Please use the Case Portal to submit your support ticket or reach out to your Revenera contact. | |
Case id: 00001065
Activity: Status change: 2 hours ago