From 1abc7e742b55545104c1465670a11387ff37ecf9 Mon Sep 17 00:00:00 2001 From: terrafrost Date: Mon, 12 Nov 2012 23:51:41 -0600 Subject: [PATCH] X509: CSRs and CRLs didn't have the signatureSubject variable saved properly --- phpseclib/File/X509.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/phpseclib/File/X509.php b/phpseclib/File/X509.php index 0ef8edc2..81a22b38 100644 --- a/phpseclib/File/X509.php +++ b/phpseclib/File/X509.php @@ -2544,8 +2544,9 @@ class File_X509 { $temp = preg_replace('#^(?:[^-].+[\r\n]+)+|-.+-|[\r\n]| #', '', $csr); $temp = preg_match('#^[a-zA-Z\d/+]*={0,2}$#', $temp) ? base64_decode($temp) : false; if ($temp != false) { - $orig = $csr = $temp; + $csr = $temp; } + $orig = $csr; if ($csr === false) { $this->currentCert = false; @@ -2641,8 +2642,9 @@ class File_X509 { $temp = preg_replace('#^(?:[^-].+[\r\n]+)+|-.+-|[\r\n]| #', '', $csr); $temp = preg_match('#^[a-zA-Z\d/+]*={0,2}$#', $temp) ? base64_decode($temp) : false; if ($temp != false) { - $orig = $crl = $temp; + $crl = $temp; } + $orig = $crl; if ($crl === false) { $this->currentCert = false;