From 2730cfc919ba94c5372eb041ae23cd56182fe7e5 Mon Sep 17 00:00:00 2001 From: Asanka Herath Date: Fri, 18 Jun 2010 17:25:23 -0400 Subject: [PATCH] lib/hcrypto/test_*: Use "rb" when opening binary files --- lib/hcrypto/test_engine_dso.c | 2 +- lib/hcrypto/test_rsa.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/hcrypto/test_engine_dso.c b/lib/hcrypto/test_engine_dso.c index f0cb7d417..e3d7d1bc5 100644 --- a/lib/hcrypto/test_engine_dso.c +++ b/lib/hcrypto/test_engine_dso.c @@ -199,7 +199,7 @@ main(int argc, char **argv) RSA *rsa; FILE *f; - f = fopen(rsa_flag, "r"); + f = fopen(rsa_flag, "rb"); if (f == NULL) err(1, "could not open file %s", rsa_flag); diff --git a/lib/hcrypto/test_rsa.c b/lib/hcrypto/test_rsa.c index 510f951b1..1f7c0efab 100644 --- a/lib/hcrypto/test_rsa.c +++ b/lib/hcrypto/test_rsa.c @@ -157,7 +157,7 @@ read_key(ENGINE *engine, const char *rsa_key) RSA *rsa; FILE *f; - f = fopen(rsa_key, "r"); + f = fopen(rsa_key, "rb"); if (f == NULL) err(1, "could not open file %s", rsa_key); rk_cloexec_file(f);