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

The PIN objects should not be propagated to the PKCS#11 interface #23

Closed
Jakuje opened this issue Mar 26, 2024 · 1 comment · Fixed by #17
Closed

The PIN objects should not be propagated to the PKCS#11 interface #23

Jakuje opened this issue Mar 26, 2024 · 1 comment · Fixed by #17

Comments

@Jakuje
Copy link
Contributor

Jakuje commented Mar 26, 2024

For PIN objects, we should we either:

  • use some vendor specific types to avoid applications interpreting these as they are propagated to pkcs11 layer
  • filter the PIN objects from the pkcs11-layer results?

(or both)

Right now, it is possible to find the PIN objects through searching for the SECRET keys:

5489: C_FindObjectsInit
P:2440186; T:0x140007141424576 2024-03-25 15:09:17.251
[in] hSession = 0x11
[in] pTemplate[1]: 
    CKA_CLASS             CKO_SECRET_KEY       
Returned:  0 CKR_OK

5490: C_FindObjects
P:2440186; T:0x140007141424576 2024-03-25 15:09:17.251
[in] hSession = 0x11
[in] ulMaxObjectCount = 0x1
[out] ulObjectCount = 0x1
Object 0x9 matches
Returned:  0 CKR_OK

314: C_GetAttributeValue
P:2440186; T:0x140007141424576 2024-03-25 15:09:15.882
[in] hSession = 0x11
[in] hObject = 0xc
[in] pTemplate[1]: 
    CKA_LABEL             000000000073c010 / 8
[out] pTemplate[1]: 
    CKA_LABEL             000000000073c010 / 8
    55736572 2050494E
     U s e r  . P I N
Returned:  0 CKR_OK

The objects do not have CKA_ID so most of the application will likely to ignore them but we should not depend on that and not show them to user/application.

Originally posted by @Jakuje in #17 (comment)

@Jakuje Jakuje mentioned this issue Mar 26, 2024
@simo5
Copy link
Member

simo5 commented Mar 26, 2024

This should be handled in my last push in #17

@simo5 simo5 closed this as completed in #17 Mar 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants