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

Read-only notification of GnuTLS library development activities gnutls-devel at lists.gnutls.org
Fri Mar 10 04:10:10 CET 2023




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

> +{
> +#define DN_MAX_LEN (1024)
> +	gnutls_x509_crt_t crt;
> +	char *issuer = gnutls_malloc(DN_MAX_LEN);
> +	size_t issuer_size = DN_MAX_LEN;
> +	assert(gnutls_x509_crt_init(&crt) >= 0);
> +	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(memcmp(crl_issuer, issuer, strlen(crl_issuer)) == 0);

yeah,i will fix them all。

-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/-/merge_requests/1722#note_1308347087
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/20230310/653a2e18/attachment-0001.html>


More information about the Gnutls-devel mailing list