[gnutls-devel] GnuTLS | tls13/psk_ext_parser: simplify the iterator interface (!736)

Development of GNU's TLS library gnutls-devel at lists.gnutls.org
Wed Aug 22 15:42:16 CEST 2018


Nikos Mavrogiannopoulos started a new discussion on lib/ext/pre_shared_key.c:

>  		}
>  	}
>  
> -	if (psk_index < 0)
> -		return 0;
> -
> -	ret = _gnutls13_psk_ext_parser_find_binder(&psk_parser, psk_index,
> -						   &binder_recvd);
> -	if (ret < 0) {
> -		gnutls_assert();
> -		goto fail;
> +	_gnutls13_psk_ext_iter_init(&psk_iter, &psk_parser);
> +	for (i = 0; i <= psk_index; i++) {

Seeing that code, I think a corner test case that is interesting is having a PSK structure which has 3 identities, and 2 binders while the 3rd identity is selected.

-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/merge_requests/736#note_96161397
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/20180822/75736cc3/attachment.html>


More information about the Gnutls-devel mailing list