x509asn1: unittests and fixes for gtime2str
authorStefan Eissing <stefan@eissing.org>
Tue, 30 Jul 2024 14:40:48 +0000 (16:40 +0200)
committerSamuel Henrique <samueloph@debian.org>
Fri, 8 May 2026 14:16:21 +0000 (07:16 -0700)
commit5cfa288d78883c4159d3982b442a9f576a57c115
tree35216a9e487c512476050908f9b99b7ab9ab32dc
parent49aaa017cf974f6e1361d0aea4c6ab0164d06605
x509asn1: unittests and fixes for gtime2str

Fix issues in GTime2str() and add unit test cases to verify correct
behaviour.

Follow-up to 3c914bc6801

Closes #14316

Backported to Debian by Carlos Henrique Lima Melara <charles@debian.org>.

Changes:
- In this version, GTime2str doesn't return CURLcode, so change that to NULL.
- Also change test helper function to match the correct type and pass the
  correct arguments. In this version, GTime2str doesn't take struct dynbuf *.
  It's aimed to not FTBFS if someone build the package with --enable-debug.

Gbp-Pq: Name CVE-2024-7264-1.patch
lib/vtls/x509asn1.c
lib/vtls/x509asn1.h
tests/data/Makefile.inc
tests/data/test1656 [new file with mode: 0644]
tests/unit/Makefile.inc
tests/unit/unit1656.c [new file with mode: 0644]