diff --git a/phpseclib/File/X509.php b/phpseclib/File/X509.php index 07fd911d..428e677f 100644 --- a/phpseclib/File/X509.php +++ b/phpseclib/File/X509.php @@ -5148,7 +5148,7 @@ class File_X509 $temp = $str; } else { $temp = preg_replace('#.*?^-+[^-]+-+[\r\n ]*$#ms', '', $str, 1); - $temp = preg_replace('#-+END.*[\r\n ]*.*#ms', '', $str, 1); + $temp = preg_replace('#-+END.*[\r\n ]*.*#ms', '', $temp, 1); } // remove new lines $temp = str_replace(array("\r", "\n", ' '), '', $temp);