X509: Enable printing cert even with invalid validity times, saying 'Bad time value'
authorDr. David von Oheimb <David.von.Oheimb@siemens.com>
Mon, 18 Jan 2021 16:18:03 +0000 (17:18 +0100)
committerDr. David von Oheimb <dev@ddvo.net>
Wed, 20 Jan 2021 14:55:58 +0000 (15:55 +0100)
commit63162e3d55e38aff51e243212bc73aa27bed8c4c
tree6f9d39af1c56abe22f354e749c1fcfa73768614e
parentb09aa550d3d9af269f9551a5a95a3d8408d9098d
X509: Enable printing cert even with invalid validity times, saying 'Bad time value'

Add internal asn1_time_print_ex() that can return success on invalid time.
This is a workaround for inconsistent error behavior of ASN1_TIME_print(),
used in X509_print_ex().

Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/13714)
crypto/asn1/a_time.c
crypto/x509/t_x509.c
include/crypto/asn1.h