gnutls_pcert_export_x509(3)

✨ gnutls_pcert_export_x509 ✨

okay bestie, welcome to the gnutls manual β€” yes, the whole thing lives in a Texinfo manual, but this little page? this one's all about gnutls_pcert_export_x509, an API function. it's giving "glow-up transformation" energy and honestly? obsessed. πŸ’…


🌸 SYNOPSIS 🌸

#include <gnutls/abstract.h>

int gnutls_pcert_export_x509(gnutls_pcert_st * pcert, gnutls_x509_crt_t
* crt);

πŸŽ€ ARGUMENTS πŸŽ€

  • gnutls_pcert_st * pcert β€” the pcert structure, aka the thing you're tryna convert. main character of this operation fr fr.
  • gnutls_x509_crt_t * crt β€” an initialized gnutls_x509_crt_t. yes bestie, initialized, that part matters, don't come in here with an uninitialized one. πŸ™ˆ

πŸ’– DESCRIPTION πŸ’–

so what does this actually do? it converts the given gnutls_pcert_t type into a gnutls_x509_crt_t. that's the whole vibe. ✨

⚠️ heads up though β€” this function only works if the type of pcert is GNUTLS_CRT_X509. anything else? nope, not happening, it's not built for that. lowkey a strict queen. πŸ’…

and when it's successful, the value written to crt must be freed with gnutls_x509_crt_deinit() when no longer needed. don't forget this part!! memory leaks are NOT cute, no cap. 😭


⭐ RETURNS ⭐

On success, GNUTLS_E_SUCCESS (0) is returned β€” slay. otherwise you get a negative error value, which is the universe telling you something went wrong. πŸ’€


πŸ¦‹ SINCE πŸ¦‹

3.4.0 β€” an icon from way back, she's been here. πŸ‘‘


🌈 REPORTING BUGS 🌈

found a bug? don't just sit there, report it bestie:

Report bugs to <bugs@gnutls.org>.

Home page: https://www.gnutls.org


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. (very generous of them, we love to see it 🫢)


🧚 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/


that's the whole page bestie, go forth and convert those certs responsibly πŸ’–

this has been gnutls_pcert_export_x509 from the gnutls manual, version 3.8.13 β€” mwah, ily, bye πŸŽ€βœ¨

πŸ“¦ where this page comes from