GNUTLS_X509_CRQ_GET_EXTENSION_DATA(3)

πŸ’– gnutls_x509_crq_get_extension_data(3) πŸ’–

okay bestie, welcome to the gnutls manual, we're doing a lil deep dive today πŸŽ€


✨ NAME ✨

gnutls_x509_crq_get_extension_data β€” API function. she's a function, she's in the API, she gets extension data, periodt πŸ’…


✨ SYNOPSIS ✨

#include <gnutls/x509.h>

int gnutls_x509_crq_get_extension_data(gnutls_x509_crq_t crq, unsigned
indx, void * data, size_t * sizeof_data);

yes the include is right there, don't forget it, she will not work without it πŸ™ˆ


✨ ARGUMENTS ✨

  • gnutls_x509_crq_t crq β€” this is supposed to contain a gnutls_x509_crq_t type. that's the whole assignment. she holds the crq, that's her job 🫢
  • unsigned indx β€” tells us which extension number we want. use (0) to get the very first one, like the opening track on the album 🎡
  • void * data β€” a pointer to a structure that's gonna hold the data. and bestie, it may be null. lowkey flexible of her ✨
  • size_t * sizeof_data β€” this one initially holds the size of oid πŸ‘€

✨ DESCRIPTION ✨

so this function will return the requested extension data in the certificate. the extension data gets stored as a string in the buffer you provided. simple, clean, iconic πŸ’–

use gnutls_x509_crq_get_extension_info() to extract the OID and the critical flag.

and use gnutls_x509_crq_get_extension_by_oid() instead if you want to get data indexed by the extension OID rather than by sequence. like, different vibe, different lookup, iykyk πŸ’…


✨ RETURNS ✨

on success, GNUTLS_E_SUCCESS (0) is returned πŸŽ‰ otherwise you get a negative error code, in case of an error. and if you've reached the last extension available, GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE will be returned. that's the "bestie there's no more, you've hit the end of the list" error 😭


✨ SINCE ✨

2.8.0 β€” she's been around, she's a legacy queen πŸ‘‘


✨ REPORTING BUGS ✨

report bugs 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, go off, but 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, go visit

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

like, just click it, she's right there πŸ¦‹


and that's the whole page bestie, you ate πŸ’… this was gnutls version 3.8.13, from the gnutls_x509_crq..._extension_data(3) manual β€” mwah, go read some extension data, you've got this πŸŽ€πŸ’–πŸŒΈ

πŸ“¦ where this page comes from