gnutls_privkey_set_spki(3)

✨ gnutls_privkey_set_spki(3) ✨

okay bestie, welcome to the gnutls manual πŸ’– this one's all about gnutls_privkey_set_spki, and it's short, it's sweet, and it ate. let's get into it 🫢


🌸 NAME 🌸

gnutls_privkey_set_spki β€” it's an API function, babes. that's the whole vibe. ✨


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <gnutls/abstract.h>

int gnutls_privkey_set_spki(gnutls_privkey_t privkey, const
       gnutls_x509_spki_t spki, unsigned int flags);

like… look at her. three args, one int coming back. iconic behavior fr fr πŸ’…


πŸŽ€ ARGUMENTS πŸŽ€

  • gnutls_privkey_t privkey β€” a public key, and its type is gnutls_privkey_t. yes she's called a privkey and described as a public key, no we are not unpacking that, that's just what the docs say πŸ’€
  • const gnutls_x509_spki_t spki β€” a SubjectPublicKeyInfo structure, typed as gnutls_privkey_spki_t. so much spki energy in one argument honestly 🌈
  • unsigned int flags β€” must be zero. like, literally zero. nothing else. don't get creative, bestie 😭

πŸ’œ DESCRIPTION πŸ’œ

so what does she do? this function sets the public key information. that's it, that's the job πŸŽ€

heads up though β€” the spki you hand over must be initialized. not "probably initialized", not "i think it's fine" β€” initialized. the function is not gonna do it for you, she is not your mom πŸ™ˆ

⭐ RETURNS ⭐

win = GNUTLS_E_SUCCESS (0) πŸŽ‰ anything else and it's a negative error value, aka the vibe check failed, and you should go read your errors, bestie.


🧚 SINCE 🧚

3.6.0 β€” she's been here a while, lowkey a legend πŸ‘‘


πŸ”₯ REPORTING BUGS πŸ”₯

found a bug? spill it to <bugs@gnutls.org> πŸ“§

home page, if you wanna scroll: https://www.gnutls.org 🌐


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. (slay, no cap, free as in freedom fr fr πŸ’–)


🌈 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, go visit:

https://www.gnutls.org/manual/

and that's the whole page, bestie!! πŸ’… this was gnutls version 3.8.13, brought to you by the gnutls manual, and yes β€” gnutls_privkey_set_spki(3) is her name, don't wear it out ✨ mwah πŸ«ΆπŸ’–

πŸ“¦ where this page comes from