[gnutls-devel] GnuTLS | Certificate type handling improvements (!1394)

Read-only notification of GnuTLS library development activities gnutls-devel at lists.gnutls.org
Sat Feb 27 19:22:56 CET 2021




Tom commented on a discussion on lib/ext/server_cert_type.c: https://gitlab.com/gnutls/gnutls/-/merge_requests/1394#note_518620453

>  						gnutls_buffer_st* data)
>  {
>  	int ret;
> -	uint8_t cert_type; // Holds an IANA cert type ID
> +	uint8_t cert_type_IANA; // Holds an IANA cert type ID
> +	uint8_t cert_types[GNUTLS_CRT_MAX]; // The list with supported (IANA) cert types. Inv: 0 <= cert type Id < 256
>  	uint8_t i = 0, num_cert_types = 0;
>  	priority_st* cert_priorities;
>  	gnutls_datum_t tmp_cert_types; // For type conversion

> I meant for readability; otherwise one would need to jump to the beginning of the function every time when she wants to know the type of a variable used in the middle of the function.

I don't think this is an issue anymore nowadays. A decent IDE solves this by displaying the variable types and by assisting by means of auto-complete ;-)

Nevertheless, I will change it.

-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/-/merge_requests/1394#note_518620453
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/20210227/1e868360/attachment.html>


More information about the Gnutls-devel mailing list