Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update cases for C_GetAttributeValue #11

Open
microshine opened this issue Feb 26, 2017 · 0 comments
Open

Update cases for C_GetAttributeValue #11

microshine opened this issue Feb 26, 2017 · 0 comments

Comments

@microshine
Copy link
Contributor

For each (type, pValue, ulValueLen) triple in the template, C_GetAttributeValue performs the following algorithm:

  • If the specified attribute (i.e., the attribute specified by the type field) for the object cannot be revealed because the object is sensitive or unextractable, then the ulValueLen field in that triple is modified to hold the value -1 (i.e., when it is cast to a CK_LONG, it holds -1).
  • Otherwise, if the specified attribute for the object is invalid (the object does not possess such an attribute), then the ulValueLen field in that triple is modified to hold the value -1.
  • Otherwise, if the pValue field has the value NULL_PTR, then the ulValueLen field is modified to hold the exact length of the specified attribute for the object.
  • Otherwise, if the length specified in ulValueLen is large enough to hold the value of the specified attribute for the object, then that attribute is copied into the buffer located at pValue, and the ulValueLen field is modified to hold the exact length of the attribute.
  • Otherwise, the ulValueLen field is modified to hold the value -1.
zBuffer pushed a commit to zBuffer/pkcs11js that referenced this issue Sep 15, 2019
…values, because there was conflict with Blowfish in older version v2.30:

http://docs.oasis-open.org/pkcs11/pkcs11-curr/v2.40/cs01/pkcs11-curr-v2.40-cs01.pdf

#define CKM_BLOWFISH_KEY_GEN 0x00001090
#define CKM_BLOWFISH_CBC 0x00001091
#define CKM_AES_KEY_WRAP 0x00002109
#define CKM_AES_KEY_WRAP_PAD 0x0000210A
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants