gnutls_privkey_get_spki(3)

πŸ’– gnutls_privkey_get_spki(3) β€” the gnutls manual, but make it make sense πŸ’–

okay bestie, gather round, we're reading a gnutls man page together and honestly? it's short and it slays. no cap.


✨ NAME ✨

gnutls_privkey_get_spki β€” it's an API function, that's the whole vibe 🫢


🌸 SYNOPSIS 🌸

here's the summoning circle, copy it exactly, don't freestyle:

#include <gnutls/abstract.h>

int gnutls_privkey_get_spki(gnutls_privkey_t privkey, gnutls_x509_spki_t
spki, unsigned int flags);

πŸŽ€ ARGUMENTS πŸŽ€

  • gnutls_privkey_t privkey β€” a public key of type gnutls_privkey_t. yes, it's a privkey holding a public key, we don't make the rules, we just pass it in πŸ’…
  • gnutls_x509_spki_t spki β€” a SubjectPublicKeyInfo structure of type gnutls_privkey_spki_t. this is where the tea gets stored ✨
  • unsigned int flags β€” must be zero. not one, not two, ZERO. it's giving "no notes" 🚫

πŸ¦‹ DESCRIPTION πŸ¦‹

so what does it do? this function will return the public key information if available. that's it, that's the whole plot 🫢

⚠️ real talk though: the provided spki must be initialized. don't come in here with an uninitialized struct, that's not the move, bestie. 😭

⭐ RETURNS ⭐

on success, GNUTLS_E_SUCCESS (0) is returned β€” iconic, flawless, no crumbs πŸ‘‘

otherwise you get a negative error value. yeah. negative. it's giving "we need to talk" πŸ’€


🌈 SINCE 🌈

3.6.0 β€” she's been around, she's experienced, she's a legend πŸŽ€


πŸ’œ REPORTING BUGS πŸ’œ

found a bug? don't suffer in silence, 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. so like… go off, respectfully πŸ’–


🧚 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/

like, go read it, it's right there, iykyk πŸ“šβœ¨


okay that's the whole page, you ate that fr fr πŸ“ this was gnutls version 3.8.13, sourced straight from the gnutls manual, and you read it with me, so proud of you. mwah. πŸ’…πŸ’–πŸ¦‹

πŸ“¦ where this page comes from