aboutsummaryrefslogtreecommitdiffstats
path: root/SoftHSMv2/src/lib/P11Attributes.h
diff options
context:
space:
mode:
authorKiran Kamineni <kiran.k.kamineni@intel.com>2018-05-23 22:31:41 +0000
committerGerrit Code Review <gerrit@onap.org>2018-05-23 22:31:41 +0000
commita1e6976c77fdc088a574e3b58cb18d57ddfd2498 (patch)
tree7fb1f0a63d47d533817c24471b05566fc35cac6b /SoftHSMv2/src/lib/P11Attributes.h
parent4c727ecb7cf150a2c054e7581f3d135cecccf296 (diff)
parent57c7ad1aa0e485b5594f27f1ab501ff0306fe2fc (diff)
Merge "Added a new Attribute to store TPM key handle"
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