gnutls_x509_cr...t_alt_othername(3)

πŸ’– gnutls_x509_crt_set_subject_alt_othername πŸ’–

okay bestie, so this one lives in the gnutls manual, and the whole page is basically gnutls_x509_cr...t_alt_othername(3) β€” yeah the title got truncated, the full name is the icon it is, we move. πŸŽ€


✨ NAME ✨

gnutls_x509_crt_set_subject_alt_othername β€” API function πŸ’…


✨ SYNOPSIS ✨

#include <gnutls/x509.h>

int gnutls_x509_crt_set_subject_alt_othername(gnutls_x509_crt_t crt,
const char * oid, const void * data, unsigned int data_size, unsigned
int flags);

✨ ARGUMENTS ✨

  • gnutls_x509_crt_t crt β€” a certificate of type gnutls_x509_crt_t πŸ¦‹ like, the actual cert you're messing with.
  • const char * oid β€” The other name OID πŸ‘‘ that's the identifier for whatever kind of othername you're adding.
  • const void * data β€” The data to be set 🌸 the actual payload, right there.
  • unsigned int data_size β€” The size of data to be set πŸ“
  • unsigned int flags β€” GNUTLS_FSAN_SET to clear previous data, or GNUTLS_FSAN_APPEND to append. 🫢 (so: wipe and replace, or stack it on top β€” pick your fighter)

✨ DESCRIPTION ✨

This function will set an "othername" to the subject alternative name certificate extension. slay ✨

The values set are set as binary values and are expected to have the proper DER encoding. πŸ’€ yes bestie, DER, no it does not do the encoding for you by default, you gotta bring it yourself.

BUT. For convenience 😌 the flags GNUTLS_FSAN_ENCODE_OCTET_STRING and GNUTLS_FSAN_ENCODE_UTF8_STRING can be used to encode the provided data. so if you don't feel like hand-rolling your DER, those two flags have your back, fr fr. πŸŽ€


✨ RETURNS ✨

On success, GNUTLS_E_SUCCESS (0) is returned, otherwise a negative error value. 😭 zero means we ate, negative means we did not.


✨ SINCE ✨

3.5.0 πŸ•°οΈ she's been here a minute, periodt.


✨ REPORTING BUGS ✨

Found a bug? Tell the people πŸ›πŸ’Œ


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 you can share it, just keep the receipts, that's all they ask)


✨ 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/

ngl if you got this far you're genuinely built different. go set some othernames, bestie, I believe in you πŸ’œ

and that's the whole page!! this one's from the gnutls manual, version 3.8.13 πŸŽ€ mwah, go forth and certificate, ily bye βœ¨πŸ’–πŸ¦‹

πŸ“¦ where this page comes from