GNUTLS_X509_CRL_GET_ISSUER_DN_BY_OID(3)

πŸ’– gnutls_x509_crl_get_issuer_dn_by_oid β€” the glow-up edition πŸ’–

okay bestie, so this is a page from the gnutls manual, section 3 (library functions, iykyk). we're pulling apart a CRL issuer's name, one OID at a time. it's giving detective energy, fr fr. πŸ•΅οΈβ™€οΈβœ¨


🌸 NAME 🌸

gnutls_x509_crl_get_issuer_dn_by_oid β€” API function

like, that's the whole name, she's long but she's iconic πŸ’…


✨ SYNOPSIS ✨

#include <gnutls/x509.h>

int gnutls_x509_crl_get_issuer_dn_by_oid(gnutls_x509_crl_t crl, const
char * oid, unsigned indx, unsigned int raw_flag, void * buf, size_t *
sizeof_buf);

no cap, that's exactly how you call her πŸŽ€


πŸ¦‹ ARGUMENTS πŸ¦‹

  • gnutls_x509_crl_t crl β€” bestie, this one should hold a gnutls_x509_crl_t type. that's her whole job.
  • const char * oid β€” holds an Object Identifier as a null-terminated string. so like, a little string that ends with a \0. periodt.
  • unsigned indx β€” if the same OID shows up more than once in the RDN, this tells us which one you want. use (0) to grab the first one. main character gets first pick πŸ’…
  • unsigned int raw_flag β€” if it's non-zero, you get the raw DER data of the DN part. raw, unfiltered, no makeup πŸ’€
  • void * buf β€” a pointer to a structure that'll hold the peer's name. she may be null, and that's valid, we don't judge πŸ™ˆ
  • size_t * sizeof_buf β€” initially holds the size of buf. she's the vibe check for how much room you've got.

🌈 DESCRIPTION 🌈

so this function will extract the part of the name of the CRL issuer that's specified by the given OID. the output gets encoded as described in RFC4514. and the output string will be ASCII or UTF-8 encoded, depending on the certificate data. so it just depends, you know? flexible queen πŸ’–

some helper macros with the popular OIDs are chillin' in gnutls/x509.h β€” go look, they're right there. 🫢

now, if the raw flag is (0), this function will only return known OIDs as text. other OIDs? they get DER encoded, as described in RFC4514 β€” that's in hex format with a # prefix. so basically a little # then a whole lot of hex, and you're like "okay noted." 😭

you can check about known OIDs using gnutls_x509_dn_oid_known(). she's the one who knows things. πŸ‘‘

and if buf is null, then only the size will be filled. no buffer, no problem, just the numbers, bestie. ✨


⭐ RETURNS ⭐

  • GNUTLS_E_SHORT_MEMORY_BUFFER β€” if the buffer you provided is not long enough. like, she tried, but the fit wasn't fitting 😭. and in that case, sizeof_buf will be updated with the required size, so you know exactly how much more room to give her.
  • 0 β€” on success. slay. πŸŽ‰

πŸ’œ REPORTING BUGS πŸ’œ

found a bug? don't be shy, report it 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. so like, take her, share her, 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, go visit:

https://www.gnutls.org/manual/


ngl that's the whole page, no crumbs left, every single detail intact. πŸ’…

and that's a wrap on the gnutls manual, section 3, version 3.8.13 β€” mwah, bye bestie πŸ¦‹πŸ’–βœ¨

πŸ“¦ where this page comes from