gnutls_pkcs12_import(3)
β¨ gnutls_pkcs12_import β¨
okay bestie, so this is a page from the gnutls manual β the gnutls_pkcs12_import(3) function, to be exact. it's the one that takes your sad little encoded PKCS12 blob and turns it into the real thing. let's get into it π
π NAME π
gnutls_pkcs12_import β literally an API function, that's the whole name, periodt.
π¦ SYNOPSIS π¦
#include <gnutls/pkcs12.h>
int gnutls_pkcs12_import(gnutls_pkcs12_t pkcs12, const gnutls_datum_t *
data, gnutls_x509_crt_fmt_t format, unsigned int flags);
πΈ ARGUMENTS πΈ
gnutls_pkcs12_t pkcs12β ngl this one's a lil confusing: it's the data to store the parsed PKCS12. yeah. that's what it says. the parsed result goes in here πconst gnutls_datum_t * dataβ the DER or PEM encoded PKCS12, aka the raw goods you're feeding in.gnutls_x509_crt_fmt_t formatβ one of DER or PEM. pick your fighter.unsigned int flagsβ an ORed sequence ofgnutls_privkey_pkcs8_flags. stack 'em up with|, bestie.
π DESCRIPTION π
so what does it actually do? this function converts the given DER or PEM encoded PKCS12 into the native gnutls_pkcs12_t format. the output gets stored in pkcs12 (yes, the same pkcs12 from the arguments β that's the point, it's where it lives now).
and if your PKCS12 is PEM encoded, it should have a header of "PKCS12". the way that header is not optional β it's giving mandatory, fr fr π
β RETURNS β
on success? you get GNUTLS_E_SUCCESS (0). slay. anything else and it's a negative error value, so likeβ¦ vibe check your inputs, babe. π
π«Ά REPORTING BUGS π«Ά
found a bug? don't suffer in silence, tell the devs:
- 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.
π 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, no notes π this was gnutls version 3.8.13, dated gnutls_pkcs12_import(3) β go forth and import your PKCS12s, you absolute icon π¦β¨
π¦ 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