mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-08-08 19:02:06 +03:00
pki: Open privkey file in binary mode.
This is needed to correctly detect carriage return.
This commit is contained in:
@@ -434,7 +434,7 @@ int ssh_pki_import_privkey_file(const char *filename,
|
|||||||
return SSH_ERROR;
|
return SSH_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
file = fopen(filename, "r");
|
file = fopen(filename, "rb");
|
||||||
if (file == NULL) {
|
if (file == NULL) {
|
||||||
ssh_pki_log("Error opening %s: %s",
|
ssh_pki_log("Error opening %s: %s",
|
||||||
filename, strerror(errno));
|
filename, strerror(errno));
|
||||||
|
Reference in New Issue
Block a user