gnutls_privkey_import_x509_raw(3)

πŸ’– gnutls_privkey_import_x509_raw(3) πŸ’–

okay bestie, welcome to the gnutls manual, and specifically to the page for gnutls_privkey_import_x509_raw. this is the glow-up moment where your raw private key data becomes an actual abstract gnutls_privkey_t. it's giving ✨main character energy✨ for keys. let's get into it 🫢


🌸 NAME 🌸

gnutls_privkey_import_x509_raw β€” an API function, bestie. that's the whole name, no notes. πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <gnutls/abstract.h>

int gnutls_privkey_import_x509_raw(gnutls_privkey_t pkey, const
gnutls_datum_t * data, gnutls_x509_crt_fmt_t format, const char *
password, unsigned int flags);

yep, that's the whole signature, copy it exactly, don't freestyle it. πŸ™ˆ


πŸŽ€ ARGUMENTS πŸŽ€

  • gnutls_privkey_t pkey β€” the private key. that's the glow-up target, the one getting imported into. πŸ‘‘
  • const gnutls_datum_t * data β€” the private key data that's getting imported. the raw material, the before picture. πŸ’œ
  • gnutls_x509_crt_fmt_t format β€” the format of the private key. so we know how to read it, iykyk. 🌈
  • const char * password β€” a password. it's optional, so no pressure if there isn't one. πŸ“
  • unsigned int flags β€” an ORed sequence of gnutls_pkcs_encrypt_flags_t. yes, ORed, as in you smush them together with |. ✨

πŸ’… DESCRIPTION πŸ’…

so the way that this function works: it imports the given private key into the abstract gnutls_privkey_t type. literally just ✨transformation✨.

The supported formats are basic unencrypted key, PKCS8, PKCS12, TSS2, and the openssl format. so you've got options, bestie, and they all slay in their own way. πŸ”₯


⭐ RETURNS ⭐

On success, GNUTLS_E_SUCCESS (0) is returned, otherwise a negative error value. so if you see 0, you ate. if you see a negative number, something's not vibing β€” go check it. 😭


🧚 SINCE 🧚

3.1.0 β€” she's been iconic since way back. periodt. πŸ’–


πŸ’€ REPORTING BUGS πŸ’€

Report bugs to <bugs@gnutls.org>.

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

not me asking you to email the bugs in, but yes, fr fr, that's the address. 🫢

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.


🌟 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! this was gnutls 3.8.13, the gnutls_privkey_import_x509_raw(3) page. go import some keys and be iconic. bye πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from