mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-12-27 03:42:40 +00:00
X509: re-use existing BER extraction code
This commit is contained in:
parent
0149644210
commit
7b5542cc8a
@ -4041,9 +4041,7 @@ class File_X509 {
|
||||
}
|
||||
|
||||
// If in PEM format, convert to binary.
|
||||
if (preg_match('#^-----BEGIN #', $key)) {
|
||||
$key = base64_decode(preg_replace('#-.+-|[\r\n]#', '', $key));
|
||||
}
|
||||
$key = $this->_extractBER($key);
|
||||
|
||||
// Now we have the key string: compute its sha-1 sum.
|
||||
if (!class_exists('Crypt_Hash')) {
|
||||
|
Loading…
Reference in New Issue
Block a user