gnutls_pcert_import_rawpk(3)
π gnutls_pcert_import_rawpk β bestie edition π
okay so this is a page from the gnutls manual, and the function we're hyping up today is gnutls_pcert_import_rawpk. yes it's an API function, yes it's lowkey niche, and yes we're gonna make it make sense. π
β¨ SYNOPSIS β¨
#include <gnutls/abstract.h>
int gnutls_pcert_import_rawpk(gnutls_pcert_st * pcert, gnutls_pubkey_t
pubkey, unsigned int flags);
like, that's the whole vibe. one include, one function call, three args. slay. π
πΈ ARGUMENTS πΈ
gnutls_pcert_st * pcertβ bestie, this is thepcertstruct you're importing the data into. it's the destination. the main character, honestly.gnutls_pubkey_t pubkeyβ the raw public key, ingnutls_pubkey_tformat, that's getting imported. it's the guest of honor. π«Άunsigned int flagsβ zero for now. that's it. that's the whole thing. no flags, no options, nothing. it's giving "reserved for later." π
π DESCRIPTION π
so this convenience function does one (1) thing and it does it well: it imports β aka converts β the raw public key pubkey you hand it into a gnutls_pcert_st structure. glow-up complete. β¨
β οΈ okay listen, two things you CANNOT skip: 1. after you're done, you must deinitialize that structure withgnutls_pcert_deinit(). clean up after yourself, bestie. 2. thepubkeyyou passed in must not be deinitialized by you. nope. it's now associated with thepcertstructure you gave it, and it gets deinitialized with it. so if you deinit it yourself you're double-dipping and that's not the move. π
π RETURNS π
on success you get GNUTLS_E_SUCCESS (0) back. anything else? a negative error value. so like, if (ret < 0) β you know the drill. π
β SINCE β
3.6.6 β so it's been around a minute. vintage, but make it fresh. π¦
π 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. fr fr, that's the whole deal. π
π₯ 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/
iykyk. go read the docs, bestie, they ate. π
and that's the page!! this was gnutls version 3.8.13, page gnutls_pcert_import_rawpk(3) β mwah, take care of your pcerts and deinit responsibly. bye bestie π«Άβ¨
π¦ 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