p11-glue / p11-kit

Provides a way to load and enumerate PKCS#11 modules.
https://p11-glue.github.io/p11-glue/p11-kit.html
Other
150 stars 92 forks source link

`p11-kit list-objects` prints (unknown) flags #562

Closed ueno closed 11 months ago

ueno commented 11 months ago

When a new key pair is created on a SoftHSM2 token, p11-kit list-objects prints a couple of (unknown) attributes:

Object: #0
    uri: pkcs11:model=SoftHSM%20v2;manufacturer=SoftHSM%20project;serial=53101cb2505a99ea;token=test;id=;object=foo2;type=public
    class: public-key
    key-type: rsa
    label: foo2
    id: 
    trusted: false
    local: true
    token: true
    private: false
    modifiable: true
    (unknown): true
    (unknown): true

These correspond to CKA_COPYABLE and CKA_DESTROYABLE, both of which do not appear in common/constants.c. In any case it would be more readable if those flags are folded like:

flags:
  local, token, modifiable, copyable, destroyable