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>
Sat, 19 Jul 2025 19:04:59 +0000 (21:04 +0200)
commitbc35fb50db8c6fcf416674e9c740f2561d54bdd0
tree50b5308b6623db0a6ec670d3d4b889c2bce4f106
parent9936ca3f6be6ad37bb1bdb80f81876b54fd924b6
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]