summaryrefslogtreecommitdiff
path: root/gck
diff options
context:
space:
mode:
authorStef Walter <stefw@collabora.co.uk>2011-11-18 13:22:40 +0100
committerStef Walter <stefw@collabora.co.uk>2011-11-23 09:10:52 +0100
commitc2c73dfc3ff6c94aa5615c1c8047ed8b862f7b6f (patch)
tree93459284592c45f2ebd1a665ccc903df27893ef7 /gck
parent07ac51b4f1c7268d807370cf63ab7de9c02d8ac1 (diff)
downloadgcr-c2c73dfc3ff6c94aa5615c1c8047ed8b862f7b6f.tar.gz
gcr-c2c73dfc3ff6c94aa5615c1c8047ed8b862f7b6f.tar.bz2
gcr-c2c73dfc3ff6c94aa5615c1c8047ed8b862f7b6f.zip
gcr: Implement functions for loading and using SubjectPublicKeyInfo
* Move key calculation routines into gcr-subject-public-key.c * Move creation of SPK from gcr-fingerprint.c into here * Implement loading of SPK from PKCS#11 certificates, public keys, private keys * Add support for parsing SubjectPublicKeyInfo to parser. Generates attributes for a CKO_PUBLIC_KEY * Fix bugs in DER encoding related to this. * More tweaks on testing infrastructure
Diffstat (limited to 'gck')
-rw-r--r--gck/gck-mock.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/gck/gck-mock.c b/gck/gck-mock.c
index a1fdba9..716b149 100644
--- a/gck/gck-mock.c
+++ b/gck/gck-mock.c
@@ -913,13 +913,12 @@ gck_mock_C_GetAttributeValue (CK_SESSION_HANDLE hSession, CK_OBJECT_HANDLE hObje
CK_ULONG i;
session = g_hash_table_lookup (the_sessions, GUINT_TO_POINTER (hSession));
- g_return_val_if_fail (session, CKR_SESSION_HANDLE_INVALID);
+ if (session == NULL)
+ return CKR_SESSION_HANDLE_INVALID;
attrs = lookup_object (session, hObject);
- if (!attrs) {
- g_assert_not_reached (); /* "invalid object handle passed" */
+ if (!attrs)
return CKR_OBJECT_HANDLE_INVALID;
- }
for (i = 0; i < ulCount; ++i) {
result = pTemplate + i;