gnutls_x509_crt_get_tlsfeatures(3)

✨ NAME ✨

gnutls_x509_crt_get_tlsfeatures β€” okay so this is the API function that pulls the X.509 TLS features extension out of a certificate, bestie πŸ’–


🌸 SYNOPSIS 🌸

#include <gnutls/x509.h>

int gnutls_x509_crt_get_tlsfeatures(gnutls_x509_crt_t crt,
gnutls_x509_tlsfeatures_t features, unsigned int flags, unsigned int *
critical);

πŸŽ€ ARGUMENTS πŸŽ€

  • gnutls_x509_crt_t crt β€” your X.509 certificate, the main character of this whole situation πŸ‘‘
  • gnutls_x509_tlsfeatures_t features β€” if this function slays (i.e. succeeds), the features get stored in this variable. it's giving output parameter energy ✨
  • unsigned int flags β€” literally either zero or GNUTLS_EXT_FLAG_APPEND. those are your options, no in-between πŸ’…
  • unsigned int * critical β€” the extension status, dropped in here for you 🫢

πŸ¦‹ DESCRIPTION πŸ¦‹

so this function gets the X.509 TLS features extension structure from the certificate. no cap. πŸ“

the returned structure needs to be freed using gnutls_x509_tlsfeatures_deinit() β€” yes bestie, you have to clean up after yourself, that's the rule 😭

when the flags is set to GNUTLS_EXT_FLAG_APPEND, then if the features structure is empty, this function will behave identically as if the flag was not set. otherwise, if there are elements in the features structure, then they will be merged with. merged! like a friendship bracelet situation 🀝

not me reminding you again: features must be initialized prior to calling this function. like, before. prior. do it. πŸ™ˆ

⭐ RETURNS ⭐

on success, GNUTLS_E_SUCCESS (0) is returned, otherwise a negative error value. so if you see a negative number, that's your vibe check failing, bestie πŸ’€


🌈 SINCE 🌈

3.5.1 β€” vintage, but still iconic ✨


πŸ’œ REPORTING BUGS πŸ’œ

found a bug? spill the tea to <bugs@gnutls.org> πŸ“§

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. so like, share it, remix 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/


and that's the whole page, bestie β€” this was gnutls 3.8.13, the gnutls_x509_crt_get_tlsfeatures(3) era, and yes it ate πŸ’…πŸ’–

πŸ“¦ where this page comes from