gnutls_pubkey_import_tpm_raw(3)

πŸ’– gnutls_pubkey_import_tpm_raw(3) πŸ’–

okay bestie, welcome to the gnutls manual, page gnutls_pubkey_import_tpm_raw. this is the part where we pull a public key out of a TPM key blob and honestly? it's giving ✨ key extraction ✨. let's get into it 🫢


✨ NAME ✨

gnutls_pubkey_import_tpm_raw β€” it's an API function, and its whole job is exactly what the name says. no cap. πŸ’…


🌸 SYNOPSIS 🌸

#include <gnutls/abstract.h>

int gnutls_pubkey_import_tpm_raw(gnutls_pubkey_t pkey, const
       gnutls_datum_t * fdata, gnutls_tpmkey_fmt_t format, const char *
       srk_password, unsigned int flags);

like, five arguments, one int returned, classic. don't forget that #include or it's gonna be a whole thing 😭


πŸŽ€ ARGUMENTS πŸŽ€

  • gnutls_pubkey_t pkey β€” the public key. this is your main character right here, the one getting filled in πŸ‘‘
  • const gnutls_datum_t * fdata β€” the TPM key that we're importing. the raw material, literally 🧚
  • gnutls_tpmkey_fmt_t format β€” the format of the private key. yes bestie, the private key β€” that's what the original says, we don't question it, we just pass it πŸ’œ
  • const char * srk_password β€” the password for the SRK key. it's optional, so if you don't need it, NULL it and move on πŸ¦‹
  • unsigned int flags β€” one of the GNUTLS_PUBKEY_* flags. one. not a whole little collection, one 🌈

πŸ’« DESCRIPTION πŸ’«

so the way that this works: this function will import the public key from the provided TPM key structure. that's the vibe. that's the whole assignment. πŸ’…

and about passwords β€” with respect to passwords, the same as in gnutls_pubkey_import_tpm_url() apply. so if you've already read that page, you already know, iykyk. if not, go read it, bestie, i'm not about to guess at it for you πŸ™ˆ


⭐ RETURNS ⭐

on success, GNUTLS_E_SUCCESS (0) is returned. otherwise you get a negative error value. so like, check your return value, okay? zero is the slay outcome, negative means we're crying 😭


πŸ¦‹ SINCE πŸ¦‹

3.1.0 β€” this one's been around since way before you discovered it, it's an elder icon πŸ‘‘


πŸ“’ REPORTING BUGS πŸ“’

found a bug? report it to <bugs@gnutls.org>. do not suffer in silence, that's not the energy 🌸

home page: https://www.gnutls.org


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, go off, just keep the receipt πŸ§ΎπŸ’–


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

and that's the whole page, bestie!! you now know how to gnutls_pubkey_import_tpm_raw and honestly that's a flex 🫢

this was brought to you by the gnutls manual, version 3.8.13 β€” signed, sealed, delivered, slayed. periodt. πŸ’…βœ¨

πŸ“¦ where this page comes from