summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/anonself.c4
-rw-r--r--tests/certder.c2
-rw-r--r--tests/certificate_set_x509_crl.c5
-rw-r--r--tests/certuniqueid.c2
-rw-r--r--tests/chainverify-unsorted.c2
-rw-r--r--tests/chainverify.c2
-rw-r--r--tests/crq_apis.c4
-rw-r--r--tests/crq_key_id.c4
-rw-r--r--tests/cve-2008-4989.c3
-rw-r--r--tests/cve-2009-1415.c3
-rw-r--r--tests/cve-2009-1416.c3
-rw-r--r--tests/dhepskself.c4
-rw-r--r--tests/dn.c2
-rw-r--r--tests/dn2.c2
-rw-r--r--tests/dtls/dtls-stress.c3
-rw-r--r--tests/gc.c2
-rw-r--r--tests/hostname-check.c4
-rw-r--r--tests/infoaccess.c4
-rw-r--r--tests/init_roundtrip.c8
-rw-r--r--tests/key-openssl.c4
-rw-r--r--tests/mini-alpn.c4
-rw-r--r--tests/mini-deflate.c2
-rw-r--r--tests/mini-dtls-heartbeat.c4
-rw-r--r--tests/mini-dtls-record.c4
-rw-r--r--tests/mini-dtls-rehandshake.c4
-rw-r--r--tests/mini-dtls-srtp.c4
-rw-r--r--tests/mini-eagain-dtls.c2
-rw-r--r--tests/mini-eagain.c2
-rw-r--r--tests/mini-emsgsize-dtls.c2
-rw-r--r--tests/mini-handshake-timeout.c4
-rw-r--r--tests/mini-loss-time.c4
-rw-r--r--tests/mini-record-range.c4
-rw-r--r--tests/mini-record.c4
-rw-r--r--tests/mini-rehandshake.c2
-rw-r--r--tests/mini-tdb.c2
-rw-r--r--tests/mini-termination.c4
-rw-r--r--tests/mini-x509-2.c2
-rw-r--r--tests/mini-x509-callbacks.c2
-rw-r--r--tests/mini-x509-cas.c2
-rw-r--r--tests/mini-x509.c2
-rw-r--r--tests/mini-xssl.c4
-rw-r--r--tests/mini.c2
-rw-r--r--tests/moredn.c2
-rw-r--r--tests/mpi.c2
-rw-r--r--tests/nul-in-x509-names.c4
-rw-r--r--tests/ocsp.c4
-rw-r--r--tests/openpgp-auth.c2
-rw-r--r--tests/openpgp-auth2.c2
-rw-r--r--tests/openpgp-keyring.c2
-rw-r--r--tests/openpgpself.c4
-rw-r--r--tests/openssl.c4
-rw-r--r--tests/parse_ca.c2
-rw-r--r--tests/pgps2kgnu.c5
-rw-r--r--tests/pkcs12_encode.c4
-rw-r--r--tests/pkcs12_s2k.c2
-rw-r--r--tests/pkcs12_s2k_pem.c3
-rw-r--r--tests/pkcs12_simple.c4
-rw-r--r--tests/pskself.c4
-rw-r--r--tests/resume-dtls.c4
-rw-r--r--tests/resume.c4
-rw-r--r--tests/rng-fork.c2
-rw-r--r--tests/rsa-encrypt-decrypt.c2
-rw-r--r--tests/safe-renegotiation/srn0.c2
-rw-r--r--tests/safe-renegotiation/srn1.c2
-rw-r--r--tests/safe-renegotiation/srn2.c2
-rw-r--r--tests/safe-renegotiation/srn3.c2
-rw-r--r--tests/safe-renegotiation/srn4.c2
-rw-r--r--tests/safe-renegotiation/srn5.c2
-rw-r--r--tests/set_pkcs12_cred.c4
-rw-r--r--tests/setcredcrash.c3
-rw-r--r--tests/slow/cipher-test.c3
-rw-r--r--tests/slow/gendh.c4
-rw-r--r--tests/slow/keygen.c4
-rw-r--r--tests/srp/mini-srp.c4
-rw-r--r--tests/suite/mini-eagain2.c3
-rw-r--r--tests/suite/mini-record-timing.c5
-rw-r--r--tests/utils.h6
-rw-r--r--tests/x509_altname.c2
-rw-r--r--tests/x509cert-tl.c2
-rw-r--r--tests/x509cert.c2
-rw-r--r--tests/x509dn.c4
-rw-r--r--tests/x509self.c4
-rw-r--r--tests/x509sign-verify.c2
83 files changed, 138 insertions, 121 deletions
diff --git a/tests/anonself.c b/tests/anonself.c
index e2085ac3a2..3aa8e6b406 100644
--- a/tests/anonself.c
+++ b/tests/anonself.c
@@ -64,7 +64,7 @@ client (void)
gnutls_anon_client_credentials_t anoncred;
/* Need to enable anonymous KX specifically. */
- gnutls_global_init ();
+ global_init ();
gnutls_global_set_log_function (tls_log_func);
if (debug)
@@ -249,7 +249,7 @@ server (void)
{
/* this must be called once in the program
*/
- gnutls_global_init ();
+ global_init ();
gnutls_global_set_log_function (tls_log_func);
if (debug)
diff --git a/tests/certder.c b/tests/certder.c
index 3a97d74bc6..9a902b03c2 100644
--- a/tests/certder.c
+++ b/tests/certder.c
@@ -293,7 +293,7 @@ doit (void)
gnutls_datum_t der3Cert = { der3, sizeof (der3) };
gnutls_x509_crt_t cert;
- ret = gnutls_global_init ();
+ ret = global_init ();
if (ret < 0)
fail ("init %d\n", ret);
diff --git a/tests/certificate_set_x509_crl.c b/tests/certificate_set_x509_crl.c
index b205860f07..5e76e79706 100644
--- a/tests/certificate_set_x509_crl.c
+++ b/tests/certificate_set_x509_crl.c
@@ -28,6 +28,7 @@
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
+#include <utils.h>
#include <gnutls/gnutls.h>
#include <gnutls/x509.h>
@@ -57,10 +58,10 @@ main (void)
gnutls_datum_t crldatum = { (uint8_t*)crl, strlen (crl) };
gnutls_x509_crl_t crl;
- rc = gnutls_global_init ();
+ rc = global_init ();
if (rc)
{
- printf ("gnutls_global_init rc %d: %s\n", rc, gnutls_strerror (rc));
+ printf ("global_init rc %d: %s\n", rc, gnutls_strerror (rc));
return 1;
}
diff --git a/tests/certuniqueid.c b/tests/certuniqueid.c
index 2faaf524aa..536ab0f849 100644
--- a/tests/certuniqueid.c
+++ b/tests/certuniqueid.c
@@ -147,7 +147,7 @@ doit (void)
char buf[17];
size_t buf_size;
- ret = gnutls_global_init ();
+ ret = global_init ();
if (ret < 0)
fail ("init %d\n", ret);
diff --git a/tests/chainverify-unsorted.c b/tests/chainverify-unsorted.c
index 354c16bd49..0c793f67eb 100644
--- a/tests/chainverify-unsorted.c
+++ b/tests/chainverify-unsorted.c
@@ -618,7 +618,7 @@ doit (void)
/* this must be called once in the program
*/
- gnutls_global_init ();
+ global_init ();
gnutls_global_set_time_function (mytime);
gnutls_global_set_log_function (tls_log_func);
diff --git a/tests/chainverify.c b/tests/chainverify.c
index 8e4c21de56..e7e51bbcc1 100644
--- a/tests/chainverify.c
+++ b/tests/chainverify.c
@@ -806,7 +806,7 @@ doit (void)
exit(77);
#endif
- ret = gnutls_global_init ();
+ ret = global_init ();
if (ret != 0)
{
fail ("%d: %s\n", ret, gnutls_strerror (ret));
diff --git a/tests/crq_apis.c b/tests/crq_apis.c
index 83ed6d962b..38233d7395 100644
--- a/tests/crq_apis.c
+++ b/tests/crq_apis.c
@@ -71,9 +71,9 @@ doit (void)
int ret;
- ret = gnutls_global_init ();
+ ret = global_init ();
if (ret < 0)
- fail ("gnutls_global_init\n");
+ fail ("global_init\n");
gnutls_global_set_log_function (tls_log_func);
if (debug)
diff --git a/tests/crq_key_id.c b/tests/crq_key_id.c
index 90f674d121..5fb14fd80b 100644
--- a/tests/crq_key_id.c
+++ b/tests/crq_key_id.c
@@ -56,9 +56,9 @@ doit (void)
int ret;
- ret = gnutls_global_init ();
+ ret = global_init ();
if (ret < 0)
- fail ("gnutls_global_init: %d\n", ret);
+ fail ("global_init: %d\n", ret);
gnutls_global_set_log_function (tls_log_func);
if (debug)
diff --git a/tests/cve-2008-4989.c b/tests/cve-2008-4989.c
index 20244f6ff8..3c672be645 100644
--- a/tests/cve-2008-4989.c
+++ b/tests/cve-2008-4989.c
@@ -28,6 +28,7 @@
#include <stdlib.h>
#include <error.h>
#include <string.h>
+#include <utils.h>
#include <gnutls/gnutls.h>
#include <gnutls/x509.h>
@@ -154,7 +155,7 @@ main (int argc, char *argv[])
size_t i;
unsigned int verify_status;
- ret = gnutls_global_init ();
+ ret = global_init ();
if (ret != 0)
{
printf ("%d: %s\n", ret, gnutls_strerror (ret));
diff --git a/tests/cve-2009-1415.c b/tests/cve-2009-1415.c
index 7e68ae90aa..f9b3d6c4e3 100644
--- a/tests/cve-2009-1415.c
+++ b/tests/cve-2009-1415.c
@@ -43,6 +43,7 @@
#include <stdio.h>
#include <stdarg.h>
#include <stdlib.h>
+#include <utils.h>
#include <gnutls/gnutls.h>
#include <gnutls/x509.h>
@@ -83,7 +84,7 @@ main (void)
gnutls_datum_t sig = { (void *) "bar", 3 };
int ret;
- gnutls_global_init ();
+ global_init ();
ret = gnutls_x509_crt_init (&crt);
if (ret < 0)
diff --git a/tests/cve-2009-1416.c b/tests/cve-2009-1416.c
index bb20b0c813..667e1958e0 100644
--- a/tests/cve-2009-1416.c
+++ b/tests/cve-2009-1416.c
@@ -41,6 +41,7 @@
#include <stdarg.h>
#include <stdlib.h>
#include <string.h>
+#include <utils.h>
#include <gnutls/gnutls.h>
#include <gnutls/x509.h>
@@ -52,7 +53,7 @@ main (void)
gnutls_datum_t p, q, g, y, x;
int ret;
- gnutls_global_init ();
+ global_init ();
ret = gnutls_x509_privkey_init (&key);
if (ret < 0)
diff --git a/tests/dhepskself.c b/tests/dhepskself.c
index 1c79fcc873..5ca7e999fe 100644
--- a/tests/dhepskself.c
+++ b/tests/dhepskself.c
@@ -64,7 +64,7 @@ client (void)
gnutls_psk_client_credentials_t pskcred;
const gnutls_datum_t key = { (void *) "DEADBEEF", 8 };
- gnutls_global_init ();
+ global_init ();
gnutls_global_set_log_function (tls_log_func);
if (debug)
@@ -258,7 +258,7 @@ server (void)
{
/* this must be called once in the program
*/
- gnutls_global_init ();
+ global_init ();
gnutls_global_set_log_function (tls_log_func);
if (debug)
diff --git a/tests/dn.c b/tests/dn.c
index 3c40b98052..e8e12c3ada 100644
--- a/tests/dn.c
+++ b/tests/dn.c
@@ -94,7 +94,7 @@ doit (void)
gnutls_x509_crt_t cert;
gnutls_x509_dn_t xdn;
- ret = gnutls_global_init ();
+ ret = global_init ();
if (ret < 0)
fail ("init %d\n", ret);
diff --git a/tests/dn2.c b/tests/dn2.c
index a8a4c6f512..a490c4dccb 100644
--- a/tests/dn2.c
+++ b/tests/dn2.c
@@ -74,7 +74,7 @@ doit (void)
gnutls_datum_t out;
int ret;
- ret = gnutls_global_init ();
+ ret = global_init ();
if (ret < 0)
fail ("init %d\n", ret);
diff --git a/tests/dtls/dtls-stress.c b/tests/dtls/dtls-stress.c
index 7bad75181c..86b4a687ed 100644
--- a/tests/dtls/dtls-stress.c
+++ b/tests/dtls/dtls-stress.c
@@ -84,6 +84,7 @@
#include <gnutls/openpgp.h>
#include <gnutls/dtls.h>
#include <unistd.h>
+#include <utils.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <netinet/in.h>
@@ -1124,7 +1125,7 @@ int main(int argc, const char* argv[])
}
setlinebuf(stdout);
- gnutls_global_init();
+ global_init();
cred_init();
gnutls_global_set_log_function(logfn);
gnutls_global_set_audit_log_function(auditfn);
diff --git a/tests/gc.c b/tests/gc.c
index dd3b2f6e73..1b7c144b22 100644
--- a/tests/gc.c
+++ b/tests/gc.c
@@ -46,7 +46,7 @@ doit (void)
int err;
/* XXX: We need this to fix secure memory. */
- gnutls_global_init ();
+ global_init ();
gnutls_global_set_log_function (tls_log_func);
if (debug)
gnutls_global_set_log_level (4711);
diff --git a/tests/hostname-check.c b/tests/hostname-check.c
index 50c87f3269..a9c421b855 100644
--- a/tests/hostname-check.c
+++ b/tests/hostname-check.c
@@ -642,9 +642,9 @@ doit (void)
gnutls_datum_t data;
int ret;
- ret = gnutls_global_init ();
+ ret = global_init ();
if (ret < 0)
- fail ("gnutls_global_init: %d\n", ret);
+ fail ("global_init: %d\n", ret);
ret = gnutls_x509_crt_init (&x509);
if (ret < 0)
diff --git a/tests/infoaccess.c b/tests/infoaccess.c
index 910e1dd783..2f7e79bb4f 100644
--- a/tests/infoaccess.c
+++ b/tests/infoaccess.c
@@ -80,10 +80,10 @@ doit (void)
gnutls_datum_t data;
unsigned int critical;
- ret = gnutls_global_init ();
+ ret = global_init ();
if (ret < 0)
{
- fail ("gnutls_global_init\n");
+ fail ("global_init\n");
exit (1);
}
diff --git a/tests/init_roundtrip.c b/tests/init_roundtrip.c
index 7ffa182804..c96dd50345 100644
--- a/tests/init_roundtrip.c
+++ b/tests/init_roundtrip.c
@@ -35,15 +35,15 @@ doit (void)
{
int res;
- res = gnutls_global_init ();
+ res = global_init ();
if (res != 0)
- fail ("gnutls_global_init\n");
+ fail ("global_init\n");
gnutls_global_deinit ();
- res = gnutls_global_init ();
+ res = global_init ();
if (res != 0)
- fail ("gnutls_global_init2\n");
+ fail ("global_init2\n");
gnutls_global_deinit ();
diff --git a/tests/key-openssl.c b/tests/key-openssl.c
index 02d174ed16..3d8fd51eb3 100644
--- a/tests/key-openssl.c
+++ b/tests/key-openssl.c
@@ -74,9 +74,9 @@ doit (void)
int ret;
gnutls_datum_t key;
- ret = gnutls_global_init ();
+ ret = global_init ();
if (ret < 0)
- fail ("gnutls_global_init: %d\n", ret);
+ fail ("global_init: %d\n", ret);
gnutls_global_set_log_function (tls_log_func);
if (debug)
diff --git a/tests/mini-alpn.c b/tests/mini-alpn.c
index 8bac7421a8..9f5ba1241d 100644
--- a/tests/mini-alpn.c
+++ b/tests/mini-alpn.c
@@ -79,7 +79,7 @@ client (int fd, const char* protocol1, const char* protocol2)
gnutls_anon_client_credentials_t anoncred;
/* Need to enable anonymous KX specifically. */
- gnutls_global_init ();
+ global_init ();
if (debug)
{
@@ -188,7 +188,7 @@ server (int fd, const char* protocol1, const char* protocol2)
/* this must be called once in the program
*/
- gnutls_global_init ();
+ global_init ();
if (debug)
{
diff --git a/tests/mini-deflate.c b/tests/mini-deflate.c
index 7ed3a99d4b..1be85bf77c 100644
--- a/tests/mini-deflate.c
+++ b/tests/mini-deflate.c
@@ -66,7 +66,7 @@ doit (void)
const char * str;
/* General init. */
- gnutls_global_init ();
+ global_init ();
gnutls_global_set_log_function (tls_log_func);
if (debug)
gnutls_global_set_log_level (4711);
diff --git a/tests/mini-dtls-heartbeat.c b/tests/mini-dtls-heartbeat.c
index b3d6affaa4..bc141472e8 100644
--- a/tests/mini-dtls-heartbeat.c
+++ b/tests/mini-dtls-heartbeat.c
@@ -84,7 +84,7 @@ client (int fd, int server_init)
gnutls_anon_client_credentials_t anoncred;
/* Need to enable anonymous KX specifically. */
- gnutls_global_init ();
+ global_init ();
if (debug)
{
@@ -235,7 +235,7 @@ server (int fd, int server_init)
gnutls_anon_server_credentials_t anoncred;
/* this must be called once in the program
*/
- gnutls_global_init ();
+ global_init ();
if (debug)
{
diff --git a/tests/mini-dtls-record.c b/tests/mini-dtls-record.c
index 0d41bea21c..19f12ac712 100644
--- a/tests/mini-dtls-record.c
+++ b/tests/mini-dtls-record.c
@@ -187,7 +187,7 @@ client (int fd)
/* Need to enable anonymous KX specifically. */
/* gnutls_global_set_audit_log_function (tls_audit_log_func); */
- gnutls_global_init ();
+ global_init ();
if (debug)
{
@@ -302,7 +302,7 @@ server (int fd)
ts.tv_sec = 0;
ts.tv_nsec = 100*1000*1000;
- gnutls_global_init ();
+ global_init ();
if (debug)
{
diff --git a/tests/mini-dtls-rehandshake.c b/tests/mini-dtls-rehandshake.c
index 7bd002b60b..93db731e22 100644
--- a/tests/mini-dtls-rehandshake.c
+++ b/tests/mini-dtls-rehandshake.c
@@ -89,7 +89,7 @@ client (int fd, int server_init)
gnutls_anon_client_credentials_t anoncred;
/* Need to enable anonymous KX specifically. */
- gnutls_global_init ();
+ global_init ();
if (debug)
{
@@ -241,7 +241,7 @@ int ret;
char buffer[MAX_BUF + 1];
/* this must be called once in the program
*/
- gnutls_global_init ();
+ global_init ();
if (debug)
{
diff --git a/tests/mini-dtls-srtp.c b/tests/mini-dtls-srtp.c
index 11bf746275..a26b00986c 100644
--- a/tests/mini-dtls-srtp.c
+++ b/tests/mini-dtls-srtp.c
@@ -84,7 +84,7 @@ client (int fd, int profile)
gnutls_datum_t cli_key, cli_salt, server_key, server_salt;
/* Need to enable anonymous KX specifically. */
- gnutls_global_init ();
+ global_init ();
if (debug)
{
@@ -208,7 +208,7 @@ server (int fd, int profile)
/* this must be called once in the program
*/
- gnutls_global_init ();
+ global_init ();
if (debug)
{
diff --git a/tests/mini-eagain-dtls.c b/tests/mini-eagain-dtls.c
index f6f65e9821..fe05621f17 100644
--- a/tests/mini-eagain-dtls.c
+++ b/tests/mini-eagain-dtls.c
@@ -65,7 +65,7 @@ doit (void)
int ret, transferred = 0, msglen;
/* General init. */
- gnutls_global_init ();
+ global_init ();
gnutls_global_set_log_function (tls_log_func);
if (debug)
gnutls_global_set_log_level (99);
diff --git a/tests/mini-eagain.c b/tests/mini-eagain.c
index ac25ffb77d..7d7d779c81 100644
--- a/tests/mini-eagain.c
+++ b/tests/mini-eagain.c
@@ -66,7 +66,7 @@ doit (void)
int ret, transferred = 0, msglen;
/* General init. */
- gnutls_global_init ();
+ global_init ();
gnutls_global_set_log_function (tls_log_func);
if (debug)
gnutls_global_set_log_level (2);
diff --git a/tests/mini-emsgsize-dtls.c b/tests/mini-emsgsize-dtls.c
index d7eacbd6e8..dadb82f085 100644
--- a/tests/mini-emsgsize-dtls.c
+++ b/tests/mini-emsgsize-dtls.c
@@ -112,7 +112,7 @@ doit (void)
int ret, transferred = 0, msglen;
/* General init. */
- gnutls_global_init ();
+ global_init ();
gnutls_global_set_log_function (tls_log_func);
if (debug)
gnutls_global_set_log_level (99);
diff --git a/tests/mini-handshake-timeout.c b/tests/mini-handshake-timeout.c
index ee4541bb2d..0b220097ab 100644
--- a/tests/mini-handshake-timeout.c
+++ b/tests/mini-handshake-timeout.c
@@ -75,7 +75,7 @@ client (int fd, int wait)
gnutls_session_t session;
/* Need to enable anonymous KX specifically. */
- gnutls_global_init ();
+ global_init ();
if (debug)
{
@@ -154,7 +154,7 @@ gnutls_anon_server_credentials_t anoncred;
/* this must be called once in the program
*/
- gnutls_global_init ();
+ global_init ();
if (debug)
{
diff --git a/tests/mini-loss-time.c b/tests/mini-loss-time.c
index c15b53ba68..fd6edeefe2 100644
--- a/tests/mini-loss-time.c
+++ b/tests/mini-loss-time.c
@@ -127,7 +127,7 @@ client (int fd, int packet)
gnutls_anon_client_credentials_t anoncred;
/* Need to enable anonymous KX specifically. */
- gnutls_global_init ();
+ global_init ();
if (debug)
{
@@ -211,7 +211,7 @@ server (int fd, int packet)
int ret;
/* this must be called once in the program
*/
- gnutls_global_init ();
+ global_init ();
if (debug)
{
diff --git a/tests/mini-record-range.c b/tests/mini-record-range.c
index a5a0c0190c..5d53d4aa51 100644
--- a/tests/mini-record-range.c
+++ b/tests/mini-record-range.c
@@ -139,7 +139,7 @@ client (int fd, const char* prio)
gnutls_session_t session;
/* Need to enable anonymous KX specifically. */
- gnutls_global_init ();
+ global_init ();
if (debug)
{
@@ -251,7 +251,7 @@ gnutls_range_st range;
/* this must be called once in the program
*/
- gnutls_global_init ();
+ global_init ();
memset(buffer, 0, sizeof(buffer));
if (debug)
diff --git a/tests/mini-record.c b/tests/mini-record.c
index 8843f37932..dc1881805c 100644
--- a/tests/mini-record.c
+++ b/tests/mini-record.c
@@ -167,7 +167,7 @@ client (int fd, const char* prio)
gnutls_session_t session;
/* Need to enable anonymous KX specifically. */
- gnutls_global_init ();
+ global_init ();
if (debug)
{
@@ -275,7 +275,7 @@ gnutls_certificate_credentials_t x509_cred;
/* this must be called once in the program
*/
- gnutls_global_init ();
+ global_init ();
memset(buffer, 0, sizeof(buffer));
if (debug)
diff --git a/tests/mini-rehandshake.c b/tests/mini-rehandshake.c
index a5dc9013ae..ad5f9b9f4f 100644
--- a/tests/mini-rehandshake.c
+++ b/tests/mini-rehandshake.c
@@ -95,7 +95,7 @@ doit (void)
int cret = GNUTLS_E_AGAIN;
/* General init. */
- gnutls_global_init ();
+ global_init ();
gnutls_global_set_log_function (tls_log_func);
if (debug)
gnutls_global_set_log_level (2);
diff --git a/tests/mini-tdb.c b/tests/mini-tdb.c
index d5e148d086..5f5f18ace1 100644
--- a/tests/mini-tdb.c
+++ b/tests/mini-tdb.c
@@ -91,7 +91,7 @@ void doit(void)
hash.size = sizeof(SHA1_HASH)-1;
/* General init. */
- gnutls_global_init ();
+ global_init ();
gnutls_global_set_log_function (tls_log_func);
if (debug)
gnutls_global_set_log_level (2);
diff --git a/tests/mini-termination.c b/tests/mini-termination.c
index 1dd0e02e40..f7c406feff 100644
--- a/tests/mini-termination.c
+++ b/tests/mini-termination.c
@@ -124,7 +124,7 @@ client (int fd, const char* prio)
gnutls_session_t session;
/* Need to enable anonymous KX specifically. */
- gnutls_global_init ();
+ global_init ();
if (debug)
{
@@ -241,7 +241,7 @@ gnutls_session_t session;
/* this must be called once in the program
*/
- gnutls_global_init ();
+ global_init ();
memset(buffer, 0, sizeof(buffer));
if (debug)
diff --git a/tests/mini-x509-2.c b/tests/mini-x509-2.c
index bb862e0dfc..c2ef127dc5 100644
--- a/tests/mini-x509-2.c
+++ b/tests/mini-x509-2.c
@@ -100,7 +100,7 @@ void doit(void)
gnutls_x509_privkey_t pkey;
/* General init. */
- gnutls_global_init ();
+ global_init ();
gnutls_global_set_log_function (tls_log_func);
if (debug)
gnutls_global_set_log_level (2);
diff --git a/tests/mini-x509-callbacks.c b/tests/mini-x509-callbacks.c
index 7671d0b722..3d7dac23ee 100644
--- a/tests/mini-x509-callbacks.c
+++ b/tests/mini-x509-callbacks.c
@@ -118,7 +118,7 @@ void doit(void)
int cret = GNUTLS_E_AGAIN;
/* General init. */
- gnutls_global_init ();
+ global_init ();
gnutls_global_set_log_function (tls_log_func);
if (debug)
gnutls_global_set_log_level (2);
diff --git a/tests/mini-x509-cas.c b/tests/mini-x509-cas.c
index 3e8b6ed068..e17c438507 100644
--- a/tests/mini-x509-cas.c
+++ b/tests/mini-x509-cas.c
@@ -98,7 +98,7 @@ void doit(void)
int cret = GNUTLS_E_AGAIN;
/* General init. */
- gnutls_global_init ();
+ global_init ();
gnutls_global_set_log_function (tls_log_func);
if (debug)
gnutls_global_set_log_level (2);
diff --git a/tests/mini-x509.c b/tests/mini-x509.c
index 5b581477ac..46d6639cf3 100644
--- a/tests/mini-x509.c
+++ b/tests/mini-x509.c
@@ -94,7 +94,7 @@ void doit(void)
int cret = GNUTLS_E_AGAIN;
/* General init. */
- gnutls_global_init ();
+ global_init ();
gnutls_global_set_log_function (tls_log_func);
if (debug)
gnutls_global_set_log_level (2);
diff --git a/tests/mini-xssl.c b/tests/mini-xssl.c
index e304e7aca9..399f1300c0 100644
--- a/tests/mini-xssl.c
+++ b/tests/mini-xssl.c
@@ -159,7 +159,7 @@ client (int fd, unsigned int vmethod, unsigned use_cert)
unsigned int status;
unsigned aux_size = 0;
- gnutls_global_init ();
+ global_init ();
gnutls_global_set_time_function (mytime);
if (debug)
@@ -268,7 +268,7 @@ server (int fd, unsigned vmethod)
gnutls_cinput_st aux[2];
unsigned aux_size = 0;
- gnutls_global_init ();
+ global_init ();
if (debug)
{
diff --git a/tests/mini.c b/tests/mini.c
index fa0b37b2b8..3fe48f5848 100644
--- a/tests/mini.c
+++ b/tests/mini.c
@@ -63,7 +63,7 @@ doit (void)
int ret, transferred = 0, msglen;
/* General init. */
- gnutls_global_init ();
+ global_init ();
gnutls_global_set_log_function (tls_log_func);
if (debug)
gnutls_global_set_log_level (4711);
diff --git a/tests/moredn.c b/tests/moredn.c
index 79bd70aaed..994a99522e 100644
--- a/tests/moredn.c
+++ b/tests/moredn.c
@@ -65,7 +65,7 @@ doit (void)
gnutls_datum_t datum;
int rv;
- gnutls_global_init ();
+ global_init ();
if (gnutls_x509_crt_init (&cert) != 0)
fail ("cert init failure\n");
diff --git a/tests/mpi.c b/tests/mpi.c
index ccc3c0c74f..3f7e0e725f 100644
--- a/tests/mpi.c
+++ b/tests/mpi.c
@@ -45,7 +45,7 @@ doit (void)
int rc;
bigint_t n1, n2, n3, n4;
- gnutls_global_init ();
+ global_init ();
gnutls_global_set_log_function (tls_log_func);
if (debug)
diff --git a/tests/nul-in-x509-names.c b/tests/nul-in-x509-names.c
index d5ebf7ace8..aac7594bc8 100644
--- a/tests/nul-in-x509-names.c
+++ b/tests/nul-in-x509-names.c
@@ -96,10 +96,10 @@ doit (void)
gnutls_x509_crt_t crt;
int ret;
- ret = gnutls_global_init ();
+ ret = global_init ();
if (ret < 0)
{
- fail ("gnutls_global_init");
+ fail ("global_init");
exit (1);
}
diff --git a/tests/ocsp.c b/tests/ocsp.c
index 8449923cbf..9354897382 100644
--- a/tests/ocsp.c
+++ b/tests/ocsp.c
@@ -1452,10 +1452,10 @@ doit (void)
{
int ret;
- ret = gnutls_global_init ();
+ ret = global_init ();
if (ret < 0)
{
- fail ("gnutls_global_init\n");
+ fail ("global_init\n");
exit (1);
}
diff --git a/tests/openpgp-auth.c b/tests/openpgp-auth.c
index 03bedca78e..d2a1e95f5f 100644
--- a/tests/openpgp-auth.c
+++ b/tests/openpgp-auth.c
@@ -74,7 +74,7 @@ doit ()
pid_t child;
char pub_key_path[512], priv_key_path[512];
- gnutls_global_init ();
+ global_init ();
srcdir = getenv ("srcdir") ? getenv ("srcdir") : ".";
diff --git a/tests/openpgp-auth2.c b/tests/openpgp-auth2.c
index 79a7ad9bef..9de1497d78 100644
--- a/tests/openpgp-auth2.c
+++ b/tests/openpgp-auth2.c
@@ -72,7 +72,7 @@ doit ()
char pub_key_path[512], priv_key_path[512];
pid_t child;
- gnutls_global_init ();
+ global_init ();
srcdir = getenv ("srcdir") ? getenv ("srcdir") : ".";
diff --git a/tests/openpgp-keyring.c b/tests/openpgp-keyring.c
index 51d093868e..c7423b8b7d 100644
--- a/tests/openpgp-keyring.c
+++ b/tests/openpgp-keyring.c
@@ -193,7 +193,7 @@ doit (void)
gnutls_datum_t data;
int ret;
- ret = gnutls_global_init ();
+ ret = global_init ();
if (ret < 0)
fail ("init %d\n", ret);
diff --git a/tests/openpgpself.c b/tests/openpgpself.c
index 1691190dd1..fb30229dd4 100644
--- a/tests/openpgpself.c
+++ b/tests/openpgpself.c
@@ -139,7 +139,7 @@ client (void)
char buffer[MAX_BUF + 1];
gnutls_certificate_credentials_t xcred;
- gnutls_global_init ();
+ global_init ();
gnutls_global_set_log_function (tls_log_func);
if (debug)
@@ -534,7 +534,7 @@ server (void)
int j;
/* this must be called once in the program
*/
- gnutls_global_init ();
+ global_init ();
gnutls_global_set_log_function (tls_log_func);
if (debug)
diff --git a/tests/openssl.c b/tests/openssl.c
index a11f9aa5ed..4ed15e6ca7 100644
--- a/tests/openssl.c
+++ b/tests/openssl.c
@@ -36,8 +36,8 @@ doit (void)
MD5_CTX c;
unsigned char md[MD5_DIGEST_LENGTH];
- if (gnutls_global_init () != 0)
- fail ("gnutls_global_init\n");
+ if (global_init () != 0)
+ fail ("global_init\n");
if (!gnutls_check_version (GNUTLS_VERSION))
success ("gnutls_check_version ERROR\n");
diff --git a/tests/parse_ca.c b/tests/parse_ca.c
index f4860633f4..f2d7b19e2f 100644
--- a/tests/parse_ca.c
+++ b/tests/parse_ca.c
@@ -62,7 +62,7 @@ doit (void)
gnutls_certificate_credentials_t cred;
gnutls_datum_t ca = { (unsigned char*)castr, sizeof (castr) };
- gnutls_global_init ();
+ global_init ();
rc = gnutls_certificate_allocate_credentials (&cred);
if (rc)
diff --git a/tests/pgps2kgnu.c b/tests/pgps2kgnu.c
index 0c646e9751..f777896582 100644
--- a/tests/pgps2kgnu.c
+++ b/tests/pgps2kgnu.c
@@ -32,6 +32,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <utils.h>
#include <gnutls/gnutls.h>
#include <gnutls/openpgp.h>
@@ -88,10 +89,10 @@ main (int argc, char** argv)
gnutls_global_set_log_level (9);
}
- rc = gnutls_global_init ();
+ rc = global_init ();
if (rc)
{
- printf ("gnutls_global_init rc %d: %s\n", rc, gnutls_strerror (rc));
+ printf ("global_init rc %d: %s\n", rc, gnutls_strerror (rc));
return 1;
}
diff --git a/tests/pkcs12_encode.c b/tests/pkcs12_encode.c
index 3d9e8e6210..632418396a 100644
--- a/tests/pkcs12_encode.c
+++ b/tests/pkcs12_encode.c
@@ -85,9 +85,9 @@ doit (void)
size_t size;
int i;
- ret = gnutls_global_init ();
+ ret = global_init ();
if (ret < 0)
- error (EXIT_FAILURE, 0, "gnutls_global_init %d", ret);
+ error (EXIT_FAILURE, 0, "global_init %d", ret);
gnutls_global_set_log_function (tls_log_func);
if (debug)
diff --git a/tests/pkcs12_s2k.c b/tests/pkcs12_s2k.c
index b6c83181e7..1275097c64 100644
--- a/tests/pkcs12_s2k.c
+++ b/tests/pkcs12_s2k.c
@@ -115,7 +115,7 @@ doit (void)
unsigned char key[32];
char tmp[1024];
- gnutls_global_init ();
+ global_init ();
gnutls_global_set_log_function (tls_log_func);
if (debug)
diff --git a/tests/pkcs12_s2k_pem.c b/tests/pkcs12_s2k_pem.c
index 6dbc9fa205..c7a22228a1 100644
--- a/tests/pkcs12_s2k_pem.c
+++ b/tests/pkcs12_s2k_pem.c
@@ -34,6 +34,7 @@
#include <stdarg.h>
#include <stdlib.h>
#include <string.h>
+#include <utils.h>
#include <gnutls/gnutls.h>
#include <gnutls/x509.h>
@@ -265,7 +266,7 @@ main (void)
size_t i;
int ret;
- gnutls_global_init ();
+ global_init ();
for (i = 0; i < sizeof (keys) / sizeof (keys[0]); i++)
{
diff --git a/tests/pkcs12_simple.c b/tests/pkcs12_simple.c
index 03330528f5..61618f4c9a 100644
--- a/tests/pkcs12_simple.c
+++ b/tests/pkcs12_simple.c
@@ -50,9 +50,9 @@ doit (void)
gnutls_x509_privkey_t pkey;
int ret;
- ret = gnutls_global_init ();
+ ret = global_init ();
if (ret < 0)
- fail ("gnutls_global_init failed %d\n", ret);
+ fail ("global_init failed %d\n", ret);
gnutls_global_set_log_function (tls_log_func);
if (debug)
diff --git a/tests/pskself.c b/tests/pskself.c
index f6eed94c69..aa698dfd73 100644
--- a/tests/pskself.c
+++ b/tests/pskself.c
@@ -67,7 +67,7 @@ client (void)
/* Need to enable anonymous KX specifically. */
const gnutls_datum_t key = { (void *) "DEADBEEF", 8 };
- gnutls_global_init ();
+ global_init ();
gnutls_global_set_log_function (tls_log_func);
if (debug)
gnutls_global_set_log_level (4711);
@@ -249,7 +249,7 @@ server (void)
{
/* this must be called once in the program
*/
- gnutls_global_init ();
+ global_init ();
gnutls_global_set_log_function (tls_log_func);
if (debug)
gnutls_global_set_log_level (4711);
diff --git a/tests/resume-dtls.c b/tests/resume-dtls.c
index 3e56645a7e..7fbe7b0185 100644
--- a/tests/resume-dtls.c
+++ b/tests/resume-dtls.c
@@ -110,7 +110,7 @@ client (struct params_res *params)
gnutls_global_set_log_function (tls_log_func);
gnutls_global_set_log_level (2);
}
- gnutls_global_init ();
+ global_init ();
gnutls_anon_allocate_client_credentials (&anoncred);
@@ -368,7 +368,7 @@ server (struct params_res *params)
gnutls_global_set_log_level (2);
}
- gnutls_global_init ();
+ global_init ();
gnutls_anon_allocate_server_credentials (&anoncred);
if (debug)
diff --git a/tests/resume.c b/tests/resume.c
index b6b47d7c47..03b51644ae 100644
--- a/tests/resume.c
+++ b/tests/resume.c
@@ -101,7 +101,7 @@ client (struct params_res *params)
gnutls_global_set_log_function (tls_log_func);
gnutls_global_set_log_level (2);
}
- gnutls_global_init ();
+ global_init ();
gnutls_anon_allocate_client_credentials (&anoncred);
@@ -359,7 +359,7 @@ server (struct params_res *params)
gnutls_global_set_log_level (2);
}
- gnutls_global_init ();
+ global_init ();
gnutls_anon_allocate_server_credentials (&anoncred);
if (debug)
diff --git a/tests/rng-fork.c b/tests/rng-fork.c
index 8de886136d..7ff14153da 100644
--- a/tests/rng-fork.c
+++ b/tests/rng-fork.c
@@ -56,7 +56,7 @@ doit (void)
int ret;
FILE* fp;
- gnutls_global_init ();
+ global_init ();
pid = fork();
if (pid == 0)
{
diff --git a/tests/rsa-encrypt-decrypt.c b/tests/rsa-encrypt-decrypt.c
index 376736f0da..fbfe54fb4f 100644
--- a/tests/rsa-encrypt-decrypt.c
+++ b/tests/rsa-encrypt-decrypt.c
@@ -104,7 +104,7 @@ doit (void)
int ret;
size_t i;
- gnutls_global_init ();
+ global_init ();
for (i = 0; i < sizeof (key_dat) / sizeof (key_dat[0]); i++)
{
diff --git a/tests/safe-renegotiation/srn0.c b/tests/safe-renegotiation/srn0.c
index a944e38e3a..6de25f5018 100644
--- a/tests/safe-renegotiation/srn0.c
+++ b/tests/safe-renegotiation/srn0.c
@@ -101,7 +101,7 @@ void doit(void)
int cret = GNUTLS_E_AGAIN;
/* General init. */
- gnutls_global_init ();
+ global_init ();
gnutls_global_set_log_function (tls_log_func);
if (debug) gnutls_global_set_log_level (2);
diff --git a/tests/safe-renegotiation/srn1.c b/tests/safe-renegotiation/srn1.c
index 801319ac42..4d400d0b0d 100644
--- a/tests/safe-renegotiation/srn1.c
+++ b/tests/safe-renegotiation/srn1.c
@@ -100,7 +100,7 @@ void doit(void)
int cret = GNUTLS_E_AGAIN;
/* General init. */
- gnutls_global_init ();
+ global_init ();
gnutls_global_set_log_function (tls_log_func);
if (debug) gnutls_global_set_log_level (5);
diff --git a/tests/safe-renegotiation/srn2.c b/tests/safe-renegotiation/srn2.c
index ca8075315d..613470f749 100644
--- a/tests/safe-renegotiation/srn2.c
+++ b/tests/safe-renegotiation/srn2.c
@@ -98,7 +98,7 @@ void doit(void)
int cret = GNUTLS_E_AGAIN;
/* General init. */
- gnutls_global_init ();
+ global_init ();
gnutls_global_set_log_function (tls_log_func);
if (debug) gnutls_global_set_log_level (2);
diff --git a/tests/safe-renegotiation/srn3.c b/tests/safe-renegotiation/srn3.c
index a8d9304652..aef6f18fe4 100644
--- a/tests/safe-renegotiation/srn3.c
+++ b/tests/safe-renegotiation/srn3.c
@@ -100,7 +100,7 @@ void doit(void)
int cret = GNUTLS_E_AGAIN;
/* General init. */
- gnutls_global_init ();
+ global_init ();
gnutls_global_set_log_function (tls_log_func);
if (debug) gnutls_global_set_log_level (2);
diff --git a/tests/safe-renegotiation/srn4.c b/tests/safe-renegotiation/srn4.c
index b48cf2165e..5e47154604 100644
--- a/tests/safe-renegotiation/srn4.c
+++ b/tests/safe-renegotiation/srn4.c
@@ -100,7 +100,7 @@ void doit(void)
int cret = GNUTLS_E_AGAIN;
/* General init. */
- gnutls_global_init ();
+ global_init ();
gnutls_global_set_log_function (tls_log_func);
if (debug) gnutls_global_set_log_level (2);
diff --git a/tests/safe-renegotiation/srn5.c b/tests/safe-renegotiation/srn5.c
index 4cf09bb494..fd2a2cf41d 100644
--- a/tests/safe-renegotiation/srn5.c
+++ b/tests/safe-renegotiation/srn5.c
@@ -101,7 +101,7 @@ void doit(void)
int cret = GNUTLS_E_AGAIN;
/* General init. */
- gnutls_global_init ();
+ global_init ();
gnutls_global_set_log_function (tls_log_func);
if (debug) gnutls_global_set_log_level (2);
diff --git a/tests/set_pkcs12_cred.c b/tests/set_pkcs12_cred.c
index 71a4ce792e..3aad07d122 100644
--- a/tests/set_pkcs12_cred.c
+++ b/tests/set_pkcs12_cred.c
@@ -42,9 +42,9 @@ doit (void)
const char *file, *password;
int ret;
- ret = gnutls_global_init ();
+ ret = global_init ();
if (ret < 0)
- fail ("gnutls_global_init failed %d\n", ret);
+ fail ("global_init failed %d\n", ret);
gnutls_global_set_log_function (tls_log_func);
if (debug)
diff --git a/tests/setcredcrash.c b/tests/setcredcrash.c
index a18e5729f3..85bccd66d6 100644
--- a/tests/setcredcrash.c
+++ b/tests/setcredcrash.c
@@ -27,6 +27,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <utils.h>
#include <gnutls/gnutls.h>
int
@@ -35,7 +36,7 @@ main (int argc, char *argv[])
gnutls_anon_client_credentials_t c_anoncred;
gnutls_session_t client;
- gnutls_global_init ();
+ global_init ();
gnutls_anon_allocate_client_credentials (&c_anoncred);
gnutls_init (&client, GNUTLS_CLIENT);
diff --git a/tests/slow/cipher-test.c b/tests/slow/cipher-test.c
index 9ec8d7df62..90c4300a42 100644
--- a/tests/slow/cipher-test.c
+++ b/tests/slow/cipher-test.c
@@ -1,6 +1,7 @@
#include <stdint.h>
#include <stdio.h>
#include <string.h>
+#include <utils.h>
#include <stdlib.h>
#include <gnutls/gnutls.h>
#include <gnutls/crypto.h>
@@ -630,7 +631,7 @@ main (int argc, char **argv)
if (argc > 1)
gnutls_global_set_log_level (4711);
- gnutls_global_init ();
+ global_init ();
if (test_aes ())
return 1;
diff --git a/tests/slow/gendh.c b/tests/slow/gendh.c
index f139677ea5..b108a05dc0 100644
--- a/tests/slow/gendh.c
+++ b/tests/slow/gendh.c
@@ -34,9 +34,9 @@ doit (void)
gnutls_dh_params_t dh_params = NULL;
int rc;
- rc = gnutls_global_init ();
+ rc = global_init ();
if (rc)
- fail ("gnutls_global_init\n");
+ fail ("global_init\n");
if (gnutls_dh_params_init (&dh_params) < 0)
fail ("Error in dh parameter initialization\n");
diff --git a/tests/slow/keygen.c b/tests/slow/keygen.c
index 583a3a71ca..4e02ed4e84 100644
--- a/tests/slow/keygen.c
+++ b/tests/slow/keygen.c
@@ -49,9 +49,9 @@ doit (void)
gnutls_x509_privkey_t pkey;
int ret, algorithm, i;
- ret = gnutls_global_init ();
+ ret = global_init ();
if (ret < 0)
- fail ("gnutls_global_init: %d\n", ret);
+ fail ("global_init: %d\n", ret);
gnutls_global_set_log_function (tls_log_func);
if (debug)
diff --git a/tests/srp/mini-srp.c b/tests/srp/mini-srp.c
index a1db3f5340..f6c7d0e484 100644
--- a/tests/srp/mini-srp.c
+++ b/tests/srp/mini-srp.c
@@ -115,7 +115,7 @@ client (int fd, const char* prio)
gnutls_certificate_credentials_t x509_cred;
/* Need to enable anonymous KX specifically. */
- gnutls_global_init ();
+ global_init ();
if (debug)
{
@@ -220,7 +220,7 @@ gnutls_session_t session;
/* this must be called once in the program
*/
- gnutls_global_init ();
+ global_init ();
if (debug)
{
diff --git a/tests/suite/mini-eagain2.c b/tests/suite/mini-eagain2.c
index c0c27de9d9..7e9c35ea0d 100644
--- a/tests/suite/mini-eagain2.c
+++ b/tests/suite/mini-eagain2.c
@@ -10,6 +10,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <utils.h>
#include <gnutls/gnutls.h>
/* Ecore_Fd_Handler example
@@ -162,7 +163,7 @@ main (void)
int sd, i;
/* General init. */
- gnutls_global_init ();
+ global_init ();
ecore_init();
// gnutls_global_set_log_function (tls_log_func);
// gnutls_global_set_log_level (2);
diff --git a/tests/suite/mini-record-timing.c b/tests/suite/mini-record-timing.c
index a4589b26ee..1978493874 100644
--- a/tests/suite/mini-record-timing.c
+++ b/tests/suite/mini-record-timing.c
@@ -46,6 +46,7 @@ int main()
#include <gnutls/gnutls.h>
#include <signal.h>
#include <errno.h>
+#include <utils.h>
#include <time.h>
#include <sys/time.h>
@@ -272,7 +273,7 @@ client (int fd, const char* prio, unsigned int text_size, struct test_st *test)
static unsigned long measurement;
const char* err;
- gnutls_global_init ();
+ global_init ();
setpriority(PRIO_PROCESS, getpid(), -15);
@@ -451,7 +452,7 @@ static unsigned long measurement;
/* this must be called once in the program
*/
- gnutls_global_init ();
+ global_init ();
memset(buffer, 0, sizeof(buffer));
#ifdef DEBUG
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;
diff --git a/tests/x509_altname.c b/tests/x509_altname.c
index c6afe04aa7..48ee402d79 100644
--- a/tests/x509_altname.c
+++ b/tests/x509_altname.c
@@ -72,7 +72,7 @@ doit (void)
unsigned int critical = 0;
int alt_name_count = 0;
- ret = gnutls_global_init ();
+ ret = global_init ();
if (ret < 0)
fail ("init %d\n", ret);
diff --git a/tests/x509cert-tl.c b/tests/x509cert-tl.c
index 08f25b36ea..3f4329a670 100644
--- a/tests/x509cert-tl.c
+++ b/tests/x509cert-tl.c
@@ -198,7 +198,7 @@ doit (void)
/* this must be called once in the program
*/
- gnutls_global_init ();
+ global_init ();
gnutls_global_set_time_function (mytime);
gnutls_global_set_log_function (tls_log_func);
diff --git a/tests/x509cert.c b/tests/x509cert.c
index e753c0798f..3e974b429e 100644
--- a/tests/x509cert.c
+++ b/tests/x509cert.c
@@ -169,7 +169,7 @@ doit (void)
/* this must be called once in the program
*/
- gnutls_global_init ();
+ global_init ();
gnutls_global_set_log_function (tls_log_func);
if (debug)
diff --git a/tests/x509dn.c b/tests/x509dn.c
index a6ae6f63ad..ff79fb828b 100644
--- a/tests/x509dn.c
+++ b/tests/x509dn.c
@@ -188,7 +188,7 @@ client (void)
char buffer[MAX_BUF + 1];
gnutls_certificate_credentials_t xcred;
- gnutls_global_init ();
+ global_init ();
gnutls_global_set_log_function (tls_log_func);
if (debug)
@@ -429,7 +429,7 @@ server (void)
{
/* this must be called once in the program
*/
- gnutls_global_init ();
+ global_init ();
gnutls_global_set_log_function (tls_log_func);
if (debug)
diff --git a/tests/x509self.c b/tests/x509self.c
index e102851d87..859a0b1c29 100644
--- a/tests/x509self.c
+++ b/tests/x509self.c
@@ -117,7 +117,7 @@ client (void)
char buffer[MAX_BUF + 1];
gnutls_certificate_credentials_t xcred;
- gnutls_global_init ();
+ global_init ();
gnutls_global_set_log_function (tls_log_func);
if (debug)
@@ -391,7 +391,7 @@ server (void)
{
/* this must be called once in the program
*/
- gnutls_global_init ();
+ global_init ();
gnutls_global_set_log_function (tls_log_func);
if (debug)
diff --git a/tests/x509sign-verify.c b/tests/x509sign-verify.c
index 69e0903462..143dcd1d59 100644
--- a/tests/x509sign-verify.c
+++ b/tests/x509sign-verify.c
@@ -159,7 +159,7 @@ doit (void)
int ret;
size_t i;
- gnutls_global_init ();
+ global_init ();
gnutls_global_set_log_function (tls_log_func);
if (debug)