x509asn1: unittests and fixes for gtime2str
authorStefan Eissing <stefan@eissing.org>
Tue, 30 Jul 2024 14:40:48 +0000 (16:40 +0200)
committerCarlos Henrique Lima Melara <charlesmelara@riseup.net>
Sat, 17 Aug 2024 17:06:29 +0000 (14:06 -0300)
commitd7e6a5ef037f3e08ad024fcd3c14eb4b5a7acf9a
tree556b3b550095557e903851d3f7167504942f7dc1
parent5e8f2d5728c364cad10ad7b72fc7ff36ba8afb16
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]