gnutls_x509_cr...t_alt_othername(3)

πŸ’– gnutls_x509_crq_set_subject_alt_othername β€” API function πŸ’–

okay bestie, so this page lives in the gnutls manual (that's the manual name, and yes it's giving cryptography main character energy πŸ‘‘), and it's all about one very specific little function. let's get into it πŸ¦‹


✨ SYNOPSIS ✨

#include <gnutls/x509.h>

int gnutls_x509_crq_set_subject_alt_othername(gnutls_x509_crq_t crq,
const char * oid, const void * data, unsigned int data_size, unsigned
int flags);

like, five arguments, no notes. she's thorough πŸ’…


🌸 ARGUMENTS 🌸

  • gnutls_x509_crq_t crq β€” a certificate request of type gnutls_x509_crq_t. yes the type is the same as the name, it's just like that, we don't question it πŸ™ˆ
  • const char * oid β€” this is the othername OID. the little dotted identifier that says which othername we're talking about πŸŽ€
  • const void * data β€” the data to be set. that's it, that's the data πŸ’œ
  • unsigned int data_size β€” the size of data to be set. gotta tell her how big it is, she's not psychic ✨
  • unsigned int flags β€” your vibe selector: GNUTLS_FSAN_SET to clear previous data, or GNUTLS_FSAN_APPEND to append. so like, fresh start or add-to-the-pile, pick one 🫢

πŸ¦‹ DESCRIPTION πŸ¦‹

so this function will set the subject alternative name certificate extension. iconic behaviour, truly.

it can set the following types:

and then... nothing. the list is empty in the source text, bestie. the types are implied, the types are mysterious. iykyk 😭

the important part though, fr fr: the values set must be binary values and must be properly DER encoded. no cap. if you're handing her something that isn't binary and DER-encoded, that's not it, and she will not be slaying.


⭐ RETURNS ⭐

on success, GNUTLS_E_SUCCESS (that's 0) is returned πŸŽ‰

otherwise you get a negative error value. sad girl hours, but at least she tells you πŸ’€


🌈 SINCE 🌈

3.5.0 β€” she's been around, she's got history, respect the elders πŸ‘‘


πŸ’Œ REPORTING BUGS πŸ’Œ

found a bug? spill. report bugs to <bugs@gnutls.org>.

home page, for the girlies who like to browse: 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, 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/

that's your girl. she has everything 🌸


and that's the whole page, bestie πŸ’… this one's from gnutls version 3.8.13, dated alongside the gnutls_x509_cr...t_alt_othername(3) page β€” so go forth, set that othername, DER-encode responsibly, and stay slaying πŸ¦‹βœ¨πŸ’–

πŸ“¦ where this page comes from