gnutls_x509_crl_privkey_sign(3)

πŸ’– gnutls_x509_crl_privkey_sign(3) πŸ’–

okay bestie, welcome to the gnutls manual, section 3, and today's main character is gnutls_x509_crl_privkey_sign. yes it's an API function. yes it's a whole mouthful. no we are not skipping a single word of it. sit down, hydrate, let's go 🫢


✨ NAME ✨

gnutls_x509_crl_privkey_sign β€” API function πŸ’…


🌸 SYNOPSIS 🌸

#include <gnutls/abstract.h>

int gnutls_x509_crl_privkey_sign(gnutls_x509_crl_t crl,
gnutls_x509_crt_t issuer, gnutls_privkey_t issuer_key,
gnutls_digest_algorithm_t dig, unsigned int flags);

like. look at that signature. it's giving five arguments and zero chill. copy it exactly, don't freestyle it, i'm begging πŸ™ˆ


πŸŽ€ ARGUMENTS πŸŽ€

  • gnutls_x509_crl_t crl β€” should contain a gnutls_x509_crl_t type. that's it, that's the whole vibe. it's the CRL bestie, hand it over πŸ’–
  • gnutls_x509_crt_t issuer β€” is the certificate of the certificate issuer. the issuer's cert. the one who's doing the signing. the main character of the signing arc πŸ‘‘
  • gnutls_privkey_t issuer_key β€” holds the issuer's private key. keep this safe, this is the whole point of the function, do NOT be casual with it πŸ”₯
  • 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 bestie, if you have to ask whether you know what you're doing, you do not know what you're doing. take the SHA256. it's the safe choice for a reason ⭐
  • unsigned int flags β€” must be 0. not "probably 0". not "0-ish". must be 0. periodt πŸ’€

πŸ¦‹ DESCRIPTION πŸ¦‹

This function will sign the CRL with the issuer's private key, and will copy the issuer's information into the CRL. so it's signing and it's doing the little info-copy thing at the same time. multitasking icon behavior, honestly ✨

This must be the last step in a certificate CRL since all the previously set parameters are now signed. so like β€” everything you set up before this? it's all getting locked in right here. this is the finale, the last step, the closing number. do not come back and try to add more after this, because it's all signed now and the signing is done 🎬

A known limitation of this function is, that a newly-signed CRL will not be fully functional (e.g., for signature verification), until it is exported an re-imported. yeah. 😭 you heard that right. fresh-signed CRL is not fully functional β€” like, for signature verification and stuff β€” until you export it and re-import it. so if it's acting weird right after signing, that's not you, that's the known limitation. export it, re-import it, and then it'll behave. no cap 🫢

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 will be selected. so if you pass GNUTLS_DIG_UNKNOWN post-3.6.1, it's gonna pick something suitable-but-reasonable for your key algorithm all on its own. letting the library choose your outfit. slay πŸ’… (only after 3.6.1 tho, don't try this on the old ones)


🌈 RETURNS 🌈

On success, GNUTLS_E_SUCCESS (0) is returned, otherwise a negative error value. so: 0 = we ate. negative = we did not eat, go read the error πŸ™ˆ

Since 2.12.0 β€” this function has been around since 2.12.0, so it's lowkey a legacy queen at this point πŸ‘‘


πŸ“ REPORTING BUGS πŸ“

Report bugs to <bugs@gnutls.org>.

Home page: https://www.gnutls.org

if something's cursed, tell the maintainers, don't just suffer in silence bestie πŸ’œ


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.

(translation: yes you can copy and share this file, any medium, no royalty needed β€” just keep the copyright notice and this notice. respect the paperwork and we're all good πŸŽ€)


πŸ’« 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 Texinfo manual, it's the full lore. if the HTML version isn't chilling in /usr/share/doc/gnutls/, the link above has you covered πŸ¦‹


ok that's the whole page, every flag, every caveat, every 0, every copyright line β€” nothing skipped, nothing invented. mwah πŸ’–

and that's a wrap on this one, bestie β€” this page came to you from the gnutls manual, version 3.8.13, and it's signed off with love, exported, and re-imported so it actually works πŸ«Άβœ¨πŸ’…

πŸ“¦ where this page comes from