gnutls_pubkey_export_rsa_raw(3)
π NAME π
gnutls_pubkey_export_rsa_raw β bestie, it's an API function, and it's here to yank the raw RSA public key bits out of your pubkey π¦
This is a page from the gnutls manual, and we're keeping every single detail, no cap.
β¨ SYNOPSIS β¨
#include <gnutls/abstract.h>
int gnutls_pubkey_export_rsa_raw(gnutls_pubkey_t key, gnutls_datum_t *
m, gnutls_datum_t * e);
π ARGUMENTS π
gnutls_pubkey_t keyβ this one holds the certificate. It's the main character you're pulling the key material out of πgnutls_datum_t * mβ this is where the modulus is gonna live afterwards. Heads up: it may beNULLπgnutls_datum_t * eβ and this one catches the public exponent. Also may beNULLπ
πΈ DESCRIPTION πΈ
Okay so here's the vibe: this function exports the RSA public key's parameters that are chilling inside the given structure. Like, it goes in, grabs them, and hands them over.
The new parameters get allocated using gnutls_malloc() and then stored in the appropriate datum. So yes, that memory is yours now β it's giving "you own this, bestie" energy π«Ά
And the iconic part: this function allows for NULL parameters since 3.4.1 β (so if you only want one of them, that's totally fine, lowkey convenient)
π RETURNS π
GNUTLS_E_SUCCESSon success π- otherwise, a negative error code π (iykyk β always check your return values, fr fr)
π¦ SINCE π¦
3.3.0 β a classic, honestly. Been serving since day one π
π REPORTING BUGS π
Found a bug? Don't be shy, tell the devs:
- Report bugs to <bugs@gnutls.org> π§
- Home page: https://www.gnutls.org
π COPYRIGHT π
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 bestie, it's free β go wild, just keep the receipts)
π 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/
Not me ending the page with the SEE ALSO section like a proper main character π go read the Texinfo manual, it ate.
Okay that's the whole page, every flag, every NULL, every copyright line, all of it β nothing skipped, periodt π
Sending you off with the source tea: this was gnutls version 3.8.13, page gnutls_pubkey_export_rsa_raw(3) π stay slaying, and always free your datums π
π¦ where this page comes from
- alpine 3.22: gnutls-doc 3.8.13-r0 Β· LGPL-2.1-or-later
- alpine 3.23: gnutls-doc 3.8.13-r0 Β· LGPL-2.1-or-later
- alpine 3.24: gnutls-doc 3.8.13-r0 Β· LGPL-2.1-or-later
- arch rolling: gnutls 3.8.13-3 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 43: gnutls-devel 3.8.13-1.fc43 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 43: gnutls-devel 3.8.13-1.fc43 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 44: gnutls-devel 3.8.13-1.fc44 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 44: gnutls-devel 3.8.13-1.fc44 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- ubuntu stonking: gnutls-doc 3.8.13-1ubuntu1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms