Skip to content

Commit

Permalink
Add attrs CKA_NAME_HASH_ALGORITHM, CKA_CLONABLE, CKA_DESTROYABLE
Browse files Browse the repository at this point in the history
- fixed #10
  • Loading branch information
microshine committed Nov 30, 2017
1 parent 0d79d05 commit 4f8c01b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions includes/pkcs11/pkcs11t.h
Expand Up @@ -439,6 +439,7 @@ typedef CK_ULONG CK_ATTRIBUTE_TYPE;
#define CKA_URL 0x00000089
#define CKA_HASH_OF_SUBJECT_PUBLIC_KEY 0x0000008A
#define CKA_HASH_OF_ISSUER_PUBLIC_KEY 0x0000008B
#define CKA_NAME_HASH_ALGORITHM 0x0000008C
#define CKA_CHECK_VALUE 0x00000090

#define CKA_KEY_TYPE 0x00000100
Expand Down Expand Up @@ -483,6 +484,9 @@ typedef CK_ULONG CK_ATTRIBUTE_TYPE;
#define CKA_KEY_GEN_MECHANISM 0x00000166

#define CKA_MODIFIABLE 0x00000170
#define CKA_COPYABLE 0x00000171

#define CKA_DESTROYABLE 0x00000172

/* CKA_ECDSA_PARAMS is deprecated in v2.11,
* CKA_EC_PARAMS is preferred. */
Expand Down
3 changes: 3 additions & 0 deletions src/const.cpp
Expand Up @@ -22,6 +22,7 @@ void declare_attributes(Local<Object> target) {
SET_CONST(target, CKA_URL);
SET_CONST(target, CKA_HASH_OF_SUBJECT_PUBLIC_KEY);
SET_CONST(target, CKA_HASH_OF_ISSUER_PUBLIC_KEY);
SET_CONST(target, CKA_NAME_HASH_ALGORITHM);
SET_CONST(target, CKA_CHECK_VALUE);
SET_CONST(target, CKA_KEY_TYPE);
SET_CONST(target, CKA_SUBJECT);
Expand Down Expand Up @@ -61,6 +62,8 @@ void declare_attributes(Local<Object> target) {
SET_CONST(target, CKA_ALWAYS_SENSITIVE);
SET_CONST(target, CKA_KEY_GEN_MECHANISM);
SET_CONST(target, CKA_MODIFIABLE);
SET_CONST(target, CKA_COPYABLE);
SET_CONST(target, CKA_DESTROYABLE);
SET_CONST(target, CKA_ECDSA_PARAMS);
SET_CONST(target, CKA_EC_PARAMS);
SET_CONST(target, CKA_EC_POINT);
Expand Down

0 comments on commit 4f8c01b

Please sign in to comment.