GNUTLS_X509_CRQ_SET_EXTENSION_BY_OID(3)

✨ NAME ✨

gnutls_x509_crq_set_extension_by_oid β€” bestie, this is the API function that slaps an extension onto a certificate request πŸ’… (and yes, it lives in the gnutls manual, section 3, iykyk)


🌸 SYNOPSIS 🌸

#include <gnutls/x509.h>

int gnutls_x509_crq_set_extension_by_oid(gnutls_x509_crq_t crq, const
char * oid, const void * buf, size_t sizeof_buf, unsigned int critical);

okay so literally just include the header and you're in 🫢


πŸŽ€ ARGUMENTS πŸŽ€

  • gnutls_x509_crq_t crq β€” a certificate request of type gnutls_x509_crq_t. this is the main character you're decorating ✨
  • const char * oid β€” holds an Object Identifier as a null terminated string. it's giving "who dis extension" energy πŸ‘‘
  • const void * buf β€” a pointer to DER encoded data. the actual contents, raw and real πŸ™ˆ
  • size_t sizeof_buf β€” holds the size of buf. like, how much data are we working with, fr fr
  • unsigned int critical β€” should be non-zero if the extension is to be marked as critical ⚠️ non-zero = critical, zero = not critical, no in-between bestie

πŸ’– DESCRIPTION πŸ’–

This function will set an the extension, by the specified OID, in the certificate request. The extension data should be binary data DER encoded.

so basically: you hand it the crq, you hand it the OID of the extension you want, you hand it the DER-encoded bytes, and boom β€” the extension is set. the way that the data must be DER encoded though... no cap, it's not optional. binary DER or nothing πŸ¦‹


⭐ RETURNS ⭐

On success, GNUTLS_E_SUCCESS (0) is returned, otherwise a negative error value. so like... zero is the slay outcome, anything negative means something went sideways 😭


πŸ’€ REPORTING BUGS πŸ’€

Found a bug? Not me gatekeeping the email β€” 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. iconic licensing behavior honestly 🌈


πŸ¦‹ 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/


that's the whole page bestie, no notes πŸ’œ

this was gnutls version 3.8.13, brought to you by the gnutls_x509_crq_set_extension_by_oid(3) manual page β€” go set some extensions, you've got this πŸŽ€βœ¨

πŸ“¦ where this page comes from