[gnutls-devel] GnuTLS | update tlsfuzzer scripts to latest version (!774)

Development of GNU's TLS library gnutls-devel at lists.gnutls.org
Tue Oct 16 11:46:21 CEST 2018


Tom started a new discussion on lib/handshake.c:

> +		/* TLS1.2 or earlier, kx is associated with ciphersuite */
> +		kx = session->security_parameters.cs->kx_algorithm;
>  	}
>  
>  	if (kx) {
>  		session->security_parameters.server_auth_type = _gnutls_map_kx_get_cred(kx, 1);
>  		session->security_parameters.client_auth_type = _gnutls_map_kx_get_cred(kx, 0);
> -	} else if (session->internals.resumed == RESUME_FALSE) {
> -		return gnutls_assert_val(GNUTLS_E_INTERNAL_ERROR);
> +	} else if (unlikely(session->internals.resumed == RESUME_FALSE)) {
> +		/* Here we can only arrive if something we received
> +		 * prevented the session from completing. */
> +		return gnutls_assert_val(GNUTLS_E_ILLEGAL_PARAMETER);
>  	}
>  
>  	return 0;

Why not use `GNUTLS_E_SUCCESS` here as return value? Makes code more readable.

-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/merge_requests/774#note_109085859
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/20181016/6efd15f2/attachment.html>


More information about the Gnutls-devel mailing list