gnutls_pubkey_import(3)
π gnutls_pubkey_import(3) π
okay bestie, welcome to the gnutls manual page for gnutls_pubkey_import β yes it's an API function, yes it's iconic, and yes we're gonna get you fluent in it in like two minutes. grab a boba. π§β¨
πΈ NAME πΈ
gnutls_pubkey_import β literally an API function, that's the whole name, she's simple like that π
β¨ SYNOPSIS β¨
#include <gnutls/abstract.h>
int gnutls_pubkey_import(gnutls_pubkey_t key, const gnutls_datum_t *
data, gnutls_x509_crt_fmt_t format);
π ARGUMENTS π
gnutls_pubkey_t keyβ the public key. this is the glow-up destination, the main character that's gonna hold your imported key πconst gnutls_datum_t * dataβ the DER or PEM encoded certificate. yes girl, that blob right there π«Άgnutls_x509_crt_fmt_t formatβ one of DER or PEM. pick your fighter, no third option, periodt β
π¦ DESCRIPTION π¦
so here's the vibe: this function imports the public key you hand it β one that's sitting in a SubjectPublicKeyInfo X.509 structure β and turns it into a native gnutls_pubkey_t type. it's giving β¨transformationβ¨
the output gets stored in key, bestie. that's where it lives now. π
and lowkey important: if your public key is PEM encoded, it should have a header of "PUBLIC KEY". like, that exact header. no cap. if it doesn't, that's a you problem and the function will be like π§
π₯ RETURNS π₯
on success, GNUTLS_E_SUCCESS (0) is returned. slay! π
otherwise you get a negative error value. not slay. π but at least you know it went wrong instead of just. vibing mysteriously.
π SINCE π
2.12.0 β she's been around, she's a legacy icon, she ate and left no crumbs π
π REPORTING BUGS π
found a bug? not me fr fr. report it 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. so like, go off, but 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/
that's the whole page bestie, you understood it, i'm so proud of you π₯Ήπ«Ά
this has been gnutls_pubkey_import(3), from the gnutls manual, version 3.8.13 β mwah, go import some keys, love u ππ
β¨
π¦ 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