]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - keystone-linux/ti-softhsmv2.git/blobdiff - src/lib/P11Attributes.h
Secure storage #3
[keystone-linux/ti-softhsmv2.git] / src / lib / P11Attributes.h
index 61ef8715ab31c2d4cfe58403b4ef47f88f1689e6..4943a1d1ad5f7e874cdde10f2887c5c469ac747f 100644 (file)
@@ -52,7 +52,7 @@ class P11Attribute
 {
 public:
        // Destructor
-       ~P11Attribute();
+       virtual ~P11Attribute();
 
        // Initialize the attribute
        bool init();
@@ -872,7 +872,7 @@ class P11AttrModulus : public P11Attribute
 {
 public:
        // Constructor
-       P11AttrModulus(OSObject* osobject) : P11Attribute(osobject) { type = CKA_MODULUS; checks = ck1|ck4|ck6; }
+       P11AttrModulus(OSObject* osobject) : P11Attribute(osobject) { type = CKA_MODULUS; checks = ck3; }
 
 protected:
        // Set the default value of the attribute
@@ -1005,4 +1005,23 @@ protected:
        virtual CK_RV updateAttr(Token *token, bool isPrivate, CK_VOID_PTR pValue, CK_ULONG ulValueLen, int op);
 };
 
+/*****************************************
+ * CKA_WRAPPED_PRIVATE_KEY
+ *****************************************/
+
+class P11AttrWrappedPrivateKey : public P11Attribute
+{
+public:
+       // Constructor
+       P11AttrWrappedPrivateKey(OSObject* osobject) : P11Attribute(osobject) { type = CKA_WRAPPED_PRIVATE_KEY; checks = 0; }
+
+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