gnutls_privkey_import_tpm_raw(3)

✨ gnutls_privkey_import_tpm_raw ✨

okay bestie, buckle up, we're in the gnutls manual and this one is a whole little function called gnutls_privkey_import_tpm_raw. it's giving "let me slide a TPM key into your abstract privkey era." πŸ’…


🌸 NAME 🌸

gnutls_privkey_import_tpm_raw β€” an API function, no cap. literally what it says on the tin. 🫢


πŸŽ€ SYNOPSIS πŸŽ€

#include <gnutls/abstract.h>

int gnutls_privkey_import_tpm_raw(gnutls_privkey_t pkey, const
       gnutls_datum_t * fdata, gnutls_tpmkey_fmt_t format, const char *
       srk_password, const char * key_password, unsigned int flags);

six args, one vibe check, zero notes. πŸ’–


πŸ¦‹ ARGUMENTS πŸ¦‹

  • gnutls_privkey_t pkey β€” the private key. your main character, fr.
  • const gnutls_datum_t * fdata β€” the TPM key that's about to be imported. it's coming home 🏠
  • gnutls_tpmkey_fmt_t format β€” the format of that private key. gotta know what we're working with.
  • const char * srk_password β€” the password for the SRK key. it's optional, so if you don't have one, no stress 🫢
  • const char * key_password β€” a password for the key. also optional. iconic flexibility tbh.
  • unsigned int flags β€” should be zero. that's it. that's the whole thing. zero. πŸ™ˆ

πŸ’œ DESCRIPTION πŸ’œ

so the way that this works: this function imports the given private key into the abstract gnutls_privkey_t type. slay, congrats, it's abstract now ✨

and about those passwords? the same rules as in gnutls_privkey_import_tpm_url() apply. so if you already know how that one handles passwords, you're already set, iykyk.


⭐ RETURNS ⭐

if everything goes right: GNUTLS_E_SUCCESS (0) is returned. periodt. πŸ’š

otherwise? a negative error value. 😭 not the negative error value.


🌈 SINCE 🌈

3.1.0 β€” an elder, lowkey, but still serving. πŸ‘‘


πŸ“ REPORTING BUGS πŸ“

found a bug? don't be shy, 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. so like, take it, share it, just keep the receipts bestie 🧚


πŸŽ€ 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/

gnutls version 3.8.13, and this little page is dated gnutls_privkey_import_tpm_raw(3). that's the whole manual page, bestie β€” now go import that TPM key, you've got this πŸ’œβœ¨πŸ¦‹

πŸ“¦ where this page comes from