From 57c7ad1aa0e485b5594f27f1ab501ff0306fe2fc Mon Sep 17 00:00:00 2001 From: Ritu Sood Date: Thu, 26 Apr 2018 01:50:05 +0000 Subject: 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 --- SoftHSMv2/src/lib/P11Attributes.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'SoftHSMv2/src/lib/P11Attributes.h') 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 -- cgit 1.2.3-korg