gnutls_x509_crt_import(3)
β¨ gnutls_x509_crt_import(3) β¨
okay bestie, so this is a page from the gnutls manual β the gnutls_x509_crt_import(3) one π β and it's literally the glow-up moment where your raw cert bytes become a real, native gnutls certificate object. no cap. let's get into it π¦
πΈ NAME πΈ
gnutls_x509_crt_import β it's an API function, and it's the one that pulls your DER/PEM cert into gnutls-land π
π«Ά SYNOPSIS π«Ά
#include <gnutls/x509.h>
int gnutls_x509_crt_import(gnutls_x509_crt_t cert, const gnutls_datum_t
* data, gnutls_x509_crt_fmt_t format);
π ARGUMENTS π
gnutls_x509_crt_t certβ the place where the parsed certificate gets stored. it's giving "the data to store the parsed certificate", and honestly that's the whole vibe β¨const gnutls_datum_t * dataβ your cert, either DER or PEM encoded. come as you are, both formats welcome π₯°gnutls_x509_crt_fmt_t formatβ and you gotta tell it which one: it's one of DER or PEM. no guessing games here, bestie, you pick π
π₯ DESCRIPTION π₯
so what this function does is literally convert the DER or PEM encoded Certificate you hand it into the native gnutls_x509_crt_t format β¨ and the output lands in cert β that's where it's stored, periodt π
and if your Certificate is PEM encoded? heads up: it should have a header of "X509 CERTIFICATE", or "CERTIFICATE". that's the vibe check your PEM has to pass π
π RETURNS π
on success, GNUTLS_E_SUCCESS (0) is returned π₯³ otherwise you get a negative error value β aka it did not slay, and you should go check what happened π
π REPORTING BUGS π
found a bug? do NOT suffer in silence, bestie, report 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. iconic behaviour honestly π«Ά
π¦ 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 β this one's from gnutls 3.8.13, brought to you by the fine folks maintaining the gnutls_x509_crt_import(3) page in the gnutls manual π go forth and parse those certs, you've got this ππ
π¦ 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