gnutls_x509_crq_set_spki(3)

πŸ’– gnutls_x509_crq_set_spki(3) πŸ’–

okay bestie, welcome to the gnutls manual, this one's from the gnutls pages and it's all about making your cert request's public key situation very explicit. slay.


✨ NAME ✨

gnutls_x509_crq_set_spki β€” it's an API function, and it's here to set the SPKI on your certificate request. no cap.


🌸 SYNOPSIS 🌸

#include <gnutls/x509.h>

int gnutls_x509_crq_set_spki(gnutls_x509_crq_t crq, const
       gnutls_x509_spki_t spki, unsigned int flags);

πŸŽ€ ARGUMENTS πŸŽ€

  • gnutls_x509_crq_t crq β€” a certificate request of type gnutls_x509_crq_t. that's the thing you're editing, bestie.
  • const gnutls_x509_spki_t spki β€” a SubjectPublicKeyInfo structure of type gnutls_x509_spki_t. this is the info you're handing over.
  • unsigned int flags β€” must be zero. like, must. don't get creative. πŸ’…

πŸ¦‹ DESCRIPTION πŸ¦‹

so this function will set the certificate request's subject public key information explicitly. it's giving "I know exactly what I want."

the way that this is intended to be used: in the cases where a single public key (for example, RSA) can be used for multiple signature algorithms β€” think RSA PKCS1-1.5, and RSA-PSS. one key, multiple vibes. iconic.

and if you wanna export the public key (i.e., the SubjectPublicKeyInfo part, the whole point), go check out gnutls_pubkey_import_x509(). that's your girl for that job.


⭐ RETURNS ⭐

on success, GNUTLS_E_SUCCESS (0) is returned. otherwise you get a negative error value, which is the universe's way of saying "not today." 😭


🌈 SINCE 🌈

3.6.0 β€” she's been around since 3.6.0, a true veteran of the game.


πŸ’œ REPORTING BUGS πŸ’œ

found a bug? don't suffer in silence, tell the gnutls girlies:


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. periodt. 🫢


πŸ”₯ 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/


no extra tips, no invented options, just the facts in a cuter outfit. that's the rule. πŸ’–

okay that's the whole page bestie!! this was the gnutls manual, version 3.8.13, and yes, this is gnutls_x509_crq_set_spki(3). go forth and set those SPKIs, main character. πŸŒΈβœ¨πŸ¦‹

πŸ“¦ where this page comes from