aboutsummaryrefslogtreecommitdiffstats
path: root/SoftHSMv2/src/lib/P11Attributes.h
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/P11Attributes.h
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/P11Attributes.h')
-rw-r--r--SoftHSMv2/src/lib/P11Attributes.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/SoftHSMv2/src/lib/P11Attributes.h b/SoftHSMv2/src/lib/P11Attributes.h
index 3cddf30..7cc9976 100644
--- a/SoftHSMv2/src/lib/P11Attributes.h
+++ b/SoftHSMv2/src/lib/P11Attributes.h
@@ -36,6 +36,7 @@
#include "cryptoki.h"
#include "OSObject.h"
#include "Token.h"
+#include "OSAttributes.h"
// The operation types
#define OBJECT_OP_NONE 0x0
@@ -1261,4 +1262,22 @@ protected:
virtual CK_RV updateAttr(Token *token, bool isPrivate, CK_VOID_PTR pValue, CK_ULONG ulValueLen, int op);
};
+/*****************************************
+ * CKA_COEFFICIENT
+ *****************************************/
+
+class P11AttrPrivateHandle : public P11Attribute
+{
+public:
+ // Constructor
+ P11AttrPrivateHandle(OSObject* inobject) : P11Attribute(inobject) { type = CKA_OS_PRIVATE_HANDLE; checks = ck1; }
+
+protected:
+ // Set the default value of the attribute
+ virtual bool setDefault();
+ // Update the value if allowed
+ virtual CK_RV updateAttr(Token *token, bool isPrivate, CK_VOID_PTR pValue, CK_ULONG ulValueLen, int op);
+};
+
+
#endif // !_SOFTHSM_V2_P11ATTRIBUTES_H