GNUTLS_X509_CRT_GET_ISSUER_DN_OID(3)
β¨ gnutls_x509_crt_get_issuer_dn_oid β API function β¨
okay bestie, sit down, hydrate, and let's talk about gnutls_x509_crt_get_issuer_dn_oid(3) π this little cutie lives in the gnutls manual (yes, that gnutls, the TLS library, she's iconic) and she has ONE job: pulling OIDs out of a certificate issuer's distinguished name. that's it. that's the whole vibe. π
πΈ SYNOPSIS πΈ
#include <gnutls/x509.h>
int gnutls_x509_crt_get_issuer_dn_oid(gnutls_x509_crt_t cert, unsigned
indx, void * oid, size_t * oid_size);
like, look at her. four args. no drama. π¦
π«Ά ARGUMENTS π«Ά
gnutls_x509_crt_t certβ bestie this should contain agnutls_x509_crt_ttype, that's literally the requirement, don't get cute with it πunsigned indxβ tells us WHICH OID you want back. use(0)to get the very first one, because of course we start at zero, we're not monsters πvoid * oidβ a pointer to a buffer that's gonna hold the OID. and get this: it may be null πsize_t * oid_sizeβ initially holds the size ofoid. initially!! remember that word, it comes back later β¨
π DESCRIPTION π
so what does she actually DO? she extracts the OIDs of the name of the Certificate issuer specified by the given index. that's the mission. that's the whole assignment. π
and here's the tea, no cap: if oid is null then only the size will be filled. so you can do the classic two-pass thing where you ask "how big is this gonna be" and then actually go get it. main character energy fr fr.
also, the oid returned will be null terminated β BUT, and this is the part people miss, oid_size will not account for the trailing null. so don't be out here off-by-one-ing yourself, bestie. π
β RETURNS β
GNUTLS_E_SHORT_MEMORY_BUFFERβ your buffer was not long enough, and in that case thebuf_sizewill be updated with the required size. so like, she's not mad, she's just telling you how much room she needs π«ΆGNUTLS_E_REQUESTED_DATA_NOT_AVAILABLEβ there are no data in the current index. nothing there. empty. ghost town π0β returned on success. slay. periodt. β¨
π REPORTING BUGS π
found a bug? don't suffer in silence, tell the people:
- 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. so yes, you can 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, visit
https://www.gnutls.org/manual/
ok so lowkey the whole thing in one breath: check the size, allocate, call again, mind the null terminator, and read your return codes. that's it. you ate. π
and that's the page, bestie!! π¦ this was the gnutls_x509_crt_get_issuer_dn_oid(3) manual page, hanging out in the gnutls manual, version 3.8.13. mwah. go call it with (0) and see what happens. πβ¨πΈ
π¦ 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