gnutls_x509_crt_set_key(3)
π gnutls_x509_crt_set_key(3) π
okay bestie, welcome to the gnutls manual page for gnutls_x509_crt_set_key(3) β yes that's the whole name, we're being formal today π
β¨ NAME β¨
gnutls_x509_crt_set_key β it's an API function, and it's about to hand your cert a whole public key situation π
πΈ SYNOPSIS πΈ
#include <gnutls/x509.h>
int gnutls_x509_crt_set_key(gnutls_x509_crt_t crt, gnutls_x509_privkey_t key);
π ARGUMENTS π
gnutls_x509_crt_t crtβ a certificate of typegnutls_x509_crt_t. the main character of this whole operation, fr fr.gnutls_x509_privkey_t keyβ holds a private key. she's got the goods ποΈ
π¦ DESCRIPTION π¦
So here's the tea: this function sets the public parameters from the given private key onto the certificate. like, it takes the public side of your key and drops it right into crt. that's the whole vibe. β¨
Now, if what you actually want is to export the public key (aka the SubjectPublicKeyInfo part, iykyk), then you should go check out gnutls_pubkey_import_x509() instead. not this function. different girl, different job π
π RETURNS π
On success, GNUTLS_E_SUCCESS (0) is returned β slay! π Otherwise you get a negative error value, which is giving "something went wrong bestie" energy π
π REPORTING BUGS π
Found a bug? not the cute kind? report it to <bugs@gnutls.org>. they wanna hear from you, no cap.
Home page: https://www.gnutls.org
π 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. so like, keep the receipts, bestie π«Ά
π 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, periodt π
β¨ this was gnutls version 3.8.13, and yeah, the footer says the same thing β gnutls_x509_crt_set_key(3), go off queen ππ
π¦ 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