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