gnutls_privkey_export_x509(3)

✨ gnutls_privkey_export_x509(3) β€” the glow-up page ✨

okay bestie, welcome to the gnutls manual, page gnutls_privkey_export_x509(3). this is literally the API function that takes your abstract private key and hands you the classic x509 version. let's get into it πŸ’–


🌸 NAME 🌸

gnutls_privkey_export_x509 β€” API function. that's it, that's the name, she's iconic πŸ‘‘


πŸŽ€ SYNOPSIS πŸŽ€

#include <gnutls/abstract.h>

int gnutls_privkey_export_x509(gnutls_privkey_t pkey,
gnutls_x509_privkey_t * key);

πŸ¦‹ ARGUMENTS πŸ¦‹

  • gnutls_privkey_t pkey β€” the private key, the main character of this whole operation πŸ’…
  • gnutls_x509_privkey_t * key β€” where the exported key is gonna live. this is the location for the key to be exported 🫢

🌈 DESCRIPTION 🌈

so what's the vibe? this function converts the given abstract private key into a gnutls_x509_privkey_t type. glow-up complete ✨

but listen, there are rules, and we respect them:

  • the abstract key must be of type GNUTLS_PRIVKEY_X509. no exceptions, she's picky 😭
  • the input key must not be initialized. like, don't come in here with a pre-initialized key, that's not the move πŸ™ˆ
  • the key that gets returned in key should be deinitialized using gnutls_x509_privkey_deinit(). yes, you have to clean up after yourself, that's the grown-up part 🧚

⭐ RETURNS ⭐

on success, GNUTLS_E_SUCCESS (which is 0) is returned. otherwise you get a negative error value. not me getting a negative number back and knowing something went wrong πŸ’€


πŸ’œ SINCE πŸ’œ

3.4.0 β€” she's been serving since then, no cap.


πŸ“ REPORTING BUGS πŸ“

found a bug? don't suffer in silence bestie, report it:


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

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


fr fr, that's the whole page. go forth and export those keys responsibly πŸ’–

mwah β€” this was gnutls_privkey_export_x509(3) from the gnutls manual, version 3.8.13. ty for reading, ily, bye bestie πŸ«Άβœ¨πŸŽ€

πŸ“¦ where this page comes from