[gnutls-devel] GnuTLS | Amend error code when SNI name is not accepted (!891)

Development of GNU's TLS library gnutls-devel at lists.gnutls.org
Sat Jan 26 21:50:20 CET 2019


Tim Rühsen commented on a discussion on lib/ext/server_name.c:

>  			DECR_LEN(data_size, len);
>  
>  			if (type == 0) { /* NAME_DNS */
> -				if (!_gnutls_dnsname_is_valid((char*)p, len))
> -					return gnutls_assert_val(GNUTLS_E_RECEIVED_ILLEGAL_PARAMETER);
> +				if (!_gnutls_dnsname_is_valid((char*)p, len)) {
> +					_gnutls_handshake_log
> +					    ("HSK[%p]: Server name is not acceptable: '%.*s'\n",
> +					     session, (int) len, p);
> +					return gnutls_assert_val(GNUTLS_E_UNRECOGNIZED_NAME);

Added another commit to introduce GNUTLS_E_RECEIVED_UNRECOGNIZED_NAME. Please review.

-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/merge_requests/891#note_135297728
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/20190126/27e5a39b/attachment.html>


More information about the Gnutls-devel mailing list