gnutls_x509_crq_get_tlsfeatures(3)

✨ NAME ✨

gnutls_x509_crq_get_tlsfeatures β€” bestie, this is an API function πŸ’– (and yeah, it lives in the gnutls manual, hi hello, welcome to the group chat)


🌸 SYNOPSIS 🌸

#include <gnutls/x509.h>

int gnutls_x509_crq_get_tlsfeatures(gnutls_x509_crq_t crq,
gnutls_x509_tlsfeatures_t features, unsigned int flags, unsigned int *
critical);

πŸŽ€ ARGUMENTS πŸŽ€

  • gnutls_x509_crq_t crq β€” an X.509 certificate request. yes, the whole request. it's giving paperwork energy but make it ✨cryptographic✨
  • gnutls_x509_tlsfeatures_t features β€” okay so if this function pops off and succeeds, the features get stored in this variable. it's the little container that catches the loot 🫢
  • unsigned int flags β€” either zero or GNUTLS_EXT_FLAG_APPEND. pick your fighter πŸ’…
  • unsigned int * critical β€” the extension status. it's a pointer, so it can hand you back the tea about whether this extension is marked critical πŸ‘‘

πŸ’… DESCRIPTION πŸ’…

So what this function does: it goes into the certificate request and gets the X.509 TLS features extension structure out of it. That's the whole vibe. πŸ’–

Important, bestie: the returned structure needs to be freed using gnutls_x509_tlsfeatures_deinit(). do not ghost it, that's a leak and leaks are not the aesthetic 😭

Now about the flags situation. When flags is set to GNUTLS_EXT_FLAG_APPEND, here's the lore:

  • if the features structure is empty, this function behaves identically to how it would if the flag wasn't set at all. same energy, no notes.
  • otherwise, if there are elements in the features structure, then they will be merged with. they get combined. it's a collab πŸ”₯
Heads up 🚨 β€” features must be initialized prior to calling this function. like, before. in advance. don't come in unprepared, that's not the move πŸ™ˆ

🌈 RETURNS 🌈

On success, GNUTLS_E_SUCCESS (0) is returned. slay. otherwise you get a negative error value, which is the function's way of saying "not today" πŸ’€


⭐ SINCE ⭐

3.5.1 β€” been iconic since day one, no cap.


πŸ¦‹ REPORTING BUGS πŸ¦‹

Found a bug? tell the people, they wanna know πŸ’Œ


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: take 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/

okay that's the whole page bestie, you ate that πŸ“ this was gnutls version 3.8.13, page gnutls_x509_crq_get_tlsfeatures(3), mwah πŸ’œ go forth and free your structures 🧚

πŸ“¦ where this page comes from