gnutls_pcert_import_x509_raw(3)
β¨ gnutls_pcert_import_x509_raw(3) β¨
okay bestie, so this one lives in the gnutls manual and it's literally called gnutls_pcert_import_x509_raw β like, the name says it all, we're importing a raw x509 cert into a pcert. sit down, hydrate, let's go π«Ά
πΈ NAME πΈ
gnutls_pcert_import_x509_raw β it's an API function, bestie. that's the whole name. short, sweet, iconic π
π SYNOPSIS π
#include <gnutls/abstract.h>
int gnutls_pcert_import_x509_raw(gnutls_pcert_st * pcert, const
gnutls_datum_t * cert, gnutls_x509_crt_fmt_t format, unsigned int
flags);
there she is. four args, one int return, zero drama π
π¦ ARGUMENTS π¦
gnutls_pcert_st * pcertβ the pcert structure, aka the lil container where your cert is gonna live. this is the destination, the main character of the operation β¨const gnutls_datum_t * certβ the raw certificate that's getting imported. raw, unfiltered, no cap πgnutls_x509_crt_fmt_t formatβ the format of the certificate. gotta tell it what kind of cert you're handing over, it can't just guess πunsigned int flagsβ zero for now. that's it. zero. for now. (iykyk, future-proofing behavior π)
π DESCRIPTION π
so this is a convenience function β meaning it's here to make your life easier, you're welcome β and what it does is import the given certificate straight into a gnutls_pcert_st structure.
β οΈ okay important part, do NOT skip this: the structure must be deinitialized afterwards using gnutls_pcert_deinit(); β like, you have to clean up after yourself, bestie. no leaving your cert structure just sitting there with no deinit. that's not the vibe π
π RETURNS π
on success, GNUTLS_E_SUCCESS (0) comes back at you like a little reward sticker β β otherwise you get a negative error value, which is the code's way of saying "girl, something went wrong" π
π§ SINCE π§
3.0 β she's been around, she's a legacy icon, respect her π
π REPORTING BUGS π
found a bug? don't suffer in silence, tell the people:
- 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. slay, honestly β free to share, 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, go visit:
https://www.gnutls.org/manual/
and that's the whole page, bestie π this was gnutls 3.8.13 dropping gnutls_pcert_import_x509_raw(3) into your terminal β go forth, import those certs, and don't forget the gnutls_pcert_deinit(); or I will know π€β¨
π¦ 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