mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-12-27 19:54:57 +00:00
RSA: ssh-keygen -yf private.key fails if \r is present
This commit is contained in:
parent
fc40727cfb
commit
3ef68bd912
@ -936,9 +936,9 @@ class Crypt_RSA
|
|||||||
);
|
);
|
||||||
$key = "openssh-key-v1\0$key";
|
$key = "openssh-key-v1\0$key";
|
||||||
|
|
||||||
return "-----BEGIN OPENSSH PRIVATE KEY-----\r\n" .
|
return "-----BEGIN OPENSSH PRIVATE KEY-----\n" .
|
||||||
chunk_split(base64_encode($key), 70) .
|
chunk_split(base64_encode($key), 70, "\n") .
|
||||||
"-----END OPENSSH PRIVATE KEY-----";
|
"-----END OPENSSH PRIVATE KEY-----\n";
|
||||||
default: // eg. CRYPT_RSA_PRIVATE_FORMAT_PKCS1
|
default: // eg. CRYPT_RSA_PRIVATE_FORMAT_PKCS1
|
||||||
$components = array();
|
$components = array();
|
||||||
foreach ($raw as $name => $value) {
|
foreach ($raw as $name => $value) {
|
||||||
|
Loading…
Reference in New Issue
Block a user