gnutls_pubkey_print(3)

πŸ’– gnutls_pubkey_print β€” the glow-up printer for public keys πŸ’–

okay bestie, this one lives in the gnutls manual (section 3, the library functions girlies), and it's genuinely so useful. sit down, hydrate, let's go. 🫢


✨ NAME ✨

gnutls_pubkey_print β€” API function. that's it, that's the name. iconic behavior honestly. πŸ‘‘


🌸 SYNOPSIS 🌸

#include <gnutls/abstract.h>

int gnutls_pubkey_print(gnutls_pubkey_t pubkey,
gnutls_certificate_print_formats_t format, gnutls_datum_t * out);

like yes, you gotta pull in <gnutls/abstract.h> first, obviously, no cap. πŸ’…


πŸŽ€ ARGUMENTS πŸŽ€

  • gnutls_pubkey_t pubkey β€” the actual data you want printed. this is the main character of the whole operation. 🌟
  • gnutls_certificate_print_formats_t format β€” tells it which format to use. pick your vibe. ✨
  • gnutls_datum_t * out β€” a newly allocated datum holding a null terminated string. yes bestie, newly allocated, we'll get to the cleanup in a sec and you WILL remember it. 😭

πŸ¦‹ DESCRIPTION πŸ¦‹

so what does this do? it pretty prints public key information, and it's built for human eyeballs β€” suitable for display to a human. no cryptic hex soup, just readable output. we love to see it. πŸ’–

lowkey important: only GNUTLS_CRT_PRINT_FULL and GNUTLS_CRT_PRINT_FULL_NUMBERS are implemented. the others? not it. not happening. πŸ™ˆ

and the out you get back needs to be deallocated using gnutls_free(). that's not optional, that's not a suggestion, that's a promise you made to your memory allocator. free it. fr fr. 🧚


⭐ RETURNS ⭐

  • on success you get GNUTLS_E_SUCCESS (that's 0, queen) πŸ’…
  • otherwise it hands you a negative error value, so like, negative energy only in the return code please. πŸ’€

🌈 SINCE 🌈

3.1.5 β€” she's been serving since way back. vintage. πŸŽ€


πŸ› REPORTING BUGS πŸ›

found a bug? don't be shy, tell the girlies:

they wanna hear it, bestie, that's how the codebase stays slaying. πŸ”₯


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. so like, go off, share it, 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/

that's the whole map, iykyk. πŸ—ΊοΈβœ¨


that's the page bestie, you ate. this cutie was brought to you by gnutls 3.8.13 (that's the source + version in the footer, mwah πŸ’‹). now go free that out datum with gnutls_free(). i'm serious. πŸ’…πŸŒΈ

πŸ“¦ where this page comes from