gnutls_x509_crt_get_subject(3)

πŸ’– gnutls_x509_crt_get_subject(3) πŸ’–

okay bestie, welcome to the gnutls manual, this one's the ✨ subject DN ✨ page and it's lowkey a bop. it's an API function, it lives in section 3, and it's literally just here to hand you the subject. let's get into it 🫢


✨ NAME ✨

gnutls_x509_crt_get_subject β€” API function πŸ‘‘


🌸 SYNOPSIS 🌸

#include <gnutls/x509.h>

int gnutls_x509_crt_get_subject(gnutls_x509_crt_t cert, gnutls_x509_dn_t
* dn);

πŸŽ€ ARGUMENTS πŸŽ€

  • gnutls_x509_crt_t cert β€” should contain a gnutls_x509_crt_t type. like, that's the whole vibe of this one, bestie πŸ’…
  • gnutls_x509_dn_t * dn β€” output variable with pointer to uint8_t DN. it's giving "here's where i put the answer" πŸ¦‹

πŸ’œ DESCRIPTION πŸ’œ

so what does it actually do? it returns the Certificate's Subject DN as a gnutls_x509_dn_t data type β€” and that thing can be decoded using gnutls_x509_dn_get_rdn_ava(). iconic combo fr fr πŸ”₯

⚠️ okay important bestie, listen up: note that dn should be treated as constant. because it points into the cert object, you should not use dn after cert is deallocated. that's a use-after-free situation and it is NOT the vibe. no cap. πŸ’€

⭐ RETURNS ⭐

Returns 0 on success, or an error code. that's it, that's the tea β˜•


😭 REPORTING BUGS 😭

found a bug? tell the girlies:


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 one shipped as part of gnutls 3.8.13, and yeah the manual page for gnutls_x509_crt_get_subject(3) is officially wrapped. go decode some DNs, you absolute main character πŸ§šπŸ’– periodt.

πŸ“¦ where this page comes from