From: Nikos Mavrogiannopoulos Date: Sun, 8 Dec 2013 18:19:17 +0000 (+0100) Subject: converted to a simple check for gnutls_global_init() as gnutls_global_init2() will... X-Git-Tag: gnutls_3_3_0pre0~486 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=da8ab53e9024402683d3fb2491bc44a3ec07e344;p=thirdparty%2Fgnutls.git converted to a simple check for gnutls_global_init() as gnutls_global_init2() will not be added. --- diff --git a/tests/global-init.c b/tests/global-init.c index e985428112..d27558732e 100644 --- a/tests/global-init.c +++ b/tests/global-init.c @@ -40,14 +40,6 @@ void doit(void) { int ret; - /* In FIPS140 a constructor is being used for MINIMAL so - * the following should succeed. - */ - ret = gnutls_global_init2(GNUTLS_GLOBAL_INIT_PKCS11); - if (ret < 0) { - fail("Could not initialize: %d\n", __LINE__); - } - ret = gnutls_global_init(); if (ret < 0) { fail("Could not initialize\n"); @@ -75,16 +67,6 @@ void doit(void) fail("Could not initialize: %d\n", __LINE__); } - ret = gnutls_global_init2(GNUTLS_GLOBAL_INIT_CRYPTO); - if (ret < 0) { - fail("Could not initialize: %d\n", __LINE__); - } - - ret = gnutls_global_init2(GNUTLS_GLOBAL_INIT_PKCS11); - if (ret < 0) { - fail("Could not initialize: %d\n", __LINE__); - } - gnutls_global_deinit(); gnutls_global_deinit(); gnutls_global_deinit(); @@ -92,12 +74,7 @@ void doit(void) gnutls_global_deinit(); /* This should fail */ - ret = gnutls_global_init2(GNUTLS_GLOBAL_INIT_CRYPTO); - if (ret != GNUTLS_E_INVALID_REQUEST) { - fail("Initialization should have failed: %d\n", __LINE__); - } - - ret = gnutls_global_init2(GNUTLS_GLOBAL_INIT_MINIMAL); + ret = gnutls_global_init(); if (ret < 0) { fail("Could not initialize: %d\n", __LINE__); }