[Opendnssec-commits] [keihatsu.kirei.se/svn/dnssec] r3683 - in trunk/softHSM: . src/lib

Rickard Bellgrim rickard.bellgrim at iis.se
Mon Aug 9 14:22:08 CEST 2010


Author: rb
Date: 2010-08-09 14:22:08 +0200 (Mon, 09 Aug 2010)
New Revision: 3683

Modified:
   trunk/softHSM/NEWS
   trunk/softHSM/src/lib/SoftDatabase.cpp
Log:
Set a value on CKA_KEY_GEN_MECHANISM when importing objects


Modified: trunk/softHSM/NEWS
===================================================================
--- trunk/softHSM/NEWS	2010-08-09 11:55:02 UTC (rev 3682)
+++ trunk/softHSM/NEWS	2010-08-09 12:22:08 UTC (rev 3683)
@@ -12,6 +12,8 @@
 * Write message to stderr when the config file cannot be found
 * CKA_WRAP_WITH_TRUSTED was not handled correctly. But it has not
   been a problem since wrapping is not supported.
+* Set CKA_KEY_GEN_MECHANISM to CK_UNAVAILABLE_INFORMATION when
+  importing objects.
 
 
 SoftHSM 1.1.4 - 2010-04-06

Modified: trunk/softHSM/src/lib/SoftDatabase.cpp
===================================================================
--- trunk/softHSM/src/lib/SoftDatabase.cpp	2010-08-09 11:55:02 UTC (rev 3682)
+++ trunk/softHSM/src/lib/SoftDatabase.cpp	2010-08-09 12:22:08 UTC (rev 3683)
@@ -544,12 +544,14 @@
 
   CK_BBOOL ckTrue = CK_TRUE, ckFalse = CK_FALSE;
   CK_DATE emptyDate;
+  CK_MECHANISM_TYPE mechType = CK_UNAVAILABLE_INFORMATION;
 
   // Created by db handle. So we can remove the correct session objects in the future.
   CHECK_DB_RESPONSE(this->saveAttribute(objectID, CKA_VENDOR_DEFINED, &db, sizeof(db)) != CKR_OK);
 
   // General information
   CHECK_DB_RESPONSE(this->saveAttribute(objectID, CKA_LOCAL, &ckFalse, sizeof(ckFalse)) != CKR_OK);
+  CHECK_DB_RESPONSE(this->saveAttribute(objectID, CKA_KEY_GEN_MECHANISM, &mechType, sizeof(mechType)) != CKR_OK);
 
   // Default values, may be changed by the template.
   CHECK_DB_RESPONSE(this->saveAttribute(objectID, CKA_LABEL, NULL_PTR, 0) != CKR_OK);
@@ -603,12 +605,14 @@
 
   CK_BBOOL ckTrue = CK_TRUE, ckFalse = CK_FALSE;
   CK_DATE emptyDate;
+  CK_MECHANISM_TYPE mechType = CK_UNAVAILABLE_INFORMATION;
 
   // Created by db handle. So we can remove the correct session objects in the future.
   CHECK_DB_RESPONSE(this->saveAttribute(objectID, CKA_VENDOR_DEFINED, &db, sizeof(db)) != CKR_OK);
 
   // General information
   CHECK_DB_RESPONSE(this->saveAttribute(objectID, CKA_LOCAL, &ckFalse, sizeof(ckFalse)) != CKR_OK);
+  CHECK_DB_RESPONSE(this->saveAttribute(objectID, CKA_KEY_GEN_MECHANISM, &mechType, sizeof(mechType)) != CKR_OK);
 
   // Default values, may be changed by the template.
   CHECK_DB_RESPONSE(this->saveAttribute(objectID, CKA_LABEL, NULL_PTR, 0) != CKR_OK);




More information about the Opendnssec-commits mailing list