gnutls_x509_crt_get_issuer_dn3(3)
π gnutls_x509_crt_get_issuer_dn3(3) π
okay bestie, so this one lives in the gnutls manual and it's literally the glow-up version of "who signed this cert" β she pulls the issuer name out of an X.509 certificate and hands you a fresh shiny string. β¨
πΈ NAME πΈ
gnutls_x509_crt_get_issuer_dn3 β it's giving API function, no cap.
β¨ SYNOPSIS β¨
#include <gnutls/x509.h>
int gnutls_x509_crt_get_issuer_dn3(gnutls_x509_crt_t cert,
gnutls_datum_t * dn, unsigned flags);
look at her. three little args. main character energy fr fr. π«Ά
π ARGUMENTS π
gnutls_x509_crt_t certβ bestie this should contain agnutls_x509_crt_ttype. that's the cert you're snooping on. πgnutls_datum_t * dnβ a pointer to a structure that's gonna hold the name. and listen β you MUST free it usinggnutls_free(). not me watching you leak memory because you forgot. do not. πunsigned flagsβ either zero orGNUTLS_X509_DN_FLAG_COMPAT. that's the whole menu, pick one. π
π¦ DESCRIPTION π¦
so what does she actually do? this function allocates a buffer and copies the name of the issuer of the Certificate. iconic behavior honestly.
the name comes out looking like "C=xxxx,O=yyyy,CN=zzzz", exactly as described in RFC4514. and the output string is either ASCII or UTF-8 encoded, depending on whatever the certificate data is doing. so like, she matches the vibe of the cert, she doesn't force it. π§
now β when you pass the GNUTLS_X509_DN_FLAG_COMPAT flag, the output format will match the format output by previous to 3.5.6 versions of GnuTLS. and heads up, that old format was not not fully RFC4514-compliant. yes, "not not", the original said it twice, we're keeping it twice, it's camp. π
fr fr: only reach for the compat flag if you actually need the old-timey behavior. otherwise let her cook with the RFC4514-compliant default.
π RETURNS π
on success, GNUTLS_E_SUCCESS (0) is returned. anything else? negative error value. that's it, that's the vibe check. π
β SINCE β
3.5.7 β she's been here a minute, she's a veteran. π
π REPORTING BUGS π
found a bug? don't suffer in silence, bestie:
- Report bugs to <bugs@gnutls.org>.
- Home page: https://www.gnutls.org
π COPYRIGHT π
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, public domain-adjacent licensing rights. π
π 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 one shipped in gnutls 3.8.13 β go get that issuer name and remember to gnutls_free() it, i'm literally begging. πβ¨π¦π«Ά
π¦ where this page comes from
- alpine 3.22: gnutls-doc 3.8.13-r0 Β· LGPL-2.1-or-later
- alpine 3.23: gnutls-doc 3.8.13-r0 Β· LGPL-2.1-or-later
- alpine 3.24: gnutls-doc 3.8.13-r0 Β· LGPL-2.1-or-later
- arch rolling: gnutls 3.8.13-3 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 43: gnutls-devel 3.8.13-1.fc43 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 43: gnutls-devel 3.8.13-1.fc43 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 44: gnutls-devel 3.8.13-1.fc44 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 44: gnutls-devel 3.8.13-1.fc44 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- ubuntu stonking: gnutls-doc 3.8.13-1ubuntu1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms