]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
converted to a simple check for gnutls_global_init() as gnutls_global_init2() will...
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Sun, 8 Dec 2013 18:19:17 +0000 (19:19 +0100)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Sun, 8 Dec 2013 18:19:17 +0000 (19:19 +0100)
tests/global-init.c

index e985428112612e82a7d96f75d1b4953b2f6ea285..d27558732e8cfc007ef4542faad8dec6a3bda4b1 100644 (file)
@@ -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__);
        }