gnutls_pkcs7_print(3)
π gnutls_pkcs7_print β the glow-up your PKCS7 needed
okay bestie, so this is a page from the gnutls manual, and the function we're hyping today is gnutls_pkcs7_print(3). Yes the (3) means it lives in section 3, we love a library call with a lil number attached π
β¨ NAME β¨
gnutls_pkcs7_print β it's an API function, periodt.
πΈ SYNOPSIS πΈ
#include <gnutls/pkcs7.h>
int gnutls_pkcs7_print(gnutls_pkcs7_t pkcs7,
gnutls_certificate_print_formats_t format, gnutls_datum_t * out);
like. look at her. three little arguments and she's ready to serve π«Ά
π¦ ARGUMENTS π¦
gnutls_pkcs7_t pkcs7β the actual PKCS7 struct you want printed. the main character, fr. she's the one getting the spotlight.gnutls_certificate_print_formats_t formatβ this is you telling it how to print. which vibe are we going for, bestie? you gotta pick.gnutls_datum_t * outβ a freshly allocated datum, and inside it is a null terminated string. newly allocated!! don't forget that part or it's gonna haunt you π
π DESCRIPTION π
so what does she DO. this function pretty prints a signed PKCS 7 structure. pretty prints!! as in, made nice and legible so an actual human can look at it and go "oh okay, I see it." display to a human is literally the whole point. no cap.
currently the supported formats are GNUTLS_CRT_PRINT_FULL and GNUTLS_CRT_PRINT_COMPACT. that's the whole list, don't go inventing new ones π
β οΈ IMPORTANT, and I mean this with my whole chest: thatoutyou got? you have to deallocate it yourself withgnutls_free(). it's yours now. she's not gonna clean up after herself, that's a you problem. do it or leak, your choice π
β RETURNS β
- on success you get
GNUTLS_E_SUCCESS(which is0), slay β¨ - otherwise you get a negative error value, which is the universe's way of saying "no" π
π REPORTING BUGS π
found a bug? don't just scream into the void, tell the devs:
- report bugs to <bugs@gnutls.org>
- home page: https://www.gnutls.org
they wanna hear it fr fr.
π 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 like, go off, just keep the receipts π§
π₯ SEE ALSO π₯
the full documentation for gnutls is maintained as a Texinfo manual. so if the /usr/share/doc/gnutls/ directory does not have the HTML form, go visit:
https://www.gnutls.org/manual/
that's the plug. iykyk.
mwah π that's the whole page. this was gnutls version 3.8.13, page gnutls_pkcs7_print(3), and honestly? she ate. go forth and pretty print responsibly, bestie πβ¨
π¦ 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