Skip to content

Commit

Permalink
mnet: Remove bogus XYZ prefixes from last commit MDL-8070
Browse files Browse the repository at this point in the history
  • Loading branch information
donal72 committed Jan 5, 2007
1 parent c97fffb commit 08cb427
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions mnet/environment.php
Expand Up @@ -87,8 +87,8 @@ function get_keypair() {
} }


if ($this->public_key_expires > time()) { if ($this->public_key_expires > time()) {
$this->keypair['privatekey'] = XYZopenssl_pkey_get_private($this->keypair['keypair_PEM']); $this->keypair['privatekey'] = openssl_pkey_get_private($this->keypair['keypair_PEM']);
$this->keypair['publickey'] = XYZopenssl_pkey_get_public($this->keypair['certificate']); $this->keypair['publickey'] = openssl_pkey_get_public($this->keypair['certificate']);
} else { } else {
// Key generation/rotation // Key generation/rotation


Expand Down Expand Up @@ -130,7 +130,7 @@ function replace_keys() {
$this->keypair = array(); $this->keypair = array();
$this->keypair = mnet_generate_keypair(); $this->keypair = mnet_generate_keypair();
$this->public_key = $this->keypair['certificate']; $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']; $this->public_key_expires = $details['validTo_time_t'];


set_config('openssl', implode('@@@@@@@@', $this->keypair), 'mnet'); set_config('openssl', implode('@@@@@@@@', $this->keypair), 'mnet');
Expand All @@ -141,14 +141,14 @@ function replace_keys() {
function get_private_key() { function get_private_key() {
if (empty($this->keypair)) $this->get_keypair(); if (empty($this->keypair)) $this->get_keypair();
if (isset($this->keypair['privatekey'])) return $this->keypair['privatekey']; 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']; return $this->keypair['privatekey'];
} }


function get_public_key() { function get_public_key() {
if (!isset($this->keypair)) $this->get_keypair(); if (!isset($this->keypair)) $this->get_keypair();
if (isset($this->keypair['publickey'])) return $this->keypair['publickey']; 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']; return $this->keypair['publickey'];
} }


Expand All @@ -157,7 +157,7 @@ function get_public_key() {
* signs the hash. * signs the hash.
*/ */
function sign_message($message) { function sign_message($message) {
$bool = XYZopenssl_sign($message, $signature, $this->get_private_key()); $bool = openssl_sign($message, $signature, $this->get_private_key());
return $signature; return $signature;
} }
} }
Expand Down

0 comments on commit 08cb427

Please sign in to comment.