Calling qcrypto_init ensures that all relevant initialization is
done. In particular this honours the debugging settings and thread
settings.
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Tested-by: Philippe Mathieu-Daudé <[email protected]>
Signed-off-by: Daniel P. Berrangé <[email protected]>
#ifndef QCRYPTO_INIT_H
#define QCRYPTO_INIT_H
+#include "qapi/error.h"
+
int qcrypto_init(Error **errp);
#endif /* QCRYPTO_INIT_H */
#include "qemu/osdep.h"
#include "crypto-tls-x509-helpers.h"
+#include "crypto/init.h"
#include "qemu/sockets.h"
#ifdef QCRYPTO_HAVE_TLS_TEST_SUPPORT
void test_tls_init(const char *keyfile)
{
- gnutls_global_init();
+ qcrypto_init(&error_abort);
if (asn1_array2tree(pkix_asn1_tab, &pkix_asn1, NULL) != ASN1_SUCCESS) {
abort();