From c2ab2a4884f5d2ec47a54c02d6f75228d8300a06 Mon Sep 17 00:00:00 2001 From: terrafrost Date: Sun, 31 May 2020 02:11:44 -0500 Subject: [PATCH] X509: publicKey wasn't being loaded for CSRs / SPKACs --- phpseclib/File/X509.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/phpseclib/File/X509.php b/phpseclib/File/X509.php index 83cd6d23..8803fd7e 100644 --- a/phpseclib/File/X509.php +++ b/phpseclib/File/X509.php @@ -2194,12 +2194,12 @@ class X509 chunk_split(base64_encode($key), 64) . "-----END PUBLIC KEY-----"; - $this->publicKey = null; - $this->publicKey = $this->getPublicKey(); - $this->currentKeyIdentifier = null; $this->currentCert = $csr; + $this->publicKey = null; + $this->publicKey = $this->getPublicKey(); + return $csr; } @@ -2305,12 +2305,12 @@ class X509 chunk_split(base64_encode($key), 64) . "-----END PUBLIC KEY-----"; - $this->publicKey = null; - $this->publicKey = $this->getPublicKey(); - $this->currentKeyIdentifier = null; $this->currentCert = $spkac; + $this->publicKey = null; + $this->publicKey = $this->getPublicKey(); + return $spkac; }