[gnutls-devel] GnuTLS | pkcs11: respect Mozilla's time-based distrust upon issuer lookup (!1725)

Read-only notification of GnuTLS library development activities gnutls-devel at lists.gnutls.org
Thu Mar 16 22:26:53 CET 2023




Daiki Ueno commented on a discussion on lib/pkcs11.c: https://gitlab.com/gnutls/gnutls/-/merge_requests/1725#note_1317686828

> +	static const struct {
> +		const char *oid;
> +		enum distrust_purpose purpose;
> +	} map[] = {
> +		{GNUTLS_KP_TLS_WWW_SERVER, PKCS11_DISTRUST_AFTER_SERVER},
> +		{GNUTLS_KP_EMAIL_PROTECTION, PKCS11_DISTRUST_AFTER_EMAIL},
> +	};
> +	size_t i;
> +
> +	for (i = 0; i < sizeof(map) / sizeof(map[0]); i++) {
> +		if (strcmp(map[i].oid, oid) == 0) {
> +			return map[i].purpose;
> +		}
> +	}
> +
> +	return PKCS11_DISTRUST_AFTER_EMAIL;

Good catch, fixed.

-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/-/merge_requests/1725#note_1317686828
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/20230316/5ca0c3ee/attachment.html>


More information about the Gnutls-devel mailing list