gnutls_x509_crt_print(3)
π gnutls_x509_crt_print β the manual page, but make it cute
okay bestie, so this is a page from the gnutls manual, and it's literally about making a certificate look pretty for human eyeballs πβ¨. Yes, that's the whole plot.
β¨ NAME β¨
gnutls_x509_crt_print β an API function, and she's here to serve π
πΈ SYNOPSIS πΈ
#include <gnutls/x509.h>
int gnutls_x509_crt_print(gnutls_x509_crt_t cert,
gnutls_certificate_print_formats_t format, gnutls_datum_t * out);
there she is. three args, one int, no drama π«Ά
π¦ ARGUMENTS π¦
gnutls_x509_crt_t certβ bestie, this is the data to be printed. the main character, honestly.gnutls_certificate_print_formats_t formatβ this one indicates the format to use. you're picking the fit πgnutls_datum_t * outβ a newly allocated datum holding a null terminated string. fresh out the box, and yes you have to clean up after her (more on that below).
π DESCRIPTION π
So what does she actually do? This function will pretty print an X.509 certificate, and the whole point is that it's suitable for display to a human. Like, readable. For people. Not just for machines to vibe with in silence. π
Now here's the format tea β:
- If the format is
GNUTLS_CRT_PRINT_FULL, then all fields of the certificate will be output, on multiple lines. every single one. no gatekeeping. π - The
GNUTLS_CRT_PRINT_ONELINEformat will generate one line with some selected fields, which is useful for logging purposes. short, sweet, one-line icon. β
β οΈ and this is the important bit, don't skip it: the outputoutneeds to be deallocated usinggnutls_free(). like, you must. don't just leave her hanging, that's not the vibe, that's a memory leak π
π₯ RETURNS π₯
On success, GNUTLS_E_SUCCESS (0) is returned. otherwise you get a negative error value, which is the universe's way of saying "not today" π
π REPORTING BUGS π
found a bug? don't suffer in silence, spill it:
- 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. (yes bestie, that's the actual permission slip, go off π)
π 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, no cap β¨ this was gnutls version 3.8.13, documented for gnutls_x509_crt_print(3) β mwah, go print some certs, you ate π
π
π¦ 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