gnutls_pkcs11_token_set_pin(3)

✨ gnutls_pkcs11_token_set_pin(3) ✨

okay bestie, welcome to the gnutls manual, section 3 β€” yes, that's the section for library calls, and yes, this whole page is about changing a PIN on a PKCS #11 token. it's giving security girlie. let's go πŸ’…


πŸŽ€ NAME πŸŽ€

gnutls_pkcs11_token_set_pin β€” literally just an API function, that's it, that's the whole name πŸ’–


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <gnutls/pkcs11.h>

int gnutls_pkcs11_token_set_pin(const char * token_url, const char *
oldpin, const char * newpin, unsigned int flags);

look at her. four args. very demure, very mindful ✨


🌸 ARGUMENTS 🌸

  • const char * token_url β€” a PKCS 11 URL that specifies a token. this is you pointing at which token you mean, bestie, so don't be vague πŸ”
  • const char * oldpin β€” the old user's PIN. the current one. the one you're replacing πŸ‘‹
  • const char * newpin β€” the new user's PIN. the glow-up version πŸ’…
  • unsigned int flags β€” one of gnutls_pin_flag_t. pick your fighter πŸŽ€

πŸ’œ DESCRIPTION πŸ’œ

so here's the tea: this function will modify or set a user's or an administrator's PIN for the given token. iconique.

if you're calling it to set a PIN for the first time, then oldpin must be NULL. no old PIN exists, so don't make one up, she'll know πŸ™ˆ

and when you're setting the admin's PIN with the GNUTLS_PIN_SO flag, the oldpin value must be provided. > heads up though: that requirement got relaxed after GnuTLS 3.6.5, and since then the PIN will be requested if it's missing. so like, lowkey flexible now 🫢


⭐ RETURNS ⭐

on success, GNUTLS_E_SUCCESS (0) is returned. anything else? that's a negative error value, and you should go read it. no skipping 😭


πŸ’€ REPORTING BUGS πŸ’€

found a bug? report it to <bugs@gnutls.org>. they're waiting, fr fr.

home page: <https://www.gnutls.org>


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. so like, take it, 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, go visit:

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

iykyk πŸ“š


and that's the whole page, bestie!! this was gnutls manual page gnutls_pkcs11_token_set_pin(3), straight out of GnuTLS 3.8.13 β€” go forth and rotate those PINs responsibly πŸ’–πŸ”βœ¨

πŸ“¦ where this page comes from