gnutls_x509_crl_sign2(3)

πŸ’… gnutls_x509_crl_sign2 β€” the glow-up your CRL was waiting for

okay bestie, gather round, because we're doing the final step of a certificate revocation list and it's lowkey the most iconic part. this is page gnutls_x509_crl_sign2(3) from the gnutls manual, and yes, it's giving "last boss of the CRL pipeline" energy. πŸŽ€


✨ SYNOPSIS ✨

#include <gnutls/x509.h>

int gnutls_x509_crl_sign2(gnutls_x509_crl_t crl, gnutls_x509_crt_t
issuer, gnutls_x509_privkey_t issuer_key, gnutls_digest_algorithm_t dig,
unsigned int flags);

🫢 ARGUMENTS 🫢

  • gnutls_x509_crl_t crl β€” this one should be holding a gnutls_x509_crl_t type, like, that's its whole job.
  • gnutls_x509_crt_t issuer β€” the certificate of the certificate issuer. the source of truth, the origin story.
  • gnutls_x509_privkey_t issuer_key β€” holds the issuer's private key. guard this with your life, bestie. πŸ”
  • gnutls_digest_algorithm_t dig β€” the message digest to use. GNUTLS_DIG_SHA256 is the safe choice unless you know what you're doing. and like, genuinely know. not vibes-know. 😭
  • unsigned int flags β€” must be 0. that's it. that's the whole vibe check.

🌸 DESCRIPTION 🌸

so this function signs the CRL with the issuer's private key, and it also copies the issuer's information into the CRL. two-for-one, we love a multitasker. ✨

this must be the last step in a certificate CRL, because everything you set before this point is now officially signed. no going back, no edits, the ink is dry. periodt.

⚠️ heads up: a known limitation of this function is that a newly-signed CRL will not be fully functional (like, for signature verification, for example) until it is exported and re-imported. yes, really. the way that it just needs a lil round trip first... πŸ’€

after GnuTLS 3.6.1, the value of dig may be GNUTLS_DIG_UNKNOWN, and in that case a suitable β€” but reasonable for the key algorithm β€” digest will be selected for you. so like, autopilot mode. πŸ¦‹


⭐ RETURNS ⭐

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


πŸ’œ REPORTING BUGS πŸ’œ

found a bug? spill the tea to bugs@gnutls.org. πŸ“§

home page, aka the main character's profile: 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. so go off, just keep the receipts. 🫢


🌈 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, bestie!! πŸŽ€ this was gnutls_x509_crl_sign2(3) from the gnutls manual, version 3.8.13. go sign something and slay responsibly. πŸ’–βœ¨πŸ¦‹πŸ’…

πŸ“¦ where this page comes from