gnutls_x509_crq_sign(3)

✨ gnutls_x509_crq_sign ✨

okay bestie, welcome to the gnutls manual πŸ’– this one's a little function from the gnutls pages and it is literally an API function, no cap. it signs certificate requests. let's get into it πŸŽ€


🌸 NAME 🌸

gnutls_x509_crq_sign β€” it's an API function, bestie. that's the whole name-vibe. πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <gnutls/x509.h>

int gnutls_x509_crq_sign(gnutls_x509_crq_t crq, gnutls_x509_privkey_t key);

like… you gotta include the header first, obviously πŸ™ˆ


πŸ’œ ARGUMENTS πŸ’œ

  • gnutls_x509_crq_t crq β€” bestie this one should contain a gnutls_x509_crq_t type. that's it, that's the requirement ✨
  • gnutls_x509_privkey_t key β€” and this one holds a private key πŸ”‘ keep it safe, okay? she's private for a reason.

πŸ‘‘ DESCRIPTION πŸ‘‘

so here's the tea β˜• this function is the same as gnutls_x509_crq_sign2() but with no flags, and it picks an appropriate hash algorithm for you. slay, she does the thinking so you don't have to πŸ’…

but the hash algorithm used? may vary between versions of GnuTLS 😭 and it is tied to the security level of the issuer's public key. so like, don't hardcode your assumptions about which hash you're getting, fr fr.

⚠️ known limitation alert ⚠️ a newly-signed request will not be fully functional (e.g., for signature verification) until it is exported and re-imported. yes bestie, you have to do the little round trip. it's giving "have you tried turning it off and on again" but for certificate requests πŸ’€

⭐ RETURNS ⭐

  • on success, GNUTLS_E_SUCCESS (0) is returned πŸŽ‰ periodt.
  • otherwise, you get a negative error value 😭 read it, don't ignore it.

πŸ› REPORTING BUGS πŸ›

found a bug? don't suffer in silence, tell the 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. (iconic behavior honestly, we love a permissive queen πŸ‘‘)


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

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

and that's the whole vibe check βœ… this page came straight out of the gnutls manual, version 3.8.13, filed under gnutls_x509_crq_sign(3) πŸ’– go sign something, you absolute main character πŸ¦‹βœ¨

πŸ“¦ where this page comes from