[gnutls-devel] GnuTLS | add CRL issuer get test (!1722)

Read-only notification of GnuTLS library development activities gnutls-devel at lists.gnutls.org
Mon Mar 13 03:01:53 CET 2023




xuraoqing commented on a discussion on tests/crl_apis.c: https://gitlab.com/gnutls/gnutls/-/merge_requests/1722#note_1310722165

> +	assert(gnutls_x509_crt_import(crt, issuer_cert, GNUTLS_X509_FMT_PEM) >=
> +	       0);
> +	assert(gnutls_x509_crt_get_issuer_dn(crt, issuer, &issuer_size) >= 0);
> +
> +	/* issuer check */
> +	char *crl_issuer = gnutls_malloc(DN_MAX_LEN);
> +	size_t crl_issuer_size = DN_MAX_LEN;
> +	assert(gnutls_x509_crl_get_issuer_dn(crl, crl_issuer, &crl_issuer_size)
> +	       == GNUTLS_E_SUCCESS);
> +	assert(crl_issuer_size == issuer_size
> +	       && memcmp(crl_issuer, issuer, issuer_size) == 0);
> +
> +	gnutls_datum_t dn;
> +	dn.data = NULL;
> +	dn.size = 0;
> +	memset(crl_issuer, 0, dn.size);

memset is not required,i will delete it.

-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/-/merge_requests/1722#note_1310722165
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/20230313/4f191b34/attachment-0001.html>


More information about the Gnutls-devel mailing list