gnutls_x509_aki_get_cert_issuer(3)

✨ gnutls_x509_aki_get_cert_issuer β€” the manual page, but make it make sense πŸ’…

okay bestie, so this whole thing lives in the gnutls manual, and today we're pulling apart gnutls_x509_aki_get_cert_issuer(3). yes it's a mouthful. yes it's worth it. let's go πŸ¦‹


🌸 NAME 🌸

gnutls_x509_aki_get_cert_issuer β€” lowkey just an API function, but like, a useful one ✨


πŸŽ€ SYNOPSIS πŸŽ€

#include <gnutls/x509-ext.h>

int gnutls_x509_aki_get_cert_issuer(gnutls_x509_aki_t aki, unsigned int
seq, unsigned int * san_type, gnutls_datum_t * san, gnutls_datum_t *
othername_oid, gnutls_datum_t * serial);

not me dropping the exact signature so you can copy-paste it fr fr πŸ™ˆ


πŸ’– ARGUMENTS πŸ’–

  • gnutls_x509_aki_t aki β€” the authority key ID. that's the thing we're digging through πŸ•΅οΈβ€β™€οΈ
  • unsigned int seq β€” the index of the name you wanna grab. like, which one in the list, bestie
  • unsigned int * san_type β€” this is where the type of the name gets written (it's one of the gnutls_subject_alt_names_t types) πŸ‘‘
  • gnutls_datum_t * san β€” the alternative name data itself
  • gnutls_datum_t * othername_oid β€” the object identifier, but only if san_type is GNUTLS_SAN_OTHERNAME. otherwise it's giving nothing πŸ’€
  • gnutls_datum_t * serial β€” the authorityCertSerialNumber number. iconic, we love a serial πŸ“

🌈 DESCRIPTION 🌈

so what this function does is: it hands you back one specific authorityCertIssuer name exactly as it's stored in the aki type, plus the authorityCertSerialNumber. two for one, we ate πŸ”₯

important though β€” all the returned values should be treated as constant. do not go messing with them, they are not yours to edit, periodt. and if you don't need some of them? you can just set those pointers to NULL and they'll be skipped, no drama πŸ’…


⭐ RETURNS ⭐

  • on success you get GNUTLS_E_SUCCESS (which is literally 0) 🫢
  • if your index is out of bounds you get GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE β€” like, bestie, that name doesn't exist
  • anything else? a negative error value. and negative means bad vibes, obviously 😭

🧚 SINCE 🧚

3.3.0 β€” she's been around a minute, a true veteran πŸ’œ


πŸ› REPORTING BUGS πŸ›

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


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, go off, 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/

that's the whole assignment, iykyk 🌈


ok that's the whole page bestie, every flag, every argument, every error code, all of it, no cap πŸ’–

and a lil sign-off for you: this was gnutls 3.8.13, and she said what she said πŸŽ€ stay curious, read your man pages, and slay πŸ’…πŸ‘‘

πŸ“¦ where this page comes from