[gnutls-devel] GnuTLS | add test for gnutls_certificate_set_x509_trust (!1740)

Read-only notification of GnuTLS library development activities gnutls-devel at lists.gnutls.org
Tue Apr 11 01:20:41 CEST 2023



Merge request https://gitlab.com/gnutls/gnutls/-/merge_requests/1740 was reviewed by Daiki Ueno

--
  
Daiki Ueno started a new discussion on tests/x509cert.c: https://gitlab.com/gnutls/gnutls/-/merge_requests/1740#note_1347422873

>  
> +	/* test for gnutls_certificate_set_x509_trust */
> +	global_init();

You could just move the above `gnutls_global_deinit()` to the bottom, instead of re-initializing the library.

--
  
Daiki Ueno started a new discussion on tests/x509cert.c: https://gitlab.com/gnutls/gnutls/-/merge_requests/1740#note_1347422882

> +					GNUTLS_X509_FMT_PEM,
> +					GNUTLS_X509_CRT_LIST_FAIL_IF_UNSORTED);
> +	if (ret < 0 || ret != (int)list_size) {

nit: I would write this way: `ret< 0 || (unsigned int)ret != list_size`, as `ret` (`int`) should be safely typecasted to `unsigned int` if it is non-negative.

--
  
Daiki Ueno started a new discussion on tests/x509cert.c: https://gitlab.com/gnutls/gnutls/-/merge_requests/1740#note_1347422897

> +	ret = gnutls_certificate_set_x509_trust(x509_cred, list, list_size);
> +	if (ret < 0 || ret != (int)list_size) {
> +		fail("gnutls_certificate_set_x509_trust");

`fail` does not add newline "\n"


-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/-/merge_requests/1740
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/20230410/b68e65c0/attachment-0001.html>


More information about the Gnutls-devel mailing list