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; }