pskc_set_device_devicebinding(3)

πŸ’… pskc_set_device_devicebinding β€” the libpskc glow-up you needed

okay so bestie, welcome to pskc_set_device_devicebinding(3), a lil function from libpskc that's lowkey doing the most important job in the room. we're gonna set a device binding, and we're gonna slay while doing it ✨


🌸 NAME 🌸

pskc_set_device_devicebinding β€” the API function that sets the DeviceBinding value. yes that's the whole name, she's long but she's iconic πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

#include <pskc.h>

void pskc_set_device_devicebinding(pskc_key_t * key, const char *
devbind);

that's it. that's the whole vibe check. one include, one function call, no drama πŸ¦‹


✨ ARGUMENTS ✨

  • pskc_key_t * key β€” a pskc_key_t handle, and you get it straight from pskc_get_keypackage(). like, that's her origin story 🫢
  • const char * devbind β€” a string holding the device binding you wanna set. just a cute lil string, no cap πŸ’–

πŸ”₯ DESCRIPTION πŸ”₯

so what does she actually do? she sets the PSKC KeyPackage DeviceInfo DeviceBinding value. periodt. πŸ’€

but like, what does that mean, bestie? okay so β€” this element lets a provisioning server make absolutely sure that the key is gonna be loaded into the exact device for which the key provisioning request was approved. it's giving "you're not getting in without the right ID" energy πŸ‘‘

the device gets bound to the request using a device identifier β€” for example an International Mobile Equipment Identity (IMEI) for the phone, or an identifier for a class of identifiers, like those for which the keys are protected by a Trusted Platform Module (TPM). main character security fr fr πŸ”₯

⚠️ okay this part is important, bestie, don't skip it: the pointer is stored in container, not a copy of the data. so you absolutely must not deallocate the data before another call to this function, or before the last call to any function using container. like, the container is holding onto your pointer, so if you free it early it's over for you 😭 no cap, that's how you get undefined-behaviour-ified.

⭐ SINCE ⭐

2.2.0 β€” she's been around, she's not new here πŸ’œ


🌈 REPORTING BUGS 🌈

found a bug? don't suffer in silence, bestie, 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. πŸŽ€


and that's the page, bestie πŸ’– this absolute icon of a manpage came to you from libpskc, version 2.6.15, living her best life under the name pskc_set_device_devicebinding(3). go set those device bindings, stay hydrated, and don't free that pointer early πŸŒΈπŸ¦‹βœ¨

πŸ“¦ where this page comes from