GNUTLS_X509_CRT_SET_ISSUER_DN_BY_OID(3)

πŸ’– gnutls_x509_crt_set_issuer_dn_by_oid β€” the manual page bestie πŸ’–

okay so this is a page from the gnutls manual (section 3, the library functions girlies), and it's all about one very specific lil API function. buckle up πŸŽ€


✨ NAME ✨

gnutls_x509_crt_set_issuer_dn_by_oid β€” literally an API function, that's the whole name, no notes πŸ’…


🌸 SYNOPSIS 🌸

#include <gnutls/x509.h>

int gnutls_x509_crt_set_issuer_dn_by_oid(gnutls_x509_crt_t crt, const
char * oid, unsigned int raw_flag, const void * name, unsigned int
sizeof_name);

bestie look at that signature, she's serving parameters 🫢


πŸ¦‹ ARGUMENTS πŸ¦‹

  • gnutls_x509_crt_t crt β€” a certificate of type gnutls_x509_crt_t. the main character we're editing, periodt.
  • const char * oid β€” holds an Object Identifier in a null terminated string. yes it's a whole string, yes it's null terminated, we love that for it ✨
  • unsigned int raw_flag β€” must be 0, or 1 if the data are DER encoded. no other values, don't try it πŸ’€
  • const void * name β€” a pointer to the name. just a pointer. pointing at the name. iconic.
  • unsigned int sizeof_name β€” holds the size of name. she's the measuring tape of the group 🌈

πŸ’œ DESCRIPTION πŸ’œ

so what does this function actually DO. okay so it sets the part of the name of the Certificate issuer, specified by the given OID. that's the vibe. the input string should be ASCII or UTF-8 encoded β€” keep it cute, keep it standard.

some helper macros with popular OIDs can be found in gnutls/x509.h, so go look there if you want the pre-approved list πŸ“‹

⚠️ with this function you can only set the known OIDs. that's the rule, no cap.

you can test for known OIDs using gnutls_x509_dn_oid_known(). for OIDs that are not known (by gnutls) you should properly DER encode your data, and call this function with raw_flag set. like, do the homework first, then come back πŸ™ˆ

and honestly? normally you do not need to call this function, since the signing operation will copy the signer's name as the issuer of the certificate. so like… she's here if you need her, but the algorithm kinda handles it for you. lowkey convenient πŸ”₯


⭐ RETURNS ⭐

on success, GNUTLS_E_SUCCESS (0) is returned. otherwise you get a negative error value, which is giving "we need to talk" energy 😭


πŸŽ€ REPORTING BUGS πŸŽ€

found a bug? don't be shy, report it, the maintainers want to know fr fr:


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. slay, that's genuinely generous of them πŸ’–


🌈 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 plug, that's where the lore lives πŸ“š


πŸ’« and that's the whole page bestie, you understood it, i'm so proud of you, main character energy all the way through 🫢

gnutls version 3.8.13, copyright 2001-2023 β€” mwah, go set some issuer DNs, love u bye πŸ’…βœ¨πŸ¦‹

πŸ“¦ where this page comes from