[gnutls-devel] GnuTLS | WIP: support non-NULL-terminated PSKs (!917)

Development of GNU's TLS library gnutls-devel at lists.gnutls.org
Tue Mar 5 09:16:54 CET 2019


Nikos Mavrogiannopoulos started a new discussion on tests/pskself2.c:

> +		close(sd);
> +		gnutls_deinit(session);
> +		fail("server: Handshake has failed (%s)\n\n",
> +		     gnutls_strerror(ret));
> +		return;
> +	}
> +
> +	if (debug) {
> +		success("server: Handshake was completed\n");
> +
> +		if (gnutls_psk_server_get_username2(session, &psk_username) < 0)
> +			fail("server: Could not get PSK username\n");
> +
> +		success("server: PSK username length: %d\n", psk_username.size);
> +	}
> +

It would be beneficial I think to check `gnutls_psk_server_get_username()` as well. I guess it should fail when called an the username has embedded null.

-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/merge_requests/917#note_147292245
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/20190305/4f6a8a8d/attachment-0001.html>


More information about the Gnutls-devel mailing list