aboutsummaryrefslogtreecommitdiffstats
path: root/SoftHSMv2/src/lib/object_store
diff options
context:
space:
mode:
authorRitu Sood <ritu.sood@intel.com>2018-04-26 01:50:05 +0000
committerRitu Sood <ritu.sood@intel.com>2018-05-24 05:55:20 +0000
commit57c7ad1aa0e485b5594f27f1ab501ff0306fe2fc (patch)
treef47b764bda303958051dae4f3e4f0222c338ac3e /SoftHSMv2/src/lib/object_store
parentc1c9bfcabc4a5e4147d19c599de7d9bf925fa98b (diff)
Added a new Attribute to store TPM key handle
Includes changes to detect existing instances of key and also some bug fixes. Also added new functionality for RSA_SignUpdate, RSA_SignFinal and RSA_Cleanup Issue-ID: AAF-260 Change-Id: Ib064e86b8f112784ed6d352ab1557ab9a13c5978 Signed-off-by: Ritu Sood <ritu.sood@intel.com>
Diffstat (limited to 'SoftHSMv2/src/lib/object_store')
-rw-r--r--SoftHSMv2/src/lib/object_store/DBObject.cpp2
-rw-r--r--SoftHSMv2/src/lib/object_store/OSAttributes.h2
2 files changed, 4 insertions, 0 deletions
diff --git a/SoftHSMv2/src/lib/object_store/DBObject.cpp b/SoftHSMv2/src/lib/object_store/DBObject.cpp
index d2515bd..a55a32a 100644
--- a/SoftHSMv2/src/lib/object_store/DBObject.cpp
+++ b/SoftHSMv2/src/lib/object_store/DBObject.cpp
@@ -385,6 +385,7 @@ static bool isModifiable(CK_ATTRIBUTE_TYPE type)
case CKA_OS_TOKENFLAGS:
case CKA_OS_SOPIN:
case CKA_OS_USERPIN:
+ case CKA_OS_PRIVATE_HANDLE:
return true;
default:
return false;
@@ -516,6 +517,7 @@ static AttributeKind attributeKind(CK_ATTRIBUTE_TYPE type)
case CKA_OS_TOKENFLAGS: return akInteger;
case CKA_OS_SOPIN: return akBinary;
case CKA_OS_USERPIN: return akBinary;
+ case CKA_OS_PRIVATE_HANDLE: return akInteger;
default: return akUnknown;
}
diff --git a/SoftHSMv2/src/lib/object_store/OSAttributes.h b/SoftHSMv2/src/lib/object_store/OSAttributes.h
index dfc5869..176ca02 100644
--- a/SoftHSMv2/src/lib/object_store/OSAttributes.h
+++ b/SoftHSMv2/src/lib/object_store/OSAttributes.h
@@ -46,5 +46,7 @@
#define CKA_OS_SOPIN (CKA_VENDOR_SOFTHSM + 4)
#define CKA_OS_USERPIN (CKA_VENDOR_SOFTHSM + 5)
+#define CKA_OS_PRIVATE_HANDLE (CKA_VENDOR_SOFTHSM + 6)
+
#endif // !_SOFTHSM_V2_OSATTRIBUTES_H