x509asn1: unittests and fixes for gtime2str
authorStefan Eissing <stefan@eissing.org>
Tue, 30 Jul 2024 14:40:48 +0000 (16:40 +0200)
committerAquila Macedo Costa <aquilamacedo@riseup.net>
Tue, 17 Sep 2024 19:29:24 +0000 (16:29 -0300)
commitbdca57afbc48e0da742f8dd1831dcddc4065d35c
tree5511cc8b9c74252c26f0b4bad8a0581d6b6ed49b
parenta40e9a858b75f6357cb655c25c42f852a17e3f2d
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]