1
0
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:
Andreas Schneider
2012-09-04 11:28:33 +02:00
parent 782b2e37c6
commit 977951e96a

View File

@@ -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));