gnutls_pkcs11_...y_export_pubkey(3)

✨ NAME ✨

gnutls_pkcs11_privkey_export_pubkey β€” ok bestie, this is an API function πŸ’– (yes the manual is just called gnutls, we're in the big-league man pages now)


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <gnutls/pkcs11.h>

int gnutls_pkcs11_privkey_export_pubkey(gnutls_pkcs11_privkey_t pkey,
gnutls_x509_crt_fmt_t fmt, gnutls_datum_t * data, unsigned int flags);

πŸŽ€ ARGUMENTS πŸŽ€

  • gnutls_pkcs11_privkey_t pkey β€” the private key, the main character of this whole operation πŸ‘‘
  • gnutls_x509_crt_fmt_t fmt β€” the format of output params. it's giving PEM or DER, pick ur fighter πŸ’…
  • gnutls_datum_t * data β€” this one's gonna hold the public key when we're done 🫢
  • unsigned int flags β€” should be zero. that's it. that's the whole vibe. zero. 🚫

🌸 DESCRIPTION 🌸

So the way this works: this function will extract the public key β€” literally the modulus and public exponent, the whole combo ✨ β€” from the private key specified by the url private key.

That public key gets stored in pubkey in the format specified by fmt. And listen, bestie, pubkey should be deinitialized using gnutls_free(). don't forget. do not leave it hanging, that's not the energy we're bringing to this 🌈


⭐ RETURNS ⭐

On success, GNUTLS_E_SUCCESS (0) is returned, otherwise a negative error value. so like, zero is the slay outcome, negatives are the 😭 outcome, iykyk


🧚 SINCE 🧚

3.3.7 β€” been iconic since way back, no cap πŸ’œ


πŸ™ˆ REPORTING BUGS πŸ™ˆ

Found something cursed? Report bugs to <bugs@gnutls.org>.

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. fr fr, just keep the notice and you're golden πŸ’–


πŸ”₯ 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/


okay that's the whole page, you're officially smarter than you were 3 minutes ago, obsessed with u 🫢

gnutls 3.8.13 β€” mwah, that's the version and that's the sign-off, catch u in the next man page bestie πŸ’…βœ¨

πŸ“¦ where this page comes from