]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
test/pkcs12_api_test.c: fix failure on MinGW
authorxtkoba <69125751+xtkoba@users.noreply.github.com>
Fri, 2 Sep 2022 07:44:17 +0000 (16:44 +0900)
committerTomas Mraz <tomas@openssl.org>
Mon, 5 Sep 2022 13:49:33 +0000 (15:49 +0200)
Use binary mode when opening a file.

Partially fixes #18017.

Reviewed-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19117)

test/pkcs12_api_test.c

index f3648706f69348a36be4b894c9aa8c8134c3a323..51976edea66b85d9896bcd3f78466c3a2befb089 100644 (file)
@@ -35,7 +35,7 @@ static PKCS12 *PKCS12_load(const char *fpath)
     BIO *bio = NULL;
     PKCS12 *p12 = NULL;
 
-    bio = BIO_new_file(fpath, "r");
+    bio = BIO_new_file(fpath, "rb");
     if (!TEST_ptr(bio))
         goto err;