]> git.ipfire.org Git - thirdparty/openssl.git/commit
Remove the ASN1_STRING_FLAG_X509_TIME flag master
authorBob Beck <beck@openssl.org>
Fri, 21 Nov 2025 00:06:11 +0000 (17:06 -0700)
committerNeil Horman <nhorman@openssl.org>
Sat, 3 Jan 2026 14:27:31 +0000 (09:27 -0500)
commit61c876198d6f48f146098c5b50ce110ff2b10e7e
tree2b17f2c03e3585a55a5cc2c95008a17782fcf300
parent441a2c105c7074502b0dc4ccd4aa2ed11d305556
Remove the ASN1_STRING_FLAG_X509_TIME flag

It's only use was to do some somewhat confused cruftery
inside of ossl_asn1_time_to_tm as a special case to
implement ASN1_TIME_set_string_X509.

As it turns out, you don't need the cruftery of a special
case inside of ossl_asn1_time_to_tm to implement this
function, so the flag is completely unnecessary.

This removes flag, and simplifies this to work without it.

It removes the cruft only from ossl_asn1_time_to_tm,
minimally. This function really needs some cleanup and
makes my eyes bleed but I am resisting the temptation
to do that with this PR and making this a the minimal
change needed for review. I will clean up that function
in a follow on pr.

As tests on the behaviour of ASN1_TIME_set_string_X509
were added with it, Beyonce dances happily for me and I
only need to pass the existing tests, not write as bunch
of new ones.. .

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/29187)
CHANGES.md
crypto/asn1/a_time.c
include/openssl/asn1.h.in