From 47be1efbd6cf7bac497778f261e5e7adc81f49b1 Mon Sep 17 00:00:00 2001 From: Nikos Mavrogiannopoulos Date: Sat, 22 Oct 2016 09:41:45 +0200 Subject: modified the gnutls_certificate_set_key* change While the change was fully backwards compatible for applications that were adding a single certificate, and applications that were checking for negative errors codes, many applications do not. As this may cause incompatibility issues with software properly utilizing the previously documented API, the change is reverted, and applications need to explicitly enable a flag (GNUTLS_CERTIFICATE_API_V2) in the credentials structure for the set_key functions to return an index. --- tests/set_x509_key.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tests/set_x509_key.c') diff --git a/tests/set_x509_key.c b/tests/set_x509_key.c index 306bcd0809..6a189540d9 100644 --- a/tests/set_x509_key.c +++ b/tests/set_x509_key.c @@ -156,6 +156,8 @@ static void basic(void) assert(gnutls_certificate_allocate_credentials(&clicred) >= 0); assert(gnutls_certificate_allocate_credentials(&x509_cred)>=0); + gnutls_certificate_set_flags(x509_cred, GNUTLS_CERTIFICATE_API_V2); + ret = gnutls_certificate_set_x509_trust_mem(clicred, &ca_cert, GNUTLS_X509_FMT_PEM); if (ret < 0) fail("set_x509_trust_file failed: %s\n", gnutls_strerror(ret)); -- cgit v1.2.1