You are here

function hosting_ssl_get_key in Hosting 7.4

Same name and namespace in other branches
  1. 6.2 web_server/ssl/hosting_ssl.nodeapi.inc \hosting_ssl_get_key()
  2. 7.3 web_server/ssl/hosting_ssl.nodeapi.inc \hosting_ssl_get_key()

@todo Please document this function.

See also

http://drupal.org/node/1354

4 calls to hosting_ssl_get_key()
hosting_nginx_ssl_hosting_site_context_options in web_server/nginx/ssl/hosting_nginx_ssl.drush.inc
hosting_ssl_hosting_site_context_options in web_server/ssl/hosting_ssl.drush.inc
Implements hook_hosting_TASK_OBJECT_context_options().
hosting_ssl_nodeapi_site_view in web_server/ssl/hosting_ssl.nodeapi.inc
Implements hook_nodeapi_TYPE_OP().
hosting_ssl_output_key in web_server/ssl/hosting_ssl.nodeapi.inc
@todo Please document this function.

File

web_server/ssl/hosting_ssl.nodeapi.inc, line 152
NodeAPI functions for the Hosting SSL module.

Code

function hosting_ssl_get_key($cid) {
  static $cache = array();
  if (!isset($cache[$cid])) {
    $cache[$cid] = db_query("SELECT ssl_key FROM {hosting_ssl_cert} WHERE cid = :cid", array(
      ':cid' => $cid,
    ))
      ->fetchField();
  }
  return $cache[$cid];
}