Related pages:

This page explains how to configure the C/C++ Agent to connect to the Controller using SSL.

To enable the SSL on the C/C++ Agent:

  1. Open your application to the file where you configure the Controller settings.
  2. Set const int CONTROLLER_USE_SSL = 1;
  3. In the appd_config struct, include the following method: 

     appd_config_set_controller_use_ssl(cfg, CONTROLLER_USE_SSL);
    CODE

If you are using a self-signed certificate, you must do the following:

  1. Get the Controller certificate by running the following command:

    openssl s_client -connect <hostname>:<port> -showcerts < /dev/null | openssl x509 > cert.pem
    CODE
  2. Update the certificate_file Controller setting to point to absolute path to certificate.

    appd_config_set_controller_certificate_file(cfg, <Path to Cert File>);
    CODE

Check the Certificate CommonName

The certificate CommonName must match the Controller hostname. If they do not match, you must re-configure the certificate on the Controller.

You can check the CommonName by running the following command: 

openssl s_client -connect <CONTROLLER_HOST>:<CONTROLLER_PORT> -showcerts
CODE

The CommonName appears above the BEGIN CERTIFICATE line.