pskc_set_cryptomodule_id(3)

πŸ’… pskc_set_cryptomodule_id

okay bestie, so this is a page from the libpskc manual, and the star of the show is pskc_set_cryptomodule_id(3) β€” yes it's a long name, no we're not shortening it, it's iconic like that πŸ’–


✨ NAME ✨

pskc_set_cryptomodule_id β€” literally just an API function, that's the whole job 🫢


✨ SYNOPSIS ✨

#include <pskc.h>

void pskc_set_cryptomodule_id(pskc_key_t * key, const char * cid);

✨ ARGUMENTS ✨

  • pskc_key_t * key β€” a pskc_key_t handle, the one you get from pskc_get_keypackage(). that's your main character right there πŸ‘‘
  • const char * cid β€” the cryptomodule id you wanna set. yes queen, hand it over πŸ’…

🌸 DESCRIPTION 🌸

so what this does: it sets the PSKC KeyPackage CryptoModule Id value. lowkey important.

This element carries a unique identifier for the CryptoModule, and it's implementation specific β€” like, each implementation does its own thing with it, iykyk. Because of that, it helps you identify a specific CryptoModule that the key is being provisioned to, or was provisioned to. it's giving "return address label for your key" energy πŸŽ€

⚠️ okay this part is the big one, don't skip it: the pointer is stored in the container, not a copy of the data. so no cap β€” you must not deallocate that data before another call to this function, or before the last call to any function that uses the container. otherwise it's a whole mess 😭

⭐ SINCE ⭐

2.2.0 β€” she's been around a minute πŸ¦‹


πŸ› REPORTING BUGS πŸ›

found a bug? don't suffer in silence, report it to <oath-toolkit-help@nongnu.org>. πŸ’Œ


Copyright Β© 2009-2026 Simon Josefsson.

Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. periodt πŸ’œ


and that's the whole vibe check bestie β€” this page is from libpskc, version 2.6.15 🌈 tysm for reading, go forth and set those cryptomodule ids responsibly βœ¨πŸŽ€

πŸ“¦ where this page comes from