[gnutls-devel] GnuTLS | gnutls_certificate_type_get*: ensure that the default type is returned (!806)

Development of GNU's TLS library gnutls-devel at lists.gnutls.org
Sun Nov 18 19:57:11 CET 2018


Nikos Mavrogiannopoulos commented on a discussion on tests/resume.c:

>  #if defined(USE_X509)
>  	unsigned int l;
>  
> +	if (gnutls_certificate_type_get(session) != GNUTLS_CRT_X509)
> +		fail("did not find the expected X509 certificate type! (%d)\n", gnutls_certificate_type_get(session));
> +
>  	if (counter == 0 && gnutls_certificate_get_ours(session) == NULL)
>  		fail("no certificate returned on server side (%s)\n", counter?"resumed session":"first session");

Why do you think that? I do not think that this is part of the [Linux kernel coding style/rules](https://www.kernel.org/doc/html/v4.10/process/coding-style.html). In particular it explicitly asks not to do that:

```
Do not add spaces around (inside) parenthesized expressions. This example is bad:

s = sizeof( struct file );
```

-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/merge_requests/806#note_118095262
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/20181118/ba50bbef/attachment.html>


More information about the Gnutls-devel mailing list