gnutls_x509_ext_print(3)

gnutls_x509_ext_print(3) πŸ’–

okay so bestie, welcome to the gnutls manual β€” yes, that gnutls, the TLS library that's literally holding the internet's handbag. this page is about gnutls_x509_ext_print, and ngl it's one of the cuter ones because it just… makes X.509 certificate extensions look pretty for humans. <sparkle>no cap</sparkle>. let's go πŸ¦‹


🌸 NAME 🌸

gnutls_x509_ext_print β€” API function ✨ (yes that's literally the whole name section, she's brief but she's iconic)


πŸŽ€ SYNOPSIS πŸŽ€

#include <gnutls/x509.h>

int gnutls_x509_ext_print(gnutls_x509_ext_st * exts, unsigned int
exts_size, gnutls_certificate_print_formats_t format, gnutls_datum_t *
out);

like. look at her. four args, one int return, zero drama πŸ’…


🫢 ARGUMENTS 🫢

  • gnutls_x509_ext_st * exts β€” the data to be printed. that's the extension(s) you're serving up for the makeover, bestie.
  • unsigned int exts_size β€” the number of available structures. i.e. how many gnutls_x509_ext_st cuties you're actually handing over. don't lie about the count, she WILL count them 😭
  • gnutls_certificate_print_formats_t format β€” indicate the format to use. yes queen, you get to pick the aesthetic. ✨
  • gnutls_datum_t * out β€” newly allocated datum with null terminated string. she mallocs it for you (a whole gift 🎁) and it comes null-terminated, so you can just print it. but you are the one who has to free it, we'll get to that.

πŸ’– DESCRIPTION πŸ’–

so, the vibe: this function will pretty print X.509 certificate extensions, suitable for display to a human. that's it. that's the job. she takes raw extension bytes and turns them into something your eyeballs can actually read without crying. it's giving translator, it's giving glow-up, it's giving "i got you boo". 🌈

⚠️ IMPORTANT BESTIE ⚠️ the output out needs to be deallocated using gnutls_free(). not free(), not delete, not vibes β€” gnutls_free(). it's hers, she made it, give it back properly or that's a memory leak and we don't do those πŸš«πŸ’€

⭐ RETURNS ⭐

on success, GNUTLS_E_SUCCESS (0) is returned β€” slay, we ate, zero notes πŸŽ‰ otherwise it returns a negative error value, which is gnutls-speak for "something went sideways, check it before you keep going." always check, bestie. always. πŸ™ˆ


😭 REPORTING BUGS 😭

found something cursed? report bugs to <bugs@gnutls.org>. they want to hear it fr fr.

home page: https://www.gnutls.org 🏠


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: use it, share it, 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, visit:

https://www.gnutls.org/manual/

iykyk β€” the Texinfo manual is the main character, this manpage is just her supportive bestie 🧚


that's the whole thing, babe. go forth and pretty-print those extensions, and remember: gnutls_free() it after. periodt. πŸ’…βœ¨

gnutls 3.8.13 β€” signing off from the gnutls_x509_ext_print(3) page, mwah πŸŽ€πŸ¦‹πŸ’–

πŸ“¦ where this page comes from