gnutls_pkcs7_export2(3)

✨ gnutls_pkcs7_export2 ✨

okay bestie, so this one lives in the gnutls manual (that's the actual manual name, we're just vibing with it πŸ’–) and it's giving "let me yeet your PKCS7 structure out into the world in a real file format." Obsessed.


🌸 NAME 🌸

gnutls_pkcs7_export2 β€” it's an API function, bestie. That's literally the whole name. πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <gnutls/pkcs7.h>

int gnutls_pkcs7_export2(gnutls_pkcs7_t pkcs7, gnutls_x509_crt_fmt_t
format, gnutls_datum_t * out);

πŸŽ€ ARGUMENTS πŸŽ€

  • gnutls_pkcs7_t pkcs7 β€” the pkcs7 type. yeah. it's just... the pkcs7 thing. the star of the show 🫢
  • gnutls_x509_crt_fmt_t format β€” the format of your output params, and it has to be one of PEM or DER. pick one, you can't have both, sorry babe 😭
  • gnutls_datum_t * out β€” will contain a structure, PEM or DER encoded. it gets filled in for you, main character behaviour honestly πŸ‘‘

πŸ’œ DESCRIPTION πŸ’œ

so this function will export the pkcs7 structure to DER or PEM format. slay. that's the whole job and it does it flawlessly ✨

the output buffer? allocated using gnutls_malloc(). noted. remember that when you're freeing it, iykyk πŸ’€

and if the structure is PEM encoded, it will have a header of "BEGIN PKCS7". iconic header text, no cap. πŸŽ€


🌈 RETURNS 🌈

on success, GNUTLS_E_SUCCESS (0) is returned β€” we love a zero, we love a clean win πŸ₯³ β€” otherwise you get a negative error value. it's giving "not today." 😭


⭐ SINCE ⭐

3.1.3 β€” old money, been around forever, still eating πŸ’…


πŸ™ˆ REPORTING BUGS πŸ™ˆ

found a bug? don't be shy, 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. (translation: go off, 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/

and that's the whole page bestie!! πŸ’– it's from the gnutls manual, version 3.8.13, and yeah the page itself is literally named gnutls_pkcs7_export2(3) β€” we been knew. go export something pretty, ily, bye 🫢🌸✨

πŸ“¦ where this page comes from