You are here

function hosting_ssl_filter_key in Hosting 7.3

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

Filter disallowed characters from a ssl certificate key.

Only lowercase alphanumeric- and '.', '_' or '-' characters are allowed for ssl keys.

3 calls to hosting_ssl_filter_key()
hook_hosting_site_options_alter in site/hosting_site.api.php
Alters which site options are available.
hosting_ssl_hosting_site_options_alter in web_server/ssl/hosting_ssl.nodeapi.inc
Implemensts hook_hosting_site_options_alter
hosting_ssl_nodeapi_site_validate in web_server/ssl/hosting_ssl.nodeapi.inc
Implements hook_nodeapi_TYPE_OP().

File

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

Code

function hosting_ssl_filter_key($key) {
  return strtolower(preg_replace("/[^\\w\\.\\-]/", "", $key));
}