}
if ($this->public_key_expires > time()) {
- $this->keypair['privatekey'] = XYZopenssl_pkey_get_private($this->keypair['keypair_PEM']);
- $this->keypair['publickey'] = XYZopenssl_pkey_get_public($this->keypair['certificate']);
+ $this->keypair['privatekey'] = openssl_pkey_get_private($this->keypair['keypair_PEM']);
+ $this->keypair['publickey'] = openssl_pkey_get_public($this->keypair['certificate']);
} else {
// Key generation/rotation
$this->keypair = array();
$this->keypair = mnet_generate_keypair();
$this->public_key = $this->keypair['certificate'];
- $details = XYZopenssl_x509_parse($this->public_key);
+ $details = openssl_x509_parse($this->public_key);
$this->public_key_expires = $details['validTo_time_t'];
set_config('openssl', implode('@@@@@@@@', $this->keypair), 'mnet');
function get_private_key() {
if (empty($this->keypair)) $this->get_keypair();
if (isset($this->keypair['privatekey'])) return $this->keypair['privatekey'];
- $this->keypair['privatekey'] = XYZopenssl_pkey_get_private($this->keypair['keypair_PEM']);
+ $this->keypair['privatekey'] = openssl_pkey_get_private($this->keypair['keypair_PEM']);
return $this->keypair['privatekey'];
}
function get_public_key() {
if (!isset($this->keypair)) $this->get_keypair();
if (isset($this->keypair['publickey'])) return $this->keypair['publickey'];
- $this->keypair['publickey'] = XYZopenssl_pkey_get_public($this->keypair['certificate']);
+ $this->keypair['publickey'] = openssl_pkey_get_public($this->keypair['certificate']);
return $this->keypair['publickey'];
}
* signs the hash.
*/
function sign_message($message) {
- $bool = XYZopenssl_sign($message, $signature, $this->get_private_key());
+ $bool = openssl_sign($message, $signature, $this->get_private_key());
return $signature;
}
}