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 fromgnutls_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 ofoutput_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_sizegets updated andGNUTLS_E_SHORT_MEMORY_BUFFERwill 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 π
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
- 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