From c785ab66890ad7b73c556d6afdf2bb8a32dd50e2 Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Thu, 23 Aug 2012 15:34:04 +0200 Subject: rpc: Implement PKCS#11 messages/client/server code * This enables passing around bytes which represent PKCS#11 RPC calls. * Caller is responsible for connecting/disconnecting and so on. * Client side caller gets a mixin from p11_rpc_client_init() to call into, which generates callbacks with byte arrays to be transported. * Server side calls p11_rpc_server_handle() with a CK_FUNCTION_LIST_PTR on which relevant methods get called. * Doesn't yet implement the actual daemon or clients etc... https://bugs.freedesktop.org/show_bug.cgi?id=54105 --- p11-kit/tests/test-mock.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'p11-kit/tests/test-mock.c') diff --git a/p11-kit/tests/test-mock.c b/p11-kit/tests/test-mock.c index 5fba7ec..079ff0d 100644 --- a/p11-kit/tests/test-mock.c +++ b/p11-kit/tests/test-mock.c @@ -55,8 +55,14 @@ test_get_info (void) module = setup_mock_module (NULL); rv = (module->C_GetInfo) (&info); - assert (rv == CKR_OK); - assert (memcmp (&info, &MOCK_INFO, sizeof (CK_INFO)) == 0); + assert_num_eq (rv, CKR_OK); + assert_num_eq (MOCK_INFO.cryptokiVersion.major, info.cryptokiVersion.major); + assert_num_eq (MOCK_INFO.cryptokiVersion.minor, info.cryptokiVersion.minor); + assert (memcmp (MOCK_INFO.manufacturerID, info.manufacturerID, sizeof (info.manufacturerID)) == 0); + assert_num_eq (MOCK_INFO.flags, info.flags); + assert (memcmp (MOCK_INFO.libraryDescription, info.libraryDescription, sizeof (info.libraryDescription)) == 0); + assert_num_eq (MOCK_INFO.libraryVersion.major, info.libraryVersion.major); + assert_num_eq (MOCK_INFO.libraryVersion.minor, info.libraryVersion.minor); teardown_mock_module (module); } -- cgit v1.1