@@ -46,7 +46,7 @@ void test_tls_psk_init(const char *pskfile)
void test_tls_psk_cleanup(const char *pskfile)
{
- unlink(pskfile);
+ g_remove(pskfile);
}
#endif /* QCRYPTO_HAVE_TLS_TEST_SUPPORT */
@@ -23,6 +23,8 @@
#include "crypto-tls-x509-helpers.h"
#include "crypto/init.h"
#include "qemu/sockets.h"
+#include <glib.h>
+#include <glib/gstdio.h>
#ifdef QCRYPTO_HAVE_TLS_TEST_SUPPORT
@@ -133,7 +135,7 @@ void test_tls_init(const char *keyfile)
void test_tls_cleanup(const char *keyfile)
{
asn1_delete_structure(&pkix_asn1);
- unlink(keyfile);
+ g_remove(keyfile);
}
/*
@@ -501,8 +503,108 @@ void test_tls_discard_cert(QCryptoTLSTestCertReq *req)
req->crt = NULL;
if (getenv("QEMU_TEST_DEBUG_CERTS") == NULL) {
- unlink(req->filename);
+ g_remove(req->filename);
}
}
+int qemu_link(const char *exist_path1, const char *new_path2)
+{
+#if defined(_WIN32)
+ g_autofree gchar *current_dir = g_get_current_dir();
+ g_autofree gchar *full_path = g_build_filename(current_dir, exist_path1, NULL);
+ return CreateSymbolicLinkA(
+ new_path2, full_path, 0 | SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE) ? 0 : -1;
+#else
+ return link(exist_path1, new_path2);
+#endif
+}
+
+#if defined(_WIN32)
+
+int qemu_socketpair(int family, int type, int protocol, int channel[2])
+{
+ struct addrinfo addr_data;
+ struct addrinfo *addr = NULL;
+ int sock_listener = -1;
+ int sock_client = -1;
+ int sock_server = -1;
+ int one = 1;
+
+ memset(&addr_data, 0, sizeof(addr_data));
+ addr_data.ai_family = AF_INET;
+ addr_data.ai_socktype = type;
+ addr_data.ai_protocol = protocol;
+ if (0 != getaddrinfo("127.0.0.1", "0", &addr_data, &addr)) {
+ goto error;
+ }
+
+ if (NULL == addr) {
+ goto error;
+ }
+
+ sock_listener = socket(addr->ai_family, addr->ai_socktype, addr->ai_protocol);
+ if (-1 == sock_listener) {
+ goto error;
+ }
+
+ if (-1 == setsockopt(sock_listener, SOL_SOCKET, SO_REUSEADDR, (const char *)&one, sizeof(one))) {
+ goto error;
+ }
+ if (-1 == bind(sock_listener, addr->ai_addr, addr->ai_addrlen)) {
+ goto error;
+ }
+ if (-1 == getsockname(sock_listener, addr->ai_addr, (int *)&(addr->ai_addrlen))) {
+ goto error;
+ }
+ if (-1 == listen(sock_listener, 1)) {
+ goto error;
+ }
+
+ sock_client = socket(addr->ai_family, addr->ai_socktype, addr->ai_protocol);
+
+ if (-1 == sock_client) {
+ goto error;
+ }
+
+ if (-1 == connect(sock_client, addr->ai_addr, addr->ai_addrlen)) {
+ goto error;
+ }
+
+ sock_server = accept(sock_listener, 0, 0);
+
+ if (-1 == sock_server) {
+ goto error;
+ }
+
+ closesocket(sock_listener);
+
+ channel[0] = sock_client;
+ channel[1] = sock_server;
+ return 0;
+
+error:
+ if (-1 != sock_server) {
+ closesocket(sock_server);
+ }
+ if (-1 != sock_client) {
+ closesocket(sock_client);
+ }
+ if (-1 != sock_listener) {
+ closesocket(sock_listener);
+ }
+ if (NULL != addr) {
+ freeaddrinfo(addr);
+ }
+ return -1;
+}
+
+#else
+
+int qemu_socketpair(int family, int type, int protocol, int recv[2])
+{
+ return socketpair(family, type, protocol, recv);
+}
+
+#endif
+
#endif /* QCRYPTO_HAVE_TLS_TEST_SUPPORT */
@@ -24,8 +24,9 @@
#include <gnutls/gnutls.h>
#include <gnutls/x509.h>
-#if !(defined WIN32) && \
- defined(CONFIG_TASN1)
+#include "qemu/osdep.h"
+
+#if defined(CONFIG_TASN1)
# define QCRYPTO_HAVE_TLS_TEST_SUPPORT
#endif
@@ -127,6 +128,10 @@ void test_tls_cleanup(const char *keyfile);
extern const ASN1_ARRAY_TYPE pkix_asn1_tab[];
+int qemu_link(const char *exist_path1, const char *new_path2);
+
+int qemu_socketpair(int family, int type, int protocol, int channel[2]);
+
#endif /* QCRYPTO_HAVE_TLS_TEST_SUPPORT */
#endif
@@ -25,6 +25,9 @@
#include "qapi/error.h"
#include "qemu/module.h"
+#include <glib.h>
+#include <glib/gstdio.h>
+
#ifdef QCRYPTO_HAVE_TLS_TEST_SUPPORT
#define WORKDIR "tests/test-crypto-tlscredsx509-work/"
@@ -77,34 +80,34 @@ static void test_tls_creds(const void *opaque)
QCryptoTLSCreds *creds;
#define CERT_DIR "tests/test-crypto-tlscredsx509-certs/"
- mkdir(CERT_DIR, 0700);
+ g_mkdir_with_parents(CERT_DIR, 0700);
- unlink(CERT_DIR QCRYPTO_TLS_CREDS_X509_CA_CERT);
+ g_remove (CERT_DIR QCRYPTO_TLS_CREDS_X509_CA_CERT);
if (data->isServer) {
- unlink(CERT_DIR QCRYPTO_TLS_CREDS_X509_SERVER_CERT);
- unlink(CERT_DIR QCRYPTO_TLS_CREDS_X509_SERVER_KEY);
+ g_remove (CERT_DIR QCRYPTO_TLS_CREDS_X509_SERVER_CERT);
+ g_remove (CERT_DIR QCRYPTO_TLS_CREDS_X509_SERVER_KEY);
} else {
- unlink(CERT_DIR QCRYPTO_TLS_CREDS_X509_CLIENT_CERT);
- unlink(CERT_DIR QCRYPTO_TLS_CREDS_X509_CLIENT_KEY);
+ g_remove (CERT_DIR QCRYPTO_TLS_CREDS_X509_CLIENT_CERT);
+ g_remove (CERT_DIR QCRYPTO_TLS_CREDS_X509_CLIENT_KEY);
}
- if (access(data->cacrt, R_OK) == 0) {
- g_assert(link(data->cacrt,
+ if (g_access(data->cacrt, R_OK) == 0) {
+ g_assert(qemu_link(data->cacrt,
CERT_DIR QCRYPTO_TLS_CREDS_X509_CA_CERT) == 0);
}
if (data->isServer) {
- if (access(data->crt, R_OK) == 0) {
- g_assert(link(data->crt,
+ if (g_access(data->crt, R_OK) == 0) {
+ g_assert(qemu_link(data->crt,
CERT_DIR QCRYPTO_TLS_CREDS_X509_SERVER_CERT) == 0);
}
- g_assert(link(KEYFILE,
+ g_assert(qemu_link(KEYFILE,
CERT_DIR QCRYPTO_TLS_CREDS_X509_SERVER_KEY) == 0);
} else {
- if (access(data->crt, R_OK) == 0) {
- g_assert(link(data->crt,
+ if (g_access(data->crt, R_OK) == 0) {
+ g_assert(qemu_link(data->crt,
CERT_DIR QCRYPTO_TLS_CREDS_X509_CLIENT_CERT) == 0);
}
- g_assert(link(KEYFILE,
+ g_assert(qemu_link(KEYFILE,
CERT_DIR QCRYPTO_TLS_CREDS_X509_CLIENT_KEY) == 0);
}
@@ -121,15 +124,15 @@ static void test_tls_creds(const void *opaque)
g_assert(creds != NULL);
}
- unlink(CERT_DIR QCRYPTO_TLS_CREDS_X509_CA_CERT);
+ g_remove(CERT_DIR QCRYPTO_TLS_CREDS_X509_CA_CERT);
if (data->isServer) {
- unlink(CERT_DIR QCRYPTO_TLS_CREDS_X509_SERVER_CERT);
- unlink(CERT_DIR QCRYPTO_TLS_CREDS_X509_SERVER_KEY);
+ g_remove(CERT_DIR QCRYPTO_TLS_CREDS_X509_SERVER_CERT);
+ g_remove(CERT_DIR QCRYPTO_TLS_CREDS_X509_SERVER_KEY);
} else {
- unlink(CERT_DIR QCRYPTO_TLS_CREDS_X509_CLIENT_CERT);
- unlink(CERT_DIR QCRYPTO_TLS_CREDS_X509_CLIENT_KEY);
+ g_remove(CERT_DIR QCRYPTO_TLS_CREDS_X509_CLIENT_CERT);
+ g_remove(CERT_DIR QCRYPTO_TLS_CREDS_X509_CLIENT_KEY);
}
- rmdir(CERT_DIR);
+ g_rmdir(CERT_DIR);
if (creds) {
object_unparent(OBJECT(creds));
}
@@ -143,7 +146,7 @@ int main(int argc, char **argv)
g_test_init(&argc, &argv, NULL);
g_setenv("GNUTLS_FORCE_FIPS_MODE", "2", 1);
- mkdir(WORKDIR, 0700);
+ g_mkdir_with_parents(WORKDIR, 0700);
test_tls_init(KEYFILE);
@@ -699,7 +702,7 @@ int main(int argc, char **argv)
test_tls_discard_cert(&cacertlevel2areq);
test_tls_discard_cert(&servercertlevel3areq);
test_tls_discard_cert(&clientcertlevel2breq);
- unlink(WORKDIR "cacertchain-ctx.pem");
+ g_remove(WORKDIR "cacertchain-ctx.pem");
test_tls_cleanup(KEYFILE);
rmdir(WORKDIR);
@@ -28,9 +28,13 @@
#include "qom/object_interfaces.h"
#include "qapi/error.h"
#include "qemu/module.h"
+#include "qemu/main-loop.h"
#include "qemu/sockets.h"
#include "authz/list.h"
+#include <glib.h>
+#include <glib/gstdio.h>
+
#ifdef QCRYPTO_HAVE_TLS_TEST_SUPPORT
#define WORKDIR "tests/test-crypto-tlssession-work/"
@@ -40,15 +44,16 @@
static ssize_t testWrite(const char *buf, size_t len, void *opaque)
{
int *fd = opaque;
-
- return write(*fd, buf, len);
+ int written = send(*fd, buf, len, 0);
+ return written;
}
static ssize_t testRead(char *buf, size_t len, void *opaque)
{
int *fd = opaque;
- return read(*fd, buf, len);
+ int readed = recv(*fd, buf, len, 0);
+ return readed;
}
static QCryptoTLSCreds *test_tls_creds_psk_create(
@@ -84,7 +89,7 @@ static void test_crypto_tls_session_psk(void)
int ret;
/* We'll use this for our fake client-server connection */
- ret = socketpair(AF_UNIX, SOCK_STREAM, 0, channel);
+ ret = qemu_socketpair(AF_UNIX, SOCK_STREAM, 0, channel);
g_assert(ret == 0);
/*
@@ -238,7 +243,7 @@ static void test_crypto_tls_session_x509(const void *opaque)
int ret;
/* We'll use this for our fake client-server connection */
- ret = socketpair(AF_UNIX, SOCK_STREAM, 0, channel);
+ ret = qemu_socketpair(AF_UNIX, SOCK_STREAM, 0, channel);
g_assert(ret == 0);
/*
@@ -251,29 +256,29 @@ static void test_crypto_tls_session_x509(const void *opaque)
#define CLIENT_CERT_DIR "tests/test-crypto-tlssession-client/"
#define SERVER_CERT_DIR "tests/test-crypto-tlssession-server/"
- mkdir(CLIENT_CERT_DIR, 0700);
- mkdir(SERVER_CERT_DIR, 0700);
+ g_mkdir_with_parents(CLIENT_CERT_DIR, 0700);
+ g_mkdir_with_parents(SERVER_CERT_DIR, 0700);
- unlink(SERVER_CERT_DIR QCRYPTO_TLS_CREDS_X509_CA_CERT);
- unlink(SERVER_CERT_DIR QCRYPTO_TLS_CREDS_X509_SERVER_CERT);
- unlink(SERVER_CERT_DIR QCRYPTO_TLS_CREDS_X509_SERVER_KEY);
+ g_remove(SERVER_CERT_DIR QCRYPTO_TLS_CREDS_X509_CA_CERT);
+ g_remove(SERVER_CERT_DIR QCRYPTO_TLS_CREDS_X509_SERVER_CERT);
+ g_remove(SERVER_CERT_DIR QCRYPTO_TLS_CREDS_X509_SERVER_KEY);
- unlink(CLIENT_CERT_DIR QCRYPTO_TLS_CREDS_X509_CA_CERT);
- unlink(CLIENT_CERT_DIR QCRYPTO_TLS_CREDS_X509_CLIENT_CERT);
- unlink(CLIENT_CERT_DIR QCRYPTO_TLS_CREDS_X509_CLIENT_KEY);
+ g_remove(CLIENT_CERT_DIR QCRYPTO_TLS_CREDS_X509_CA_CERT);
+ g_remove(CLIENT_CERT_DIR QCRYPTO_TLS_CREDS_X509_CLIENT_CERT);
+ g_remove(CLIENT_CERT_DIR QCRYPTO_TLS_CREDS_X509_CLIENT_KEY);
- g_assert(link(data->servercacrt,
+ g_assert(qemu_link(data->servercacrt,
SERVER_CERT_DIR QCRYPTO_TLS_CREDS_X509_CA_CERT) == 0);
- g_assert(link(data->servercrt,
+ g_assert(qemu_link(data->servercrt,
SERVER_CERT_DIR QCRYPTO_TLS_CREDS_X509_SERVER_CERT) == 0);
- g_assert(link(KEYFILE,
+ g_assert(qemu_link(KEYFILE,
SERVER_CERT_DIR QCRYPTO_TLS_CREDS_X509_SERVER_KEY) == 0);
- g_assert(link(data->clientcacrt,
+ g_assert(qemu_link(data->clientcacrt,
CLIENT_CERT_DIR QCRYPTO_TLS_CREDS_X509_CA_CERT) == 0);
- g_assert(link(data->clientcrt,
+ g_assert(qemu_link(data->clientcrt,
CLIENT_CERT_DIR QCRYPTO_TLS_CREDS_X509_CLIENT_CERT) == 0);
- g_assert(link(KEYFILE,
+ g_assert(qemu_link(KEYFILE,
CLIENT_CERT_DIR QCRYPTO_TLS_CREDS_X509_CLIENT_KEY) == 0);
clientCreds = test_tls_creds_x509_create(
@@ -369,16 +374,16 @@ static void test_crypto_tls_session_x509(const void *opaque)
g_assert(!data->expectClientFail);
}
- unlink(SERVER_CERT_DIR QCRYPTO_TLS_CREDS_X509_CA_CERT);
- unlink(SERVER_CERT_DIR QCRYPTO_TLS_CREDS_X509_SERVER_CERT);
- unlink(SERVER_CERT_DIR QCRYPTO_TLS_CREDS_X509_SERVER_KEY);
+ g_remove(SERVER_CERT_DIR QCRYPTO_TLS_CREDS_X509_CA_CERT);
+ g_remove(SERVER_CERT_DIR QCRYPTO_TLS_CREDS_X509_SERVER_CERT);
+ g_remove(SERVER_CERT_DIR QCRYPTO_TLS_CREDS_X509_SERVER_KEY);
- unlink(CLIENT_CERT_DIR QCRYPTO_TLS_CREDS_X509_CA_CERT);
- unlink(CLIENT_CERT_DIR QCRYPTO_TLS_CREDS_X509_CLIENT_CERT);
- unlink(CLIENT_CERT_DIR QCRYPTO_TLS_CREDS_X509_CLIENT_KEY);
+ g_remove(CLIENT_CERT_DIR QCRYPTO_TLS_CREDS_X509_CA_CERT);
+ g_remove(CLIENT_CERT_DIR QCRYPTO_TLS_CREDS_X509_CLIENT_CERT);
+ g_remove(CLIENT_CERT_DIR QCRYPTO_TLS_CREDS_X509_CLIENT_KEY);
- rmdir(CLIENT_CERT_DIR);
- rmdir(SERVER_CERT_DIR);
+ g_rmdir(CLIENT_CERT_DIR);
+ g_rmdir(SERVER_CERT_DIR);
object_unparent(OBJECT(serverCreds));
object_unparent(OBJECT(clientCreds));
@@ -397,10 +402,13 @@ int main(int argc, char **argv)
int ret;
module_call_init(MODULE_INIT_QOM);
+ qemu_init_main_loop(&error_abort);
+ socket_init();
+
g_test_init(&argc, &argv, NULL);
g_setenv("GNUTLS_FORCE_FIPS_MODE", "2", 1);
- mkdir(WORKDIR, 0700);
+ g_mkdir_with_parents(WORKDIR, 0700);
test_tls_init(KEYFILE);
test_tls_psk_init(PSKFILE);
@@ -640,11 +648,11 @@ int main(int argc, char **argv)
test_tls_discard_cert(&cacertlevel2areq);
test_tls_discard_cert(&servercertlevel3areq);
test_tls_discard_cert(&clientcertlevel2breq);
- unlink(WORKDIR "cacertchain-sess.pem");
+ g_remove(WORKDIR "cacertchain-sess.pem");
test_tls_psk_cleanup(PSKFILE);
test_tls_cleanup(KEYFILE);
- rmdir(WORKDIR);
+ g_rmdir(WORKDIR);
return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
}
@@ -31,9 +31,13 @@
#include "crypto/tlscredsx509.h"
#include "qapi/error.h"
#include "qemu/module.h"
+#include "qemu/main-loop.h"
#include "authz/list.h"
#include "qom/object_interfaces.h"
+#include <glib.h>
+#include <glib/gstdio.h>
+
#ifdef QCRYPTO_HAVE_TLS_TEST_SUPPORT
#define WORKDIR "tests/test-io-channel-tls-work/"
@@ -123,33 +127,33 @@ static void test_io_channel_tls(const void *opaque)
GMainContext *mainloop;
/* We'll use this for our fake client-server connection */
- g_assert(socketpair(AF_UNIX, SOCK_STREAM, 0, channel) == 0);
+ g_assert(qemu_socketpair(AF_UNIX, SOCK_STREAM, 0, channel) == 0);
#define CLIENT_CERT_DIR "tests/test-io-channel-tls-client/"
#define SERVER_CERT_DIR "tests/test-io-channel-tls-server/"
- mkdir(CLIENT_CERT_DIR, 0700);
- mkdir(SERVER_CERT_DIR, 0700);
+ g_mkdir(CLIENT_CERT_DIR, 0700);
+ g_mkdir(SERVER_CERT_DIR, 0700);
- unlink(SERVER_CERT_DIR QCRYPTO_TLS_CREDS_X509_CA_CERT);
- unlink(SERVER_CERT_DIR QCRYPTO_TLS_CREDS_X509_SERVER_CERT);
- unlink(SERVER_CERT_DIR QCRYPTO_TLS_CREDS_X509_SERVER_KEY);
+ g_remove(SERVER_CERT_DIR QCRYPTO_TLS_CREDS_X509_CA_CERT);
+ g_remove(SERVER_CERT_DIR QCRYPTO_TLS_CREDS_X509_SERVER_CERT);
+ g_remove(SERVER_CERT_DIR QCRYPTO_TLS_CREDS_X509_SERVER_KEY);
- unlink(CLIENT_CERT_DIR QCRYPTO_TLS_CREDS_X509_CA_CERT);
- unlink(CLIENT_CERT_DIR QCRYPTO_TLS_CREDS_X509_CLIENT_CERT);
- unlink(CLIENT_CERT_DIR QCRYPTO_TLS_CREDS_X509_CLIENT_KEY);
+ g_remove(CLIENT_CERT_DIR QCRYPTO_TLS_CREDS_X509_CA_CERT);
+ g_remove(CLIENT_CERT_DIR QCRYPTO_TLS_CREDS_X509_CLIENT_CERT);
+ g_remove(CLIENT_CERT_DIR QCRYPTO_TLS_CREDS_X509_CLIENT_KEY);
- g_assert(link(data->servercacrt,
+ g_assert(qemu_link(data->servercacrt,
SERVER_CERT_DIR QCRYPTO_TLS_CREDS_X509_CA_CERT) == 0);
- g_assert(link(data->servercrt,
+ g_assert(qemu_link(data->servercrt,
SERVER_CERT_DIR QCRYPTO_TLS_CREDS_X509_SERVER_CERT) == 0);
- g_assert(link(KEYFILE,
+ g_assert(qemu_link(KEYFILE,
SERVER_CERT_DIR QCRYPTO_TLS_CREDS_X509_SERVER_KEY) == 0);
- g_assert(link(data->clientcacrt,
+ g_assert(qemu_link(data->clientcacrt,
CLIENT_CERT_DIR QCRYPTO_TLS_CREDS_X509_CA_CERT) == 0);
- g_assert(link(data->clientcrt,
+ g_assert(qemu_link(data->clientcrt,
CLIENT_CERT_DIR QCRYPTO_TLS_CREDS_X509_CLIENT_CERT) == 0);
- g_assert(link(KEYFILE,
+ g_assert(qemu_link(KEYFILE,
CLIENT_CERT_DIR QCRYPTO_TLS_CREDS_X509_CLIENT_KEY) == 0);
clientCreds = test_tls_creds_create(
@@ -238,13 +242,13 @@ static void test_io_channel_tls(const void *opaque)
QIO_CHANNEL(serverChanTLS));
qio_channel_test_validate(test);
- unlink(SERVER_CERT_DIR QCRYPTO_TLS_CREDS_X509_CA_CERT);
- unlink(SERVER_CERT_DIR QCRYPTO_TLS_CREDS_X509_SERVER_CERT);
- unlink(SERVER_CERT_DIR QCRYPTO_TLS_CREDS_X509_SERVER_KEY);
+ g_remove(SERVER_CERT_DIR QCRYPTO_TLS_CREDS_X509_CA_CERT);
+ g_remove(SERVER_CERT_DIR QCRYPTO_TLS_CREDS_X509_SERVER_CERT);
+ g_remove(SERVER_CERT_DIR QCRYPTO_TLS_CREDS_X509_SERVER_KEY);
- unlink(CLIENT_CERT_DIR QCRYPTO_TLS_CREDS_X509_CA_CERT);
- unlink(CLIENT_CERT_DIR QCRYPTO_TLS_CREDS_X509_CLIENT_CERT);
- unlink(CLIENT_CERT_DIR QCRYPTO_TLS_CREDS_X509_CLIENT_KEY);
+ g_remove(CLIENT_CERT_DIR QCRYPTO_TLS_CREDS_X509_CA_CERT);
+ g_remove(CLIENT_CERT_DIR QCRYPTO_TLS_CREDS_X509_CLIENT_CERT);
+ g_remove(CLIENT_CERT_DIR QCRYPTO_TLS_CREDS_X509_CLIENT_KEY);
rmdir(CLIENT_CERT_DIR);
rmdir(SERVER_CERT_DIR);
@@ -272,10 +276,13 @@ int main(int argc, char **argv)
g_assert(qcrypto_init(NULL) == 0);
module_call_init(MODULE_INIT_QOM);
+ qemu_init_main_loop(&error_abort);
+ socket_init();
+
g_test_init(&argc, &argv, NULL);
g_setenv("GNUTLS_FORCE_FIPS_MODE", "2", 1);
- mkdir(WORKDIR, 0700);
+ g_mkdir(WORKDIR, 0700);
test_tls_init(KEYFILE);
Fixes following tests on msys2/mingw 'test-crypto-tlscredsx509' test-crypto-tlssession' 'test-io-channel-tls' These tests are failure with: ERROR test-crypto-tlscredsx509 - missing test plan ERROR test-crypto-tlssession - missing test plan ERROR test-io-channel-tls - missing test plan Because on win32 those test case are all disabled in the header Add qemu_socket_pair for cross platform support Convert file system handling functions to glib Add qemu_link function instead posix only link function. Use send ad recv from qemu that convert Windows Socks error to errno properly. Use g_remove instead unlink Use g_mkdir instead mkdir Signed-off-by: Yonggang Luo <luoyonggang@gmail.com> --- tests/crypto-tls-psk-helpers.c | 2 +- tests/crypto-tls-x509-helpers.c | 106 ++++++++++++++++++++++++++++++- tests/crypto-tls-x509-helpers.h | 9 ++- tests/test-crypto-tlscredsx509.c | 47 +++++++------- tests/test-crypto-tlssession.c | 68 +++++++++++--------- tests/test-io-channel-tls.c | 51 ++++++++------- 6 files changed, 204 insertions(+), 79 deletions(-)