Commit b038efbc authored by anarcat's avatar anarcat

send the IP address assigned to the certificate to the backend

we send no IP at all if SSL is not enabled
parent 7da35226
......@@ -13,5 +13,6 @@ function hosting_ssl_hosting_site_context_options(&$task) {
else {
$task->context_options['ssl_key'] = 'null';
}
$task->context_options['ip_address'] = hosting_ssl_get_ip($node->ssl_key);
}
}
......@@ -118,6 +118,10 @@ function hosting_ssl_get_key($cid) {
return $cache[$cid];
}
function hosting_ssl_get_ip($cid) {
return db_result(db_query("SELECT ips.ip_address FROM {hosting_ssl_cert_ips} cert INNER JOIN {hosting_ip_addresses} ips ON cert.cid = ips.cid WHERE cid=%d", $cid));
}
function hosting_ssl_output_key($cid) {
return filter_xss(hosting_ssl_get_key($cid));
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment