[gnutls-devel] GnuTLS | RFC7250 Raw public keys (!650)

Development of GNU's TLS library gnutls-devel at lists.gnutls.org
Wed Nov 21 17:15:00 CET 2018


Tom commented on a discussion on lib/auth/cert.c:

>  	 * then send that one.
>  	 */
>  	if (cred->ncerts == 1 &&
> -		(data_size == 0 || (session->internals.flags & GNUTLS_FORCE_CLIENT_CERT))) {
> +	    (data_size == 0
> +	     || (session->internals.flags & GNUTLS_FORCE_CLIENT_CERT))) {
> +		// Do a cert type check
> +		if (cred->certs[0].cert_list_length > 0 &&

Why do you think that? Can we be sure that `cert_list[0]` always exists? This check prevents a potential memory error.

-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/merge_requests/650#note_119127376
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/20181121/7fc4d433/attachment.html>


More information about the Gnutls-devel mailing list