Configure SSL options when connecting Drupal 7-based Devportal to Edge Management Server ( OPDK)

Target audience: customers for on-premises Drupal developer portal installs.

The Drupal developer portal uses the Guzzle library to communicate with Edge. Under the hood, Guzzle uses PHP's wrapper around libcurl to make HTTP/HTTPS calls. When using SSL/TLS, libcurl by default will use its own bundled cacert.pem. If you are trying to establish a connection to Edge using a self-signed certificate, a certificate chain with an intermediate certificate, or some other custom certificate arrangement, you will need to write code in a custom module to configure it. Here's how:

/**
 * Implements hook_devconnect_org_settings_alter().
 */
function MYMODULE_devconnect_org_settings_alter(array &$org_settings, $requested_org) {
  $org_settings['http_options']['cert'] = '/path/to/certfile.pem';
  $org_settings['http_options']['ssl_key'] = '/path/to/certfile.key';
}

You will need to substitute your own module name for MYMODULE, and specify the correct paths to your certificate and key.

Version history
Last update:
‎09-13-2019 04:11 PM
Updated by: