gnutls_x509_crt_get_issuer_dn2(3)

πŸ’– gnutls_x509_crt_get_issuer_dn2(3) πŸ’–

okay bestie, welcome to the gnutls manual, section 3 ✨ this one's all about pulling the issuer name off a certificate, and it's honestly kind of a glow-up function 🫢


🌸 NAME 🌸

gnutls_x509_crt_get_issuer_dn2 β€” API function πŸ‘‘


✨ SYNOPSIS ✨

#include <gnutls/x509.h>

int gnutls_x509_crt_get_issuer_dn2(gnutls_x509_crt_t cert,
gnutls_datum_t * dn);

πŸŽ€ ARGUMENTS πŸŽ€

  • gnutls_x509_crt_t cert β€” this one should contain a gnutls_x509_crt_t type, like, that's its whole job πŸ’…
  • gnutls_datum_t * dn β€” a pointer to a structure that's gonna hold the name. heads up bestie, you must free it using gnutls_free() β€” no leaving it hanging, that's not the vibe πŸ™ˆ

πŸ¦‹ DESCRIPTION πŸ¦‹

So this function will allocate a buffer and copy the name of the issuer of the Certificate. slay. 🌈

The name comes out in the form "C=xxxx,O=yyyy,CN=zzzz", exactly as described in RFC4514. The output string is ASCII or UTF-8 encoded, depending on what the certificate data is giving πŸ“

⚠️ but real talk β€” this function does not output a fully RFC4514 compliant string. if that's what you need, go see gnutls_x509_crt_get_issuer_dn3() instead. iykyk 😭

πŸ’œ RETURNS πŸ’œ

On success, GNUTLS_E_SUCCESS (0) is returned. otherwise you get a negative error value, and that's your sign something went sideways πŸ’€


⭐ SINCE ⭐

3.1.10 β€” she's been iconic since way back, no cap πŸ‘‘


πŸŽ€ REPORTING BUGS πŸŽ€

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. 🫢


πŸ’– 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 was gnutls_x509_crt_get_issuer_dn2(3) from the gnutls manual, version 3.8.13 β€” go read your certs' issuer names responsibly, mwah πŸ’…πŸŽ€πŸ’–

πŸ“¦ where this page comes from