gnutls_x509_cr...y_key_gn_serial(3)

πŸ’– gnutls_x509_cr...y_key_gn_serial(3) πŸ’–

okay bestie, so this is a page from the gnutls manual, and today's main character is gnutls_x509_crt_get_authority_key_gn_serial. yes the name is a whole paragraph, we don't make the rules, we just slay within them πŸ’…


✨ NAME ✨

gnutls_x509_crt_get_authority_key_gn_serial β€” an API function, no cap πŸŽ€


🌸 SYNOPSIS 🌸

#include <gnutls/x509.h>

int gnutls_x509_crt_get_authority_key_gn_serial(gnutls_x509_crt_t cert,
       unsigned int seq, void * alt, size_t * alt_size, unsigned int *
       alt_type, void * serial, size_t * serial_size, unsigned int * critical);

like… look at that signature. that's seven parameters. it's giving overachiever and honestly? obsessed πŸ¦‹


🫢 ARGUMENTS 🫢

  • gnutls_x509_crt_t cert β€” should contain a gnutls_x509_crt_t type. yes bestie, a cert. the whole point.
  • unsigned int seq β€” specifies the sequence number of the alt name (0 for the first one, 1 for the second etc.). it's a little counter, ok? 0, 1, 2, keep going until the data runs out.
  • void * alt β€” is the place where the alternative name will be copied to. your lil destination buffer πŸ’–
  • size_t * alt_size β€” holds the size of alt.
  • unsigned int * alt_type β€” holds the type of the alternative name (one of gnutls_x509_subject_alt_name_t).
  • void * serial β€” buffer to store the serial number (may be null).
  • size_t * serial_size β€” Holds the size of the serial field (may be null).
  • unsigned int * critical β€” will be non-zero if the extension is marked as critical (may be null). so if it's giving critical energy, you'll know πŸ”₯

πŸ’œ DESCRIPTION πŸ’œ

This function will return the X.509 authority key identifier when stored as a general name (authorityCertIssuer) and serial number.

Because more than one general names might be stored, seq can be used as a counter to request them all until GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE is returned.

not me looping through every single one like it's a group chat scroll-back 😭 seq is literally your "keep going" button, and GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE is the "okay that's the end of the thread" moment. periodt.

⭐ RETURNS ⭐

On success, GNUTLS_E_SUCCESS (0) is returned, GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE if the extension is not present, otherwise a negative error value.

so: zero = ate. GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE = the extension simply isn't there, no drama. anything negative = something went sideways, read the error bestie πŸ™ˆ


πŸŽ€ SINCE πŸŽ€

3.0


🌈 REPORTING BUGS 🌈

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

found a bug? tell the gnutls girlies directly, they want to know fr fr 🫢

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.


🌸 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, you understood it, I'm so proud of you πŸ’– this was written for gnutls version 3.8.13, the same gnutls crew whose gnutls_x509_cr...y_key_gn_serial(3) page this is β€” go forth and go get that authority key identifier, you've got main character energy and the manpage to match βœ¨πŸ¦‹πŸ’…

πŸ“¦ where this page comes from