[gnutls-devel] GnuTLS | Do not tolerate invalid DER time (!1141)
Development of GNU's TLS library
gnutls-devel at lists.gnutls.org
Tue Dec 24 15:42:28 CET 2019
Tim Rühsen started a new discussion on lib/x509/common.h: https://gitlab.com/gnutls/gnutls/merge_requests/1141#note_264703003
> inline static int _asn1_strict_der_decode (asn1_node * element, const void *ider,
> int len, char *errorDescription)
> {
> -#ifdef ASN1_DECODE_FLAG_ALLOW_INCORRECT_TIME
> -# define _ASN1_DER_FLAGS ASN1_DECODE_FLAG_ALLOW_INCORRECT_TIME|ASN1_DECODE_FLAG_STRICT_DER
> -#else
> +#if defined(STRICT_DER_TIME) || !defined(ASN1_DECODE_FLAG_ALLOW_INCORRECT_TIME)
> # define _ASN1_DER_FLAGS ASN1_DECODE_FLAG_STRICT_DER
> +#else
> +# define _ASN1_DER_FLAGS ASN1_DECODE_FLAG_ALLOW_INCORRECT_TIME|ASN1_DECODE_FLAG_STRICT_DER
Not MR related, but parenthesis around the #define value would be nice.
Else LGTM.
--
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/merge_requests/1141#note_264703003
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gnupg.org/pipermail/gnutls-devel/attachments/20191224/24f97353/attachment-0001.html>
More information about the Gnutls-devel
mailing list