aboutsummaryrefslogtreecommitdiff
path: root/tests/test-io-channel-tls.c
diff options
context:
space:
mode:
authorDaniel P. Berrange <berrange@redhat.com>2016-09-29 12:43:35 +0100
committerDaniel P. Berrange <berrange@redhat.com>2016-10-19 10:23:55 +0100
commitd26d6b5d34f825c452f9bf3c9d5126181b10f25b (patch)
tree12bf3ac59b3611dbff012010847bfc5b17e047b4 /tests/test-io-channel-tls.c
parent48b95ea4f0933c13d778c0478cb82bbfdd515981 (diff)
crypto: fix initialization of crypto in tests
The test-io-channel-tls test was missing a call to qcrypto_init and test-crypto-hash was initializing it multiple times, Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Diffstat (limited to 'tests/test-io-channel-tls.c')
-rw-r--r--tests/test-io-channel-tls.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/test-io-channel-tls.c b/tests/test-io-channel-tls.c
index 3c361a7bef..bd3ae2bf7a 100644
--- a/tests/test-io-channel-tls.c
+++ b/tests/test-io-channel-tls.c
@@ -27,6 +27,7 @@
#include "io/channel-tls.h"
#include "io/channel-socket.h"
#include "io-channel-helpers.h"
+#include "crypto/init.h"
#include "crypto/tlscredsx509.h"
#include "qemu/acl.h"
#include "qom/object_interfaces.h"
@@ -265,6 +266,8 @@ int main(int argc, char **argv)
{
int ret;
+ g_assert(qcrypto_init(NULL) == 0);
+
module_call_init(MODULE_INIT_QOM);
g_test_init(&argc, &argv, NULL);
setenv("GNUTLS_FORCE_FIPS_MODE", "2", 1);