gnutls_pcert_import_rawpk_raw(3)
π gnutls_pcert_import_rawpk_raw(3) π
okay bestie, welcome to the gnutls manual, and specifically to gnutls_pcert_import_rawpk_raw(3) β yes the name is a mouthful, no we are not changing it, it's iconic actually. π
β¨ NAME β¨
gnutls_pcert_import_rawpk_raw β API function π
πΈ SYNOPSIS πΈ
#include <gnutls/abstract.h>
int gnutls_pcert_import_rawpk_raw(gnutls_pcert_st * pcert, const
gnutls_datum_t * rawpubkey, gnutls_x509_crt_fmt_t format, unsigned int
key_usage, unsigned int flags);
π¦ ARGUMENTS π¦
gnutls_pcert_st * pcertβ thepcertstructure you're importing the data into. it's the destination, the main character's dressing room fr.const gnutls_datum_t * rawpubkeyβ the raw public-key, ingnutls_datum_tformat, that's getting imported. π«Άgnutls_x509_crt_fmt_t formatβ the format of that raw public-key. so like. DER or PEM. pick one bestie.unsigned int key_usageβ an ORed sequence ofGNUTLS_KEY_*flags. yes, ORed, stack 'em up. π₯unsigned int flagsβ zero for now. literally zero. that's the whole vibe. π
π DESCRIPTION π
so this convenience function will import β i.e. convert β the given raw public key rawpubkey into a gnutls_pcert_st structure. it's giving glow-up, it's giving transformation. β¨
lowkey important: that structure must be deinitialized afterwards using gnutls_pcert_deinit(). don't just leave it there, that's not the move. π
also note that the caller is responsible for freeing rawpubkey. yes YOU. it's you. all the necessary values will be copied into pcert though, so at least that part's handled. π
Key usage (as defined by X.509 extension (2.5.29.15)) can be explicitly set because there is no certificate structure around the key to define this value. like, the key is out here raw and unbothered, no cert wrapper, no nothing. π¦ see gnutls_x509_crt_get_key_usage() for more info.
β RETURNS β
on success, GNUTLS_E_SUCCESS (0) is returned, otherwise a negative error value. so if it's negative... yeah. not slay. π
π SINCE π
3.6.6
π REPORTING BUGS π
found a bug? spill. 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. periodt. π
π« 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/
okay that's the whole page bestie, you ate that. this was brought to you by gnutls version 3.8.13, and honestly? she's serving. go forth and import those raw public keys responsibly, mwah π
β¨πΈ
π¦ 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