gnutls_pkcs12_bag_get_key_id(3)

πŸ’– NAME πŸ’–

gnutls_pkcs12_bag_get_key_id β€” the API function that pulls a key ID out of your PKCS#12 bag, bestie ✨

(yeah it's from the gnutls manual, and yes it's exactly as niche as it sounds 🫢)


πŸŽ€ SYNOPSIS πŸŽ€

#include <gnutls/pkcs12.h>

int gnutls_pkcs12_bag_get_key_id(gnutls_pkcs12_bag_t bag, unsigned indx,
gnutls_datum_t * id);

🌸 ARGUMENTS 🌸

  • gnutls_pkcs12_bag_t bag β€” the bag itself, the whole vibe container πŸ’…
  • unsigned indx β€” which element of the bag you're adding the id for, like picking your fave out of the lineup πŸ‘‘
  • gnutls_datum_t * id β€” the spot where the ID gets copied to, and heads up, you treat it as const 🫢

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so, this function hands you back the key ID of whichever bag element you pointed at with indx. that's it, that's the whole thing ✨

and why do you even care about a key ID? because it's usually the lil name tag that lets you tell your local private key apart from the certificate pair that goes with it πŸ’–. it's giving matching friendship bracelets but for crypto, fr fr.


⭐ RETURNS ⭐

if everything goes right you get GNUTLS_E_SUCCESS (which is 0) back, slay πŸŽ‰

otherwise? negative error value, or a negative error code on error. so basically: zero = good, negative = not good, no cap 😭


πŸ’€ REPORTING BUGS πŸ’€

found a bug? don't suffer in silence, tell the people:


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. (iconic behaviour honestly, they ate πŸ’…)


πŸ‘‘ 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/

and that's the whole page bestie!! this was gnutls version 3.8.13, page gnutls_pkcs12_bag_get_key_id(3), and it's giving certified classic. go get those key IDs, you got this πŸ«Άβœ¨πŸ’–

πŸ“¦ where this page comes from