diff options
author | Stef Walter <stef@memberwebs.com> | 2008-12-09 18:49:32 +0000 |
---|---|---|
committer | Stef Walter <stef@memberwebs.com> | 2008-12-09 18:49:32 +0000 |
commit | f22ca594d066f305c5c289dc522b2a13917234d0 (patch) | |
tree | 06d600f21058c5149b66b55d1dfe21217c55f21f /ckcapi-key.c | |
parent | 94c63a237d77654bab2ea34146b06fd4b0acfc99 (diff) |
Fix a particularly nasty bug in the hash tables, where an old would continue to get used when the value was replaced. Also a bunch of memory allocation tuning.
Diffstat (limited to 'ckcapi-key.c')
-rw-r--r-- | ckcapi-key.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ckcapi-key.c b/ckcapi-key.c index 5cf60ba..abf37de 100644 --- a/ckcapi-key.c +++ b/ckcapi-key.c @@ -533,7 +533,7 @@ key_date_attribute(CkCapiObjectData* objdata, CK_ATTRIBUTE_PTR attr) */ case CKA_END_DATE: case CKA_START_DATE: - return CKR_ATTRIBUTE_TYPE_INVALID; + return ckcapi_return_data(attr, "", 0); default: return CKR_ATTRIBUTE_TYPE_INVALID; @@ -774,7 +774,7 @@ register_key_object(CkCapiSession* sess, CK_OBJECT_CLASS cls, ASSERT(key_identifier); ASSERT(cls == CKO_PRIVATE_KEY || cls == CKO_PUBLIC_KEY); - kobj = calloc(sizeof(KeyObject) + key_identifier->cbData, 1); + kobj = calloc(1, sizeof(KeyObject) + key_identifier->cbData); if(!kobj) return CKR_HOST_MEMORY; |