]> git.ipfire.org Git - thirdparty/openssl.git/commit
Open pem files in binary mode
authorJosh Cooper <joshcooper@users.noreply.github.com>
Wed, 16 Oct 2024 22:06:16 +0000 (15:06 -0700)
committerTomas Mraz <tomas@openssl.org>
Tue, 28 Jan 2025 19:57:14 +0000 (20:57 +0100)
commit4f20de0c8adc9cdcd1475155d467f66980915ab3
treef44ee258416584c284f0ddea141a0016e651d8df
parented3ce7545797e2c7202a6fcbf83c8bba3ead460d
Open pem files in binary mode

In order to avoid an MSVCRT bug affecting ftell and text mode[1], open PEM files
in binary mode. The PEM parser already handles CRLF translation[2].

[1] https://github.com/openssl/openssl/commit/8300a8742b2abc487594a09b5e6ee726dbd30771
[2] https://github.com/openssl/openssl/pull/24249#issuecomment-2192025429

Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/25716)
crypto/engine/eng_openssl.c
crypto/ts/ts_conf.c
crypto/x509/by_file.c