[gnutls-devel] GnuTLS | libgnutls: Add system-wide default-priority-string override. (!1158)

Development of GNU's TLS library gnutls-devel at lists.gnutls.org
Fri Jan 10 15:23:46 CET 2020




Nikos Mavrogiannopoulos commented on a discussion on lib/priority.c: https://gitlab.com/gnutls/gnutls/merge_requests/1158#note_269787402

>  		if (ret < 0)
>  			return 0;
>  	} else if (c_strcasecmp(section, OVERRIDES_SECTION)==0) {
> -		if (c_strcasecmp(name, "insecure-hash")==0) {
> -			p = clear_spaces(value, str);
> +		if (c_strcasecmp(name, "default-priority-string")==0) {
> +			_clear_default_system_priority();
> +			p = clear_spaces(value, str, UINT_MAX);

May be obvious to you, but just to clarify the `MAX_ALGO_NAME` is used because that's the size of the `str` buffer. A 2k buffer looks fine to me as limit. In that case the original form of `clear_spaces()` may be more suitable, as it will allow a clever compiler or analyzer to catch overflows.

-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/merge_requests/1158#note_269787402
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/20200110/01159055/attachment-0001.html>


More information about the Gnutls-devel mailing list