gnutls_x509_crq_get_dn_oid(3)

πŸ’– gnutls_x509_crq_get_dn_oid(3) πŸ’–

okay so bestie, welcome to the gnutls manual, this one's a whole API function and honestly? it's giving "quiet little helper that just does its job." no cap. πŸŽ€


✨ NAME ✨

gnutls_x509_crq_get_dn_oid β€” literally just an API function, that's the whole name, she's not hiding anything 🫢


🌸 SYNOPSIS 🌸

#include <gnutls/x509.h>

int gnutls_x509_crq_get_dn_oid(gnutls_x509_crq_t crq, unsigned indx,
void * oid, size_t * sizeof_oid);

like yes, that's the shape of her. four args, one int coming back. iconic. ✨


πŸ¦‹ ARGUMENTS πŸ¦‹

  • gnutls_x509_crq_t crq β€” bestie, this one should contain a gnutls_x509_crq_t type. that's the vibe. it's the certificate request you're poking at.
  • unsigned indx β€” specifies which DN OID to get. use (0) to get the first one. zero-indexed, we start counting from zero in this house πŸ’…
  • void * oid β€” a pointer to a structure to hold the name. and get this: it may be NULL πŸ™ˆ (iykyk, that's for the size-query trick)
  • size_t * sizeof_oid β€” initially holds the size of oid. it comes in with an opinion and might leave with a new one.

πŸ’œ DESCRIPTION πŸ’œ

This function will extract the requested OID of the name of the certificate request subject, specified by the given index.

so like, the subject of the cert request has a name, and that name is made of OIDs, and you're grabbing the one at index indx. that's it. that's the function. main character energy but make it lowercase. 🌈


⭐ RETURNS ⭐

  • GNUTLS_E_SHORT_MEMORY_BUFFER β€” if the provided buffer is not long enough. not me getting caught with a tiny buffer 😭 and in that case, * sizeof_oid will be updated with the required size. so she tells you exactly how much room you need. helpful queen.
  • on success, 0 is returned. slay. zero. the good number. πŸ”₯
heads up bestie: that return code is literally the "your buffer was too small" signal, so if you see it, don't panic β€” read * sizeof_oid, resize, and come back. πŸ’–

🌸 REPORTING BUGS 🌸

Report bugs to <bugs@gnutls.org>.

Home page: https://www.gnutls.org

if something's broken, tell the gnutls girlies directly, they wanna know πŸ›βœ¨


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, copy it, remix it, 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/

and that's the whole page bestie, every flag, every arg, every return code, untouched and unbothered. πŸ’…

this was gnutls_x509_crq_get_dn_oid(3) from the gnutls manual, version 3.8.13 β€” mwah, take care of her 🫢✨

πŸ“¦ where this page comes from