gnutls_x509_privkey_get_spki(3)
π NAME π
gnutls_x509_privkey_get_spki β an API function, bestie, and it lives in the gnutls manual π
β¨ SYNOPSIS β¨
#include <gnutls/x509.h>
int gnutls_x509_privkey_get_spki(gnutls_x509_privkey_t key,
gnutls_x509_spki_t spki, unsigned int flags);
πΈ ARGUMENTS πΈ
gnutls_x509_privkey_t keyβ okay so this one should contain agnutls_x509_privkey_ttype. that's literally it, that's the vibe πgnutls_x509_spki_t spkiβ a SubjectPublicKeyInfo structure of typegnutls_x509_spki_t. she's the destination, the main character of this whole thing πunsigned int flagsβ must be zero. that's the whole rule. zero. not one, not a little bit, zero π«Ά
π¦ DESCRIPTION π¦
so what this function does is β it returns the public key information of a private key. yes fr fr, your private key has public key info tucked inside it and this is how you get it out π
heads up bestie: the provided spki must be initialized first. no skipping that step, it's not optional, it's giving prerequisite π
β RETURNS β
Zero on success, or a negative error code on error. that's the deal π
π REPORTING BUGS π
Found something cursed? Report bugs to <bugs@gnutls.org>.
Home page: https://www.gnutls.org β go say hi π
π COPYRIGHT π
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, that's the license, it's iconic β¨
π§ 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 the whole thing, it's lowkey a masterpiece ππ
okay that's the whole page bestie, you ate that π«Ά this was brought to you by gnutls 3.8.13 β stay hydrated, init your spki, and pass flags as zero, mwah π
πΈ
π¦ where this page comes from
- alpine 3.22: gnutls-doc 3.8.13-r0 Β· LGPL-2.1-or-later
- alpine 3.23: gnutls-doc 3.8.13-r0 Β· LGPL-2.1-or-later
- alpine 3.24: gnutls-doc 3.8.13-r0 Β· LGPL-2.1-or-later
- arch rolling: gnutls 3.8.13-3 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 43: gnutls-devel 3.8.13-1.fc43 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 43: gnutls-devel 3.8.13-1.fc43 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 44: gnutls-devel 3.8.13-1.fc44 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 44: gnutls-devel 3.8.13-1.fc44 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- ubuntu stonking: gnutls-doc 3.8.13-1ubuntu1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms