GNUTLS_X509_PRIVKEY_SET_PIN_FUNCTION(3)
β¨ gnutls_x509_privkey_set_pin_function(3) β¨
okay bestie, welcome to the gnutls manual, and today's episode is about one very specific little function. it's an API function, it lives in gnutls, and it's about to be your new bestie if you've ever needed to hand a PIN over to something that really wants a PIN. π
πΈ NAME πΈ
gnutls_x509_privkey_set_pin_function β an API function, no cap
π SYNOPSIS π
#include <gnutls/x509.h>
void gnutls_x509_privkey_set_pin_function(gnutls_x509_privkey_t privkey,
gnutls_pin_callback_t fn, void * userdata);
π ARGUMENTS π
gnutls_x509_privkey_t privkeyβ the certificate structure π«Ά like, this is the thing you're attaching your callback to.gnutls_pin_callback_t fnβ the callback β¨ the actual function that's gonna get called.void * userdataβ data associated with the callback π it rides along withfn, so whatever you need to hand it, this is where it goes.
π¦ DESCRIPTION π¦
so here's the tea, bestie: this function will set a callback function to be used when it is required to access a protected object. that's the whole vibe. π
and the important part β this function overrides the global function set using gnutls_pkcs11_set_pin_function(). so if you've already set a global one and then you set this one, this one wins. local beats global, main character energy, periodt. π
also note, and this is key: this callback is used when decrypting a key. π that's its moment, that's its whole thing.
β SINCE β
3.4.0 β she's been around for a while, iconic behavior.
π REPORTING BUGS π
found a bug? don't suffer in silence, tell the gnutls people:
- Report bugs to <bugs@gnutls.org>.
- Home page: https://www.gnutls.org
π COPYRIGHT π
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. π
π 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/
and that's the whole page, bestie!! πβ¨ this was gnutls, version 3.8.13, and honestly? she ate. go set that callback. π«Άπ
π¦ where this page comes from
- alpine 3.22: gnutls-doc 3.8.13-r0 Β· LGPL-2.1-or-later
- alpine 3.23: gnutls-doc 3.8.13-r0 Β· LGPL-2.1-or-later
- alpine 3.24: gnutls-doc 3.8.13-r0 Β· LGPL-2.1-or-later
- arch rolling: gnutls 3.8.13-3 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 43: gnutls-devel 3.8.13-1.fc43 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 43: gnutls-devel 3.8.13-1.fc43 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 44: gnutls-devel 3.8.13-1.fc44 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 44: gnutls-devel 3.8.13-1.fc44 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- ubuntu stonking: gnutls-doc 3.8.13-1ubuntu1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms