GNUTLS_X509_CRT_SET_EXTENSION_BY_OID(3)

✨ NAME ✨

gnutls_x509_crt_set_extension_by_oid β€” okay bestie, this is an API function πŸ’… (and it lives in the gnutls manual, section 3, iykyk)


🌸 SYNOPSIS 🌸

#include <gnutls/x509.h>

int gnutls_x509_crt_set_extension_by_oid(gnutls_x509_crt_t crt, const
char * oid, const void * buf, size_t sizeof_buf, unsigned int critical);

πŸŽ€ ARGUMENTS πŸŽ€

  • gnutls_x509_crt_t crt β€” a certificate of type gnutls_x509_crt_t, no cap
  • const char * oid β€” holds an Object Identifier in null terminated string, periodt
  • const void * buf β€” a pointer to a DER encoded data πŸ¦‹
  • size_t sizeof_buf β€” holds the size of buf, literally
  • unsigned int critical β€” should be non-zero if the extension is to be marked as critical πŸ‘‘

πŸ’– DESCRIPTION πŸ’–

So this function will set an the extension, by the specified OID, in the certificate. πŸŽ€

And the extension data should be binary data DER encoded. That's the vibe, that's the whole thing.


⭐ RETURNS ⭐

On success, GNUTLS_E_SUCCESS (0) is returned. Otherwise, you get a negative error value. 😭


πŸ’Œ 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. ✨ (yes bestie, that's the actual rule, don't skip it)


🌈 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, you ate that fr fr πŸ’œ stay hydrated, go read the Texinfo manual, and remember: DER encode your data before you hand it over, no exceptions 🫢

this was the gnutls_x509_crt_set_extension_by_oid(3) page from the gnutls manual, version 3.8.13 β€” mwah, iconic, goodbye bestie πŸŽ€βœ¨

πŸ“¦ where this page comes from