gnutls_pubkey_get_key_id(3)

✨ gnutls_pubkey_get_key_id ✨

ok bestie so this one is from the gnutls manual (section 3, the library function girlies πŸ’…) and it's literally about getting a key ID for a public key. so useful. so iconic. let's go 🫢


🌸 NAME 🌸

gnutls_pubkey_get_key_id β€” API function πŸ’–


πŸŽ€ SYNOPSIS πŸŽ€

#include <gnutls/abstract.h>

int gnutls_pubkey_get_key_id(gnutls_pubkey_t key, unsigned int flags,
       unsigned char * output_data, size_t * output_data_size);

πŸ¦‹ ARGUMENTS πŸ¦‹

  • gnutls_pubkey_t key β€” this one holds the public key. like it is the public key. main character energy πŸ”‘
  • unsigned int flags β€” bestie this should be one of the flags from gnutls_keyid_flags_t. one of them. pick wisely ✨
  • unsigned char * output_data β€” this is gonna contain the key ID once we're done. it's the lil container, the vessel, the ✨destination✨
  • size_t * output_data_size β€” holds the size of output_data, and heads up: it gets replaced by the actual size of parameters. so it comes in as one thing and leaves as another. glow up πŸ’…

πŸ’– DESCRIPTION πŸ’–

So this function returns a unique ID that depends on the public key parameters. no cap, it's unique to those params. you can use this ID to check whether a certificate corresponds to the given public key. like a lil vibe check for certificates πŸ”₯

Now, important part, don't skip this:

If the buffer you provided is not long enough to hold the output, then *output_data_size gets updated and GNUTLS_E_SHORT_MEMORY_BUFFER will be returned. 😭 the buffer said "not today."

And the output will normally be a SHA-1 hash output, which is 20 bytes. twenty. bytes. that's the usual situation 🌸


⭐ RETURNS ⭐

If it fails, you get a negative error code back. and if it succeeds? you get 0. zero. slay. that's the whole thing πŸŽ€


🌈 SINCE 🌈

2.12.0 β€” she's been here a minute, an elder, a legend, a queen πŸ‘‘


πŸ™ˆ REPORTING BUGS πŸ™ˆ

Report bugs to <bugs@gnutls.org>. Home page: https://www.gnutls.org

like pls actually tell them if something's broken, they wanna know 🫢


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.

(translation: you can copy and share this file, with or without changes, in any medium, no royalty needed β€” just keep the copyright notice and this notice intact. that's the deal πŸ’…)


πŸ” 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/

go read it, it's giving comprehensive πŸ“šβœ¨


and that's the whole page bestie!! gnutls 3.8.13 babes, page for gnutls_pubkey_get_key_id(3) β€” mwah, take care of ur key IDs, ily, bye πŸ§šπŸ’–

πŸ“¦ where this page comes from