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 be NULL πŸ™ˆ
  • gnutls_datum_t * e β€” and this one catches the public exponent. Also may be NULL πŸ’…

🌸 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_SUCCESS on 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:


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