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

Development of GNU's TLS library gnutls-devel at lists.gnutls.org
Tue Nov 20 13:52:45 CET 2018


Nikos Mavrogiannopoulos started a new discussion on lib/auth/cert.c:

> + * don't know how to select the correct one.
> + */
> +static int
> +find_rawpk_cert(gnutls_session_t session,
> +			const gnutls_certificate_credentials_t cred,
> +			const gnutls_pk_algorithm_t* pk_algos,
> +			int pk_algos_length, int* indx)
> +{
> +	unsigned i;
> +	gnutls_pk_algorithm_t pk;
> +
> +	*indx = -1;
> +
> +	// Traverse all certificate credentials
> +	for (i = 0; i < cred->ncerts; i++) {
> +		/* We know that our list length will be 1, therefore we can

If we know that the list will be one why is it checked below? If you worry about static analyzers I think that's the definition of using an `assert()`.

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


More information about the Gnutls-devel mailing list