gnutls_pubkey_import_tpm_url(3)

πŸ’– gnutls_pubkey_import_tpm_url(3) πŸ’–

okay bestie, welcome to the gnutls manual, this one's a page from the big gnutls book and it's all about yanking a public key out of a TPM by its URL. it's giving niche but iconic, fr fr. let's go 🫢


✨ NAME ✨

gnutls_pubkey_import_tpm_url β€” the API function, the moment, the legend πŸ’…


✨ SYNOPSIS ✨

#include <gnutls/abstract.h>

int gnutls_pubkey_import_tpm_url(gnutls_pubkey_t pkey, const char * url,
const char * srk_password, unsigned int flags);

✨ ARGUMENTS ✨

  • gnutls_pubkey_t pkey β€” the public key, aka your main character πŸŽ€
  • const char * url β€” the URL of the TPM key that's getting imported. it's literally the address, no cap πŸ“
  • const char * srk_password β€” the password for the SRK key. it's optional, so no pressure πŸ“
  • unsigned int flags β€” should be zero. that's it, that's the whole vibe 🚫

✨ DESCRIPTION ✨

so this function will import the given private key into the abstract gnutls_privkey_t type. yes, we said private key, we're just reporting what the page says, don't come for me πŸ™ˆ

heads up bestie, important caveat: unless GNUTLS_PUBKEY_DISABLE_CALLBACKS is specified, if incorrect (or NULL) passwords are given, the PKCS11 callback functions will be used to obtain the correct passwords. otherwise, if the SRK password is wrong, GNUTLS_E_TPM_SRK_PASSWORD_ERROR is returned. so like, it'll try to help you, and if you told it not to, it'll just ✨fail✨. not me being dramatic, that's just the deal πŸ’€

✨ RETURNS ✨

on success, GNUTLS_E_SUCCESS (0) is returned. otherwise you get a negative error value 😭 slay when it works, sad when it doesn't.


✨ SINCE ✨

3.1.0 β€” an elder, honestly. been here since before some of y'all were born πŸ‘‘


✨ REPORTING BUGS ✨

found a bug? tell the gnutls girlies:


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: take it, share it, 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, go visit:

https://www.gnutls.org/manual/


and that's the whole page, bestie! this was gnutls_pubkey_import_tpm_url(3) from gnutls version 3.8.13 β€” thanks for reading, ily, go import some keys responsibly πŸ’–βœ¨πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from