gnutls_privkey_import_tpm_url(3)
β¨ gnutls_privkey_import_tpm_url β¨
okay bestie, so this one lives in the gnutls manual (that's the gnutls 3.8.13 manual, to be exact π) and it's literally an API function. Yes, lowercase "API function", that's the vibe. It's the one you call when you've got a private key chillin' inside a TPM and you want it to live inside gnutls' fancy abstract private-key situation. π
πΈ SYNOPSIS πΈ
#include <gnutls/abstract.h>
int gnutls_privkey_import_tpm_url(gnutls_privkey_t pkey, const char *
url, const char * srk_password, const char * key_password, unsigned int
flags);
like. five things. one return value. iconic behavior, no notes. π
π¦ ARGUMENTS π¦
gnutls_privkey_t pkeyβ the private key itself, the main character, the one we're importing into πconst char * urlβ the URL of the TPM key you wanna import, so it knows where to go fetch the goods β¨const char * srk_passwordβ the password for the SRK key. it's optional π«Άconst char * key_passwordβ a password for the key. also optional, also slay πunsigned int flagsβ one of theGNUTLS_PRIVKEY_*flags. pick your fighter π
π DESCRIPTION π
so basically? this function will import the given private key into the abstract gnutls_privkey_t type. that's it. that's the whole job. and it does it well. π
okay now the important part, listen up bestie, no cap π
unless GNUTLS_PRIVKEY_DISABLE_CALLBACKS is specified, if you give incorrect passwords (or NULL passwords, which likeβ¦ same energy tbh π) then the PKCS11 callback functions will be used to go obtain the correct passwords for you. so it's giving helpful. it's giving resourceful. π§
but otherwise β if the callbacks aren't in play β here's how it goes down:
- if the SRK password is wrong, you get
GNUTLS_E_TPM_SRK_PASSWORD_ERRORback πΈ - if the key password is wrong, or you just didn't provide one at all, you get
GNUTLS_E_TPM_KEY_PASSWORD_ERRORback π¦
so like, the errors are specific. they're not vague. they will tell you exactly which password you fumbled. we love an honest king. β
π RETURNS π
on success, GNUTLS_E_SUCCESS β which is 0, bestie, a big fat zero, the good zero β is returned. π
otherwise you get a negative error value. so like, if it's negative, that's your sign. negative = not it π
π SINCE π
3.1.0 β so this has been around for a while, it's practically a legacy icon at this point π
π«Ά REPORTING BUGS π«Ά
found a bug? spill. report bugs to <bugs@gnutls.org> π§
home page, for when you're feeling nosy: 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. (yes, that includes you, go forth and redistribute responsibly π«‘)
β 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, just go read it. it's there. it's waiting. π
and that's the whole page, bestie π this was gnutls_privkey_import_tpm_url(3) from the gnutls manual, version 3.8.13, and if you made it this far you deserve a little treat. go import a key. slay. π
β¨π¦
π¦ 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