gnutls_certifi...et_pin_function(3)

✨ gnutls_certificate_set_pin_function ✨

okay bestie, welcome to the gnutls manual, page gnutls_certificate_set_pin_function(3) πŸ’– this one's short, sweet, and honestly kinda iconic. let's get into it 🫢


🌸 NAME 🌸

gnutls_certificate_set_pin_function β€” it's an API function, no cap πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

#include <gnutls/gnutls.h>

void
gnutls_certificate_set_pin_function(gnutls_certificate_credentials_t
cred, gnutls_pin_callback_t fn, void * userdata);

literally just three args and no return value. void-coded. it's giving "I do my job and I leave" πŸ’€βœ¨


πŸ¦‹ ARGUMENTS πŸ¦‹

  • gnutls_certificate_credentials_t cred β€” bestie this is a gnutls_certificate_credentials_t type. that's it, that's the whole description 😭 it's the creds you're attaching stuff to.
  • gnutls_pin_callback_t fn β€” a PIN callback πŸ‘‘ the function that's gonna handle PIN duty.
  • void * userdata β€” data to be passed in the callback. your lil care package that rides along 🎁

πŸ’– DESCRIPTION πŸ’–

so the way this works: this function sets a callback function that gets used when gnutls needs to access a protected object. think locked-up keys, PIN-protected vibes πŸ”

and hear me out β€” this one overrides any other global PIN functions. it's the main character. periodt. πŸ‘‘

⚠️ okay but listen: this function must be called right after initialization to have effect. not later. not whenever. right after. if you're late, it simply does not care and does nothing for you πŸ™ˆ

⭐ SINCE ⭐

3.1.0 β€” old money, been serving since forever πŸ’œ


🌈 REPORTING BUGS 🌈

found a bug? spill it, fr fr πŸ›


Copyright Β© 2001-2023 Free Software Foundation, Inc., and others.

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. πŸ’– (yes queen, go ahead and share it, just keep the receipts 🧾)


🧚 SEE ALSO 🧚

The full documentation for gnutls is maintained as a Texinfo manual. If the /usr/share/doc/gnutls/ directory does not contain the HTML form, visit

https://www.gnutls.org/manual/

iykyk, the whole lore is in there πŸ“šβœ¨


and that's the whole page bestie!! this lil cutie comes from gnutls 3.8.13 πŸ«ΆπŸ’… go set that PIN callback right after init, okay? love u, bye!! πŸŒΈπŸ¦‹πŸ’–

πŸ“¦ where this page comes from