GNUTLS_X509_CRT_GET_AUTHORITY_KEY_ID(3)
π gnutls_x509_crt_get_authority_key_id(3)
okay bestie, so this one lives in the gnutls manual, and it's literally the function that goes "hey, what's the authority key id on this cert?" Let's get into it π«Ά
β¨ NAME β¨
gnutls_x509_crt_get_authority_key_id β it's an API function, no cap πΈ
π SYNOPSIS π
#include <gnutls/x509.h>
int gnutls_x509_crt_get_authority_key_id(gnutls_x509_crt_t cert, void *
id, size_t * id_size, unsigned int * critical);
like. she's a mouthful but she's iconic π
π¦ ARGUMENTS π¦
gnutls_x509_crt_t certβ this one should contain agnutls_x509_crt_ttype. that's the cert you're interrogating, periodt.void * idβ the place where the identifier will be copied. yes, the place. you bring the buffer, she fills it πsize_t * id_sizeβ holds the size of theidfield. she needs to know how much room she's working with.unsigned int * criticalβ will be non-zero if the extension is marked as critical. (may be null β so if you don't care, you can just pass NULL and vibe π)
π DESCRIPTION π
So what does she actually do? This function will return the X.509v3 certificate authority's key identifier. Slay.
Where does she get it? From the X.509 Authority Key identifier extension field β that's 2.5.29.35, write it down bestie, it comes up.
β οΈ okay this is the important part, don't scroll past it: this function only returns thekeyIdentifierfield of the extension. and it'll give youGNUTLS_E_X509_UNSUPPORTED_EXTENSIONif the extension contains the name and serial number of the certificate instead. In that case,gnutls_x509_crt_get_authority_key_gn_serial()may be used. like, different function, different job, iykyk π
π RETURNS π
On success, GNUTLS_E_SUCCESS (0) is returned π
- if the extension isn't there, you get
GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLEβ she's not mad, it's just not present π - otherwise, a negative error value. negative = bad vibes, check it.
π REPORTING BUGS π
Found a bug? Don't be shy, 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. (yes that's the whole legal bit, keep it, it's required, no skips π)
π 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 one's from gnutls 3.8.13 β go forth and read those authority key ids, you've got this, main character energy only πππ¦
π¦ 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