summaryrefslogtreecommitdiff
path: root/tools/tests/test-openssl.c
diff options
context:
space:
mode:
authorStef Walter <stefw@gnome.org>2013-02-06 21:57:45 +0100
committerStef Walter <stefw@gnome.org>2013-05-21 10:47:51 +0200
commit5c19f0cf66495f00ccf69eba1d0915f862a88c8d (patch)
treee8ae733062507a0a4cc5c134d1fdd62cf055cddd /tools/tests/test-openssl.c
parentff853bd7902e271256cada4a1b20a3d46b519b69 (diff)
downloadp11-kit-5c19f0cf66495f00ccf69eba1d0915f862a88c8d.tar.gz
p11-kit: Managed PKCS#11 module loading
Support a new managed style module loading for PKCS#11 modules. This allows us to better coordinate between multiple callers of the same PKCS#11 modules and provide hooks into their behavior. This meant redoing the public facing API. The old methods are now deprecated, marked and documented as such.
Diffstat (limited to 'tools/tests/test-openssl.c')
-rw-r--r--tools/tests/test-openssl.c9
1 files changed, 5 insertions, 4 deletions
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);
}