Enable SSL for C/C++ SDK
To enable the SSL on the C/C++ Agent:
- Open your application to the file where you configure the Controller settings.
-
Set
const int CONTROLLER_USE_SSL = 1;
. -
In the
appd_config
struct, include the following method:appd_config_set_controller_use_ssl(cfg, CONTROLLER_USE_SSL);
- If you are using a self-signed certificate, you must do the following:
-
Get the Controller certificate by running the following command:
openssl s_client -connect <hostname>:<port> -showcerts < /dev/null | openssl x509 > cert.pem
-
Update the certificate_file
appd_config_set_controller_certificate_file(cfg, <Path to Cert File>);
-
Get the Controller certificate by running the following command:
-
You can check the
CommonName
by running the following command:openssl s_client -connect <CONTROLLER_HOST>:<CONTROLLER_PORT> -showcerts
TheCommonName
appears above the BEGIN CERTIFICATE line.The certificateCommonName
must match the Controller hostname. If they do not match, you must re-configure the certificate on the Controller.