summaryrefslogtreecommitdiff
path: root/tests/x509cert.c
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2014-10-01 20:29:49 +0200
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2014-10-01 20:38:03 +0200
commitc571377dad7856174f95f30e8902e425a011bfb8 (patch)
tree9680c64c6fe62a93a5ae40d92c514aa46d4262cc /tests/x509cert.c
parent1fc2b04c68545f48c9ffbaebee8962499b94ccb5 (diff)
downloadgnutls-c571377dad7856174f95f30e8902e425a011bfb8.tar.gz
tests: added check for GNUTLS_TL_GET_COPY
Diffstat (limited to 'tests/x509cert.c')
-rw-r--r--tests/x509cert.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/x509cert.c b/tests/x509cert.c
index 670d4d23f6..5c56723de5 100644
--- a/tests/x509cert.c
+++ b/tests/x509cert.c
@@ -205,10 +205,16 @@ void doit(void)
if (ret < 0)
fail("gnutls_certificate_get_isser");
+ ret =
+ gnutls_certificate_get_issuer(x509_cred, list[0], &issuer, GNUTLS_TL_GET_COPY);
+ if (ret < 0)
+ fail("gnutls_certificate_get_isser");
+
dn_size = sizeof(dn);
ret = gnutls_x509_crt_get_dn(issuer, dn, &dn_size);
if (ret < 0)
fail("gnutls_certificate_get_isser");
+ gnutls_x509_crt_deinit(issuer);
if (debug)
fprintf(stderr, "Issuer's DN: %s\n", dn);