gnutls_privkey_import_ext2(3)
π gnutls_privkey_import_ext2(3) π
okay bestie, so this one lives in the gnutls manual, and it's literally the glow-up page for gnutls_privkey_import_ext2. it's an API function, she's iconic, she lets you be the main character behind the key. let's get into it π«Ά
β¨ NAME β¨
gnutls_privkey_import_ext2 β API function
no cap, that's the whole name. short, sweet, slays.
πΈ SYNOPSIS πΈ
#include <gnutls/abstract.h>
int gnutls_privkey_import_ext2(gnutls_privkey_t pkey,
gnutls_pk_algorithm_t pk, void * userdata, gnutls_privkey_sign_func
sign_fn, gnutls_privkey_decrypt_func decrypt_fn,
gnutls_privkey_deinit_func deinit_fn, unsigned int flags);
look at that signature. seven arguments. she's high maintenance but she's worth it π
π ARGUMENTS π
gnutls_privkey_t pkeyβ the private key itself, the moment, the whole point πgnutls_pk_algorithm_t pkβ the public key algorithm. yes babe, tell us which flavor π¦void * userdataβ your private data, and it gets handed straight to the callbacks. it's giving "your stuff, your rules" β¨gnutls_privkey_sign_func sign_fnβ the callback for signature operations. sign, queen πgnutls_privkey_decrypt_func decrypt_fnβ the callback for decryption operations. unlock that tea πgnutls_privkey_deinit_func deinit_fnβ a deinitialization function, aka the cleanup bestie π§Ήunsigned int flagsβ flags for the import. little toggles, big energy β
π DESCRIPTION π
okay so this function will associate the given callbacks with the gnutls_privkey_t type. and here's the vibe check: at least one of the two callbacks must be non-null. you can't just show up with nothing, bestie π
and if a deinitialization function is provided, then flags is assumed to contain GNUTLS_PRIVKEY_IMPORT_AUTO_RELEASE. the way that justβ¦ happens automatically, no questions asked π
lowkey important: note that the signing function is supposed to "raw" sign data, i.e., without any hashing or preprocessing. so like, no extra steps, no sprinkles, just raw. in case of RSA the DigestInfo will be provided, and the signing function is expected to do the PKCS 1 1.5 padding and the exponentiation. yes, that's on you, diva π
See also gnutls_privkey_import_ext3() β she's the sequel, the ext3 era π
β RETURNS β
On success, GNUTLS_E_SUCCESS (0) is returned, otherwise a negative error value. so like, zero is the slay, negative is the π
π¦ SINCE π¦
3.1 β she's been here since 3.1, an OG fr fr
π REPORTING BUGS π
Report bugs to <bugs@gnutls.org>.
Home page: https://www.gnutls.org
(if you find a bug, tell them! don't just suffer in silence bestie π«Ά)
π 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.
(translation: go off, share the file, just 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/
like, if it's not in your /usr/share/doc/gnutls/ folder, the link has you covered π₯
and that's the whole page, bestie!! every flag, every callback, every caveat, all preserved, just with the correct amount of β¨dramaβ¨ π
mwah π β this was the gnutls manual, version 3.8.13, page gnutls_privkey_import_ext2(3). go raw-sign something iconic πβ¨
π¦ 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