gnutls_x509_dn_oid_known(3)

✨ gnutls_x509_dn_oid_known ✨

okay bestie, welcome to the gnutls manual, section 3 πŸ’– this one's a lil guy but it's lowkey carrying a whole lot of responsibility, so let's get into it 🫢


🌸 NAME 🌸

gnutls_x509_dn_oid_known β€” it's an API function, and it's literally just here to tell you if an OID is one the library already knows about πŸ‘‘


πŸŽ€ SYNOPSIS πŸŽ€

#include <gnutls/x509.h>

int gnutls_x509_dn_oid_known(const char * oid);

like, that's it. one include, one function call, no drama ✨


πŸ¦‹ ARGUMENTS πŸ¦‹

  • const char * oid β€” bestie this holds an Object Identifier in a null terminated string πŸ’… that's the whole thing. it's a string, it's null terminated, it's an OID, go off.

πŸ’œ DESCRIPTION πŸ’œ

so what does this function do? it informs you about known DN OIDs 🌈 that's its entire personality and honestly? iconic.

and why do you care? because functions like gnutls_x509_crt_set_dn_by_oid() use the info about known OIDs to properly encode their input πŸ”₯ so knowing which OIDs are "known" tells you how those functions are gonna treat your data.

here's the tea though β˜• Object Identifiers that are not known do not get encoded by these functions β€” instead their input is stored directly into the ASN.1 structure 😭

and in that case of unknown OIDs, you have the responsibility of DER encoding your data. that's on you, bestie. no cap. the library is not doing it for you πŸ™ˆ

so yeah, this is basically a vibe check for OIDs before you hand them off to the encoding girlies ✨


⭐ RETURNS ⭐

  • 1 on known OIDs πŸ₯³
  • 0 otherwise πŸ’€

that's it. binary. main character energy.


πŸ› REPORTING BUGS πŸ›

found something cursed? 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 they really do just let you copy it, slay)


🌟 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!! this lil manual page is chillin' in gnutls version 3.8.13, filed under gnutls_x509_dn_oid_known(3) β€” go check your OIDs, stay DER encoded, and drink some water πŸ’–βœ¨πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from