From 977951e96afd07705d9d88f733c7224810325da1 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Tue, 4 Sep 2012 11:28:33 +0200 Subject: [PATCH] pki: Open privkey file in binary mode. This is needed to correctly detect carriage return. --- src/pki.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pki.c b/src/pki.c index 73153ba5..af824ea6 100644 --- a/src/pki.c +++ b/src/pki.c @@ -434,7 +434,7 @@ int ssh_pki_import_privkey_file(const char *filename, return SSH_ERROR; } - file = fopen(filename, "r"); + file = fopen(filename, "rb"); if (file == NULL) { ssh_pki_log("Error opening %s: %s", filename, strerror(errno));