gnutls_privkey_import_url(3)

✨ gnutls_privkey_import_url ✨

okay so bestie, we're in the gnutls manual, section 3, and today's main character is gnutls_privkey_import_url(3) β€” the lil function that lets you pull a private key straight out of a PKCS11 or TPM URL. no cap. πŸ’…


🌸 SYNOPSIS 🌸

#include <gnutls/abstract.h>

int gnutls_privkey_import_url(gnutls_privkey_t key, const char * url,
unsigned int flags);

like… she's giving very demure, very mindful, three args and a dream 🫢


πŸŽ€ ARGUMENTS πŸŽ€

  • gnutls_privkey_t key β€” your key, and it's gotta be of type gnutls_privkey_t. that's the whole vibe. πŸ”‘
  • const char * url β€” a PKCS 11 url. yes literally just a URL, that's the source of the key. iconic honestly. 🌈
  • unsigned int flags β€” bestie… should be zero. that's it. that's the instruction. zero. 🚫

πŸ’– DESCRIPTION πŸ’–

so what does she DO? this function will import a PKCS11 or TPM URL as a private key. that's the whole assignment and she ate. πŸ”₯

and if you're sitting there like "okay but which URL types are even supported??" β€” not me being helpful, but you can literally check that with gnutls_url_is_supported(). go ask her. iykyk. ✨


⭐ RETURNS ⭐

on success? GNUTLS_E_SUCCESS (0) is returned. slay. πŸŽ‰

otherwise you get a negative error value, which is giving not slay but at least it's honest. 😭


πŸ¦‹ SINCE πŸ¦‹

3.1.0 β€” she's been around a minute, an elder stateswoman of the API honestly πŸ‘‘


πŸ™ˆ REPORTING BUGS πŸ™ˆ

found a bug? don't be shy, report it to <bugs@gnutls.org>. fr fr, they wanna know. πŸ›

home page: https://www.gnutls.org β€” go say hi πŸ’œ


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 means you can share it, go off 🫢)


🌈 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, no notes πŸ’…

okay bye ily, this was gnutls version 3.8.13, page gnutls_privkey_import_url(3) β€” go import some keys and be the main character of your own TLS handshake πŸŒΈβœ¨πŸŽ€

πŸ“¦ where this page comes from