summaryrefslogtreecommitdiff
path: root/tools/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tools/tests')
-rw-r--r--tools/tests/test-extract.c7
-rw-r--r--tools/tests/test-openssl.c9
-rw-r--r--tools/tests/test-pem.c9
-rw-r--r--tools/tests/test-x509.c9
4 files changed, 20 insertions, 14 deletions
diff --git a/tools/tests/test-extract.c b/tools/tests/test-extract.c
index 74e3c9c..a3db8d8 100644
--- a/tools/tests/test-extract.c
+++ b/tools/tests/test-extract.c
@@ -32,6 +32,8 @@
* Author: Stef Walter <stefw@collabora.co.uk>
*/
+#define P11_KIT_DISABLE_DEPRECATED
+
#include "config.h"
#include "CuTest.h"
@@ -145,9 +147,10 @@ setup (CuTest *tc)
{
CK_RV rv;
+ mock_module_reset ();
memcpy (&test.module, &mock_module, sizeof (CK_FUNCTION_LIST));
- rv = p11_kit_initialize_module (&test.module);
+ rv = test.module.C_Initialize (NULL);
CuAssertIntEquals (tc, CKR_OK, rv);
test.iter = p11_kit_iter_new (NULL);
@@ -164,7 +167,7 @@ teardown (CuTest *tc)
p11_kit_iter_free (test.iter);
- rv = p11_kit_finalize_module (&test.module);
+ rv = test.module.C_Finalize (NULL);
CuAssertIntEquals (tc, CKR_OK, rv);
}
diff --git a/tools/tests/test-openssl.c b/tools/tests/test-openssl.c
index 215e0da..c778aa7 100644
--- a/tools/tests/test-openssl.c
+++ b/tools/tests/test-openssl.c
@@ -32,6 +32,8 @@
* Author: Stef Walter <stefw@collabora.co.uk>
*/
+#define P11_KIT_DISABLE_DEPRECATED
+
#include "config.h"
#include "CuTest.h"
@@ -69,12 +71,11 @@ setup (CuTest *tc)
{
CK_RV rv;
+ mock_module_reset ();
memcpy (&test.module, &mock_module, sizeof (CK_FUNCTION_LIST));
- rv = p11_kit_initialize_module (&test.module);
+ rv = test.module.C_Initialize (NULL);
CuAssertIntEquals (tc, CKR_OK, rv);
- mock_module_reset_objects (MOCK_SLOT_ONE_ID);
-
test.iter = p11_kit_iter_new (NULL);
p11_extract_info_init (&test.ex);
@@ -96,7 +97,7 @@ teardown (CuTest *tc)
p11_extract_info_cleanup (&test.ex);
p11_kit_iter_free (test.iter);
- rv = p11_kit_finalize_module (&test.module);
+ rv = test.module.C_Finalize (NULL);
CuAssertIntEquals (tc, CKR_OK, rv);
}
diff --git a/tools/tests/test-pem.c b/tools/tests/test-pem.c
index dc1cb08..4024bac 100644
--- a/tools/tests/test-pem.c
+++ b/tools/tests/test-pem.c
@@ -32,6 +32,8 @@
* Author: Stef Walter <stefw@collabora.co.uk>
*/
+#define P11_KIT_DISABLE_DEPRECATED
+
#include "config.h"
#include "CuTest.h"
@@ -66,12 +68,11 @@ setup (CuTest *tc)
{
CK_RV rv;
+ mock_module_reset ();
memcpy (&test.module, &mock_module, sizeof (CK_FUNCTION_LIST));
- rv = p11_kit_initialize_module (&test.module);
+ rv = test.module.C_Initialize (NULL);
CuAssertIntEquals (tc, CKR_OK, rv);
- mock_module_reset_objects (MOCK_SLOT_ONE_ID);
-
test.iter = p11_kit_iter_new (NULL);
p11_extract_info_init (&test.ex);
@@ -93,7 +94,7 @@ teardown (CuTest *tc)
p11_extract_info_cleanup (&test.ex);
p11_kit_iter_free (test.iter);
- rv = p11_kit_finalize_module (&test.module);
+ rv = test.module.C_Finalize (NULL);
CuAssertIntEquals (tc, CKR_OK, rv);
}
diff --git a/tools/tests/test-x509.c b/tools/tests/test-x509.c
index e952e53..5093743 100644
--- a/tools/tests/test-x509.c
+++ b/tools/tests/test-x509.c
@@ -32,6 +32,8 @@
* Author: Stef Walter <stefw@collabora.co.uk>
*/
+#define P11_KIT_DISABLE_DEPRECATED
+
#include "config.h"
#include "CuTest.h"
@@ -66,12 +68,11 @@ setup (CuTest *tc)
{
CK_RV rv;
+ mock_module_reset ();
memcpy (&test.module, &mock_module, sizeof (CK_FUNCTION_LIST));
- rv = p11_kit_initialize_module (&test.module);
+ rv = test.module.C_Initialize (NULL);
CuAssertIntEquals (tc, CKR_OK, rv);
- mock_module_reset_objects (MOCK_SLOT_ONE_ID);
-
test.iter = p11_kit_iter_new (NULL);
p11_extract_info_init (&test.ex);
@@ -93,7 +94,7 @@ teardown (CuTest *tc)
p11_extract_info_cleanup (&test.ex);
p11_kit_iter_free (test.iter);
- rv = p11_kit_finalize_module (&test.module);
+ rv = test.module.C_Finalize (NULL);
CuAssertIntEquals (tc, CKR_OK, rv);
}