gnutls_x509_privkey_set_spki(3)

πŸ’– gnutls_x509_privkey_set_spki β€” an API function, bestie πŸ’–

okay so this one lives in the gnutls manual (that's the manual name, bestie, and we're on version 3.8.13 if you're keeping receipts). It's a lil function called gnutls_x509_privkey_set_spki and honestly? It's giving "quiet overachiever." Let's get into it. ✨


🌸 SYNOPSIS 🌸

#include <gnutls/x509.h>

int gnutls_x509_privkey_set_spki(gnutls_x509_privkey_t key, const
gnutls_x509_spki_t spki, unsigned int flags);

like, look at that signature. three arguments, one int coming back at you. no cap. πŸ’…


πŸŽ€ ARGUMENTS πŸŽ€

  • gnutls_x509_privkey_t key β€” bestie this should contain a gnutls_x509_privkey_t type. that's the vibe. that's the assignment. 🫢
  • const gnutls_x509_spki_t spki β€” a SubjectPublicKeyInfo structure, of type gnutls_x509_spki_t. iconic structure, honestly. 🌈
  • unsigned int flags β€” must be zero. that's it. zero. not one, not "a little bit", ZERO. 🚫✨

πŸ¦‹ DESCRIPTION πŸ¦‹

So this function will return the public key information of a private key. yes, you read that right, it's giving public info from a private key, the duality of woman. 😭

And important, bestie: the spki you provide must be initialized. like, don't just roll up with an uninitialized spki, that's not the move. initialize her first. πŸ’…


⭐ RETURNS ⭐

  • Zero on success πŸ‘‘
  • or a negative error code on error πŸ’€

that's the whole return story. zero = slay, negative = not slay.


πŸ™ˆ REPORTING BUGS πŸ™ˆ

Found a bug? Don't suffer in silence, tell the people:


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 basically: copy it, share it, remix 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/

and that's the whole page, bestie!! πŸ’– this was gnutls_x509_privkey_set_spki(3) from the gnutls manual, version 3.8.13 β€” go forth and initialize your spki. mwah. πŸ«Άβœ¨πŸ’…

πŸ“¦ where this page comes from