summaryrefslogtreecommitdiff
path: root/tests/utils.h
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2013-05-01 15:10:48 +0300
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2013-05-01 15:10:48 +0300
commite4c503763c743d70bf18fa911120da1d3ab86538 (patch)
tree3d3bc58983929e4df33c52219ad42456a69dc056 /tests/utils.h
parentc8e7cc4218b43a83806c7b7c164bfc52d1e00453 (diff)
downloadgnutls-e4c503763c743d70bf18fa911120da1d3ab86538.tar.gz
When running tests disable PKCS #11 support to avoid detecting memory leaks from PKCS #11 libraries.
Diffstat (limited to 'tests/utils.h')
-rw-r--r--tests/utils.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/utils.h b/tests/utils.h
index d34291e209..702e3b6ab1 100644
--- a/tests/utils.h
+++ b/tests/utils.h
@@ -26,6 +26,7 @@
#include <string.h>
#include <stdarg.h>
#include <gnutls/gnutls.h>
+#include <gnutls/pkcs11.h>
#ifndef __attribute__
#if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5)
@@ -33,6 +34,11 @@
#endif
#endif
+inline static int global_init(void) {
+ gnutls_pkcs11_init(GNUTLS_PKCS11_FLAG_MANUAL, NULL);
+ return gnutls_global_init();
+}
+
extern int debug;
extern int error_count;
extern int break_on_error;