P11SAK_DEFINED_ATTRS.CONF(5)

πŸ’– P11SAK_DEFINED_ATTRS.CONF β€” the vibe ✨

okay bestie, listen up 🫢 this is the manual for p11sak_defined_attrs.conf, from the openCryptoki family, and it's literally just a lil config file that tells the p11sak tool which custom attributes to show you. it's a section 5 page, so it's a file-format girlie, not a command girlie. πŸ’…


🌸 NAME 🌸

p11sak_defined_attrs.conf β€” the configuration file for the p11sak list-key command. that's it, that's the whole job. πŸ‘‘


πŸ¦‹ DESCRIPTION πŸ¦‹

so the p11sak tool goes looking for config files to find out about your custom attributes β€” the ones that should get printed out when you run the p11sak list-key command. it checks these two spots:

  • ~/.p11sak_defined_attrs.conf
  • /etc/opencryptoki/p11sak_defined_attrs.conf

and you can override the whole path if you want, no gatekeeping β€” just set the environment variable P11SAK_DEFAULT_CONF_FILE and the tool will use that instead. ✨

if that env var is not set, here's the lil search order, in order, bestie:

  1. it first tries to read .p11sak_defined_attrs.conf from the current user's home directory. 🏠
  2. if that's not available, it reads the global config file /etc/opencryptoki/p11sak_defined_attrs.conf. 🌍

and if none of these files are available? 😭 you get a warning message, and printing of custom attributes is just... not available. it's giving locked out of the group chat. πŸ’€


πŸŽ€ SYNTAX πŸŽ€

each attribute description is built from the attribute title, some brackets, and three key-value pairs. that's the whole recipe, no cap. 🧚

example time:

 attribute
 {
     name = CKA_IBM_RESTRICTABLE
     id = 0x80010001
     type = CK_BBOOL
 }
bestie, all three keywords β€” name, id, and type β€” are required to define an attribute. no skipping, no shortcuts, fr fr. πŸ™ˆ

here's the rules for each one:

  • the name must start with a letter, followed by an arbitrary number of letters, numbers, underscores, dots, minuses, or slashes. periodt. πŸ’…
  • the id can be in decimal or in hexadecimal format β€” hex just has to start with 0x. 🌈
  • the type β€” and the only valid values for it are these four, and nothing else:
    • CK_BBOOL
    • CK_ULONG
    • CK_BYTE
    • CK_DATE

⭐ Notes ⭐

the pound sign ('#') is what you use to indicate a comment β€” and it runs up to and including the end of the line. so go ahead and annotate your config, it's self-care. πŸ“πŸ’–


πŸ‘‘ SEE ALSO πŸ‘‘

p11sak(1) β€” go read that one too, iykyk. 🫢


and that's the whole page, bestie! 🌈 this lil slice of documentation is openCryptoki version 3.27.0, dated September 2021, and it ate, honestly. πŸ’…βœ¨ mwah, go configure those attributes. πŸŽ€πŸ¦‹πŸ’–