]>
git.ipfire.org Git - thirdparty/openssl.git/commit
Fix certificate read from stdin on Windows
On Windows, reading certificate from stdin could fail like
> type cert.der| openssl.exe x509 -inform DER -outform PEM
Could not find or decode certificate from <stdin>
The decoder already tries to insert BIO_f_readbuffer
in this case, unfortunately it depends on undefined behavior
of ftell() on Windows.
Fix it by adding check for non-seekable input case
to BIO file control.
Note, the added testcase tests binary input certificate,
but does not trigger this issue explicitly.
Fixes: https://github.com/openssl/openssl/issues/19508
Signed-off-by: Milan Broz <gmazyland@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.foundation>
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
MergeDate: Tue Mar 31 01:38:21 2026
(Merged from https://github.com/openssl/openssl/pull/30559)