From 371890461adeff0bcc8d4986f666c59055bebc70 Mon Sep 17 00:00:00 2001 From: Paul Gardiner Date: Fri, 22 Dec 2017 15:11:38 +0000 Subject: Fix reading of pfx files We'd neglected to specify binary mode when opening the file. Possibly this affected only running under Windows. --- source/pdf/pdf-pkcs7.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/pdf/pdf-pkcs7.c b/source/pdf/pdf-pkcs7.c index 4526d5e9..7139156f 100644 --- a/source/pdf/pdf-pkcs7.c +++ b/source/pdf/pdf-pkcs7.c @@ -549,7 +549,7 @@ pdf_signer *pdf_read_pfx(fz_context *ctx, const char *pfile, const char *pw) ERR_clear_error(); - pfxbio = BIO_new_file(pfile, "r"); + pfxbio = BIO_new_file(pfile, "rb"); if (pfxbio == NULL) fz_throw(ctx, FZ_ERROR_GENERIC, "Can't open pfx file: %s", pfile); -- cgit v1.2.3