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

Development of GNU's TLS library gnutls-devel at lists.gnutls.org
Wed Jan 8 20:09:17 CET 2020




Ander Juaristi commented on a discussion on lib/auth/psk_passwd.c: https://gitlab.com/gnutls/gnutls/merge_requests/917#note_268804100

> +
> +static bool username_matches(const gnutls_datum_t *username,
> +			    const char *line, size_t line_size)
> +{
> +	int retval;
> +	unsigned i;
> +	gnutls_datum_t hexline, hex_username = { NULL, 0 };
> +
> +	/* move to first ':' */
> +	i = 0;
> +	while ((i < line_size) && (line[i] != '\0')
> +	       && (line[i] != ':')) {
> +		i++;
> +	}
> +
> +	if (line[0] == '#') {

Thank you, good catch. Fixed.

-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/merge_requests/917#note_268804100
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/20200108/05fa99ae/attachment-0001.html>


More information about the Gnutls-devel mailing list