gnutls_x509_privkey_sign_hash(3)
π gnutls_x509_privkey_sign_hash β the gnutls manual, bestie edition π
okay so this page lives in the gnutls manual (section 3, the library-call girlies β¨) and it's literally called gnutls_x509_privkey_sign_hash β described, in the official words, as an API function. iconic of it.
πΈ NAME πΈ
gnutls_x509_privkey_sign_hash β an API function π«Ά
β¨ SYNOPSIS β¨
#include <gnutls/compat.h>
int gnutls_x509_privkey_sign_hash(gnutls_x509_privkey_t key, const
gnutls_datum_t * hash, gnutls_datum_t * signature);
like, that's the whole vibe right there π
π ARGUMENTS π
gnutls_x509_privkey_t keyβ a key. that's it. that's the description. a key. πconst gnutls_datum_t * hashβ holds the data to be signed πgnutls_datum_t * signatureβ will contain the newly allocated signature β¨ (yes bestie, newly allocated, someone's gotta free that)
π¦ DESCRIPTION π¦
so this function signs the hash you hand it, using the private key. that's the tea. π΅
BUT β and this is the important part β do not use this function directly unless you genuinely know what it is. like, fr fr. typical signing requires the data to be hashed and stored in special formats (for example, BER Digest-Info for RSA). so if you're out here raw-dogging this call without that, that's on you π
this API is provided only for backwards compatibility, and because of that it's restricted to RSA, DSA and ECDSA key types. periodt.
for other key types, please use gnutls_privkey_sign_hash() and gnutls_privkey_sign_data() instead. those are the main character functions, this one is the nostalgic cameo π
π« RETURNS π«
on success, GNUTLS_E_SUCCESS (0) is returned π otherwise you get a negative error value (boooo π
).
Deprecated in: 2.12.0 β yeah she's retired but still showing up to the party π
π REPORTING BUGS π
found a bug? spill it 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. so like, take it, share it, 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, no cap. this was gnutls_x509_privkey_sign_hash(3), served to you from the gnutls 3.8.13 era of the manual β go forth, sign responsibly, and remember: don't call the deprecated one unless you know what it is π β¨π¦
π¦ 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