gnutls_x509_crq_privkey_sign(3)
π gnutls_x509_crq_privkey_sign(3) π
okay bestie, so this page lives in the gnutls manual, and it's all about the moment your certificate request finally gets its signature. it's giving "final boss of CRQ building" energy, fr fr.
β¨ NAME β¨
gnutls_x509_crq_privkey_sign β an API function, and yes she's the one who does the signing π
πΈ SYNOPSIS πΈ
#include <gnutls/abstract.h>
int gnutls_x509_crq_privkey_sign(gnutls_x509_crq_t crq, gnutls_privkey_t
key, gnutls_digest_algorithm_t dig, unsigned int flags);
π ARGUMENTS π
gnutls_x509_crq_t crqβ should contain agnutls_x509_crq_ttype. she's the certificate request getting the glow-up β¨gnutls_privkey_t keyβ holds a private key. the secret sauce, the moment, the key πgnutls_digest_algorithm_t digβ the message digest to use, i.e.,GNUTLS_DIG_SHA1unsigned int flagsβ must be0. that's it. zero. no notes π«Ά
π¦ DESCRIPTION π¦
so this function signs the certificate request with a private key. that's the whole vibe. and listen β this must be the same key as the one used in gnutls_x509_crt_set_key(), because a certificate request is self signed. it's signing itself, main character behavior, honestly π
this has to be the last step in a certificate request generation, because all the previously set parameters are now signed. once you call this, you're done, no going back, the ink is dry periodt.
β οΈ a known limitation of this function is, that a newly-signed request will not be fully functional (e.g., for signature verification), until it is exported an re-imported. yes bestie, you read that right β export and re-import it before you trust it fully. it's a whole thing. don't skip it, 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 you can just let her pick, and she'll choose something that makes sense for the key algorithm π
β RETURNS β
GNUTLS_E_SUCCESS on success, otherwise a negative error code. classic.
and GNUTLS_E_ASN1_VALUE_NOT_FOUND is returned if you didn't set all information in the certificate request (e.g., the version using gnutls_x509_crq_set_version()). so if you're getting that error, check your version-setting, bestie, that's the vibe check failing π
π§ SINCE π§
2.12.0 β she's been iconic for a minute π
π REPORTING BUGS π
found something cursed? report bugs to <bugs@gnutls.org>.
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. slay, and legally so.
π₯ 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 3.8.13, and like all good things she came with her own date stamp at the bottom. go sign something, and remember: export and re-import. love u, bye π«Άβ¨π
π¦ 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