gnutls_x509_crt_get_issuer_dn(3)

✨ gnutls_x509_crt_get_issuer_dn ✨

okay bestie, so this one lives in the gnutls manual, and it's literally the glow-up of "who even issued this certificate" πŸ’…


🌸 NAME 🌸

gnutls_x509_crt_get_issuer_dn β€” an API function, and yes she's serving exactly what her name says πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <gnutls/x509.h>

int gnutls_x509_crt_get_issuer_dn(gnutls_x509_crt_t cert, char * buf,
size_t * buf_size);

look at her, so compact, so iconic πŸ‘‘


πŸ’– ARGUMENTS πŸ’–

  • gnutls_x509_crt_t cert β€” this one should contain a gnutls_x509_crt_t type. that's it, that's the requirement, no cap.
  • char * buf β€” a pointer to a structure to hold the name. and get this, it may be null. slay, she's flexible.
  • size_t * buf_size β€” initially holds the size of buf. so you gotta tell her how much room you brought to the party before she fills it up ✨

🧚 DESCRIPTION 🧚

so basically, this function will copy the name of the Certificate issuer in the provided buffer. yes, the whole issuer name, straight into your lil buffer 🫢

the name will be in the form "C=xxxx,O=yyyy,CN=zzzz" as described in RFC4514. the output string will be ASCII or UTF-8 encoded, depending on the certificate data. so it's giving "depends on the cert's vibe" 😌

if buf is null then only the size will be filled. perfect for when you just wanna know how much space to bring before you actually show up πŸŽ€

⚠️ okay important bestie, listen up: this function does not output a fully RFC4514 compliant string. if that's what you need, see gnutls_x509_crt_get_issuer_dn3(). different function, different energy, don't mix them up πŸ’€

πŸ”₯ RETURNS πŸ”₯

  • GNUTLS_E_SHORT_MEMORY_BUFFER β€” if the provided buffer is not long enough, and in that case the buf_size will be updated with the required size. so she's not mad, she's just telling you the number you should've brought πŸ™ˆ
  • GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE β€” if the DN does not exist. no DN, no data, no problem (well, kind of a problem, but like, a named one).
  • another error value on error β€” yeah, she has layers.
  • on success 0 is returned. zero, nada, perfection, periodt ✨

🌈 REPORTING BUGS 🌈

found something cursed? report bugs to <bugs@gnutls.org>. they wanna know, fr fr πŸ›

home page: https://www.gnutls.org β€” go say hi, she's lovely πŸ’œ


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, share it, remix it, put it on your blog, 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/

like, just go there, it's all there, iykyk πŸ’…


and that's the whole page bestie!! this lil beauty comes to you from gnutls 3.8.13, and she's been holding it down in the gnutls manual since way back in the 2001-2023 copyright era. mwah πŸ’– stay cert-ified, angel πŸ¦‹

πŸ“¦ where this page comes from