[gnutls-devel] GnuTLS | _gnutls_verify_crt_status: apply algorithm checks to trusted CAs and other cert improvements (!1140)
Development of GNU's TLS library
gnutls-devel at lists.gnutls.org
Thu Dec 19 16:57:22 CET 2019
Tim Rühsen commented on a discussion on lib/x509/verify.c: https://gitlab.com/gnutls/gnutls/merge_requests/1140#note_263219693
> +unsigned check_ca_sanity(const gnutls_x509_crt_t issuer,
> + time_t now, unsigned int flags)
> +{
> + unsigned int status = 0;
> + unsigned sigalg;
> + int ret;
> +
> + /* explicit time check for trusted CA that we remove from
> + * list. GNUTLS_VERIFY_DISABLE_TRUSTED_TIME_CHECKS
> + */
> + if (!(flags & GNUTLS_VERIFY_DISABLE_TRUSTED_TIME_CHECKS) &&
> + !(flags & GNUTLS_VERIFY_DISABLE_TIME_CHECKS)) {
> + status |= check_time_status(issuer, now);
> + }
> +
> + ret =
Hm, that's the caveat when the return value has two meanings (status and algorithm). For non-trivial functions it might be better (readable/maintainable) to just return error and add an output param (gnutls_sign_algorithm_t *sigalg) (talking about `_gnutls_x509_get_signature_algorithm`).
But this shouldn't be a blocker for now.
--
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/merge_requests/1140#note_263219693
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/20191219/349c1aba/attachment-0001.html>
More information about the Gnutls-devel
mailing list