[gnutls-devel] GnuTLS | Decode certificate policies OIDs (!1245)

Development of GNU's TLS library gnutls-devel at lists.gnutls.org
Tue May 12 21:29:42 CEST 2020




Dmitry Baryshkov commented on a discussion on lib/x509/output.c: https://gitlab.com/gnutls/gnutls/-/merge_requests/1245#note_341241853

> +	ENTRY("1.2.643.100.113.5", "Russian security class KB2"),
> +	ENTRY("1.2.643.100.113.6", "Russian security class KA1"),
> +
> +	{NULL, 0, NULL, 0},
> +};
> +
> +static const char *_gnutls_x509_cp_oid_name(const char *oid)
> +{
> +	unsigned int i = 0;
> +	unsigned len = strlen(oid);
> +
> +	do {
> +		if ((cp_oid2str[i].oid_size == len) &&
> +			strcmp(cp_oid2str[i].oid, oid) == 0 && cp_oid2str[i].name_desc != NULL)
> +			return cp_oid2str[i].name_desc;
> +		i++;

For both of them: it was just a c&p from `lib/x509/common.h`. I'm thinking about reworking common code instead.

-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/-/merge_requests/1245#note_341241853
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/20200512/eb976e4a/attachment.html>


More information about the Gnutls-devel mailing list