gnutls_x509_cr...y_key_gn_serial(3)

πŸ¦‹ gnutls_x509_cr...y_key_gn_serial(3) πŸ¦‹

okay bestie, so this is one of those gnutls manual pages β€” you know, the library that does all the TLS/certificate stuff. This one lives in section 3 of the manual (that's the library-calls section, iykyk) and it's about pulling authority key identifiers out of a certificate revocation list. grab a strawberry drink and let's get into it ✨


✨ NAME ✨

gnutls_x509_crl_get_authority_key_gn_serial β€” an API function, no cap πŸ’…


🌸 SYNOPSIS 🌸

#include <gnutls/x509.h>

int gnutls_x509_crl_get_authority_key_gn_serial(gnutls_x509_crl_t crl,
unsigned int seq, void * alt, size_t * alt_size, unsigned int *
alt_type, void * serial, size_t * serial_size, unsigned int * critical);

like, that's the whole vibe. seven args. she's a lot but she's worth it 🫢


πŸŽ€ ARGUMENTS πŸŽ€

  • gnutls_x509_crl_t crl β€” this one should contain a gnutls_x509_crl_t type. it's the CRL you're interrogating, bestie. be nice to her.
  • unsigned int seq β€” this is the sequence number of the alt name you want. 0 for the first one, 1 for the second, etc. it's giving "counter energy" ✨
  • void * alt β€” this is the place where the alternative name will be copied to. yes, copied. so bring a buffer.
  • size_t * alt_size β€” holds the size of alt. gotta tell her how much room she's got.
  • unsigned int * alt_type β€” holds the type of the alternative name (one of gnutls_x509_subject_alt_name_t). the enum is literally right there in the docs, slay.
  • void * serial β€” buffer to store the serial number (may be null). yeah, she's optional, no pressure πŸ’œ
  • size_t * serial_size β€” holds the size of the serial field (may be null). also optional, also chill.
  • unsigned int * critical β€” will be non-zero if the extension is marked as critical (may be null). so if it comes back non-zero, that extension is critical and the whole cert situation is lowkey dramatic 😭

πŸ’– DESCRIPTION πŸ’–

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

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. so you just keep looping and looping and looping until she says "that's all, bestie" β€” that's your signal to stop. don't keep asking after that, it's giving desperate πŸ™ˆ


πŸ”₯ RETURNS πŸ”₯

Returns 0 on success, or an error code. that's it. zero means we ate. anything else means something went sideways πŸ’€


⭐ SINCE ⭐

3.0 β€” she's been around since 3.0, a real veteran, main character energy since day one πŸ‘‘


πŸ› REPORTING BUGS πŸ›

Found a bug? don't suffer in silence, tell the girlies:


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 bestie, that means you can share it β€” just keep the receipt πŸ§ΎπŸ’–)


🧚 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/


ok so that's the whole page, and no we did not skip a single option or arg. we would never πŸ’…

and that's a wrap, babe β€” this little page is from gnutls 3.8.13, same name up top, and it's gnutls_x509_cr...y_key_gn_serial(3) all the way down. go forth and read those authority key identifiers βœ¨πŸ¦‹πŸ’–

πŸ“¦ where this page comes from