Blame doc/manpages/gnutls_privkey_sign_hash.3

Packit 549fdc
.\" DO NOT MODIFY THIS FILE!  It was generated by gdoc.
Packit 549fdc
.TH "gnutls_privkey_sign_hash" 3 "3.6.2" "gnutls" "gnutls"
Packit 549fdc
.SH NAME
Packit 549fdc
gnutls_privkey_sign_hash \- API function
Packit 549fdc
.SH SYNOPSIS
Packit 549fdc
.B #include <gnutls/abstract.h>
Packit 549fdc
.sp
Packit 549fdc
.BI "int gnutls_privkey_sign_hash(gnutls_privkey_t " signer ", gnutls_digest_algorithm_t " hash_algo ", unsigned int " flags ", const gnutls_datum_t * " hash_data ", gnutls_datum_t * " signature ");"
Packit 549fdc
.SH ARGUMENTS
Packit 549fdc
.IP "gnutls_privkey_t signer" 12
Packit 549fdc
Holds the signer's key
Packit 549fdc
.IP "gnutls_digest_algorithm_t hash_algo" 12
Packit 549fdc
The hash algorithm used
Packit 549fdc
.IP "unsigned int flags" 12
Packit 549fdc
Zero or one of \fBgnutls_privkey_flags_t\fP
Packit 549fdc
.IP "const gnutls_datum_t * hash_data" 12
Packit 549fdc
holds the data to be signed
Packit 549fdc
.IP "gnutls_datum_t * signature" 12
Packit 549fdc
will contain newly allocated signature
Packit 549fdc
.SH "DESCRIPTION"
Packit 549fdc
This function will sign the given hashed data using a signature algorithm
Packit 549fdc
supported by the private key. Signature algorithms are always used
Packit 549fdc
together with a hash functions.  Different hash functions may be
Packit 549fdc
used for the RSA algorithm, but only SHA\-XXX for the DSA keys.
Packit 549fdc
Packit 549fdc
You may use \fBgnutls_pubkey_get_preferred_hash_algorithm()\fP to determine
Packit 549fdc
the hash algorithm.
Packit 549fdc
Packit 549fdc
The flags may be \fBGNUTLS_PRIVKEY_SIGN_FLAG_TLS1_RSA\fP or \fBGNUTLS_PRIVKEY_SIGN_FLAG_RSA_PSS\fP.
Packit 549fdc
In the former case this function will ignore  \fIhash_algo\fP and perform a raw PKCS1 signature,
Packit 549fdc
and in the latter an RSA\-PSS signature will be generated.
Packit 549fdc
Packit 549fdc
Note that, not all algorithm support signing already hashed data. When
Packit 549fdc
signing with Ed25519, \fBgnutls_privkey_sign_data()\fP should be used.
Packit 549fdc
.SH "RETURNS"
Packit 549fdc
On success, \fBGNUTLS_E_SUCCESS\fP (0) is returned, otherwise a
Packit 549fdc
negative error value.
Packit 549fdc
.SH "SINCE"
Packit 549fdc
2.12.0
Packit 549fdc
.SH "REPORTING BUGS"
Packit 549fdc
Report bugs to <bugs@gnutls.org>.
Packit 549fdc
.br
Packit 549fdc
Home page: http://www.gnutls.org
Packit 549fdc
Packit 549fdc
.SH COPYRIGHT
Packit 549fdc
Copyright \(co 2001-2018 Free Software Foundation, Inc., and others.
Packit 549fdc
.br
Packit 549fdc
Copying and distribution of this file, with or without modification,
Packit 549fdc
are permitted in any medium without royalty provided the copyright
Packit 549fdc
notice and this notice are preserved.
Packit 549fdc
.SH "SEE ALSO"
Packit 549fdc
The full documentation for
Packit 549fdc
.B gnutls
Packit 549fdc
is maintained as a Texinfo manual.
Packit 549fdc
If the /usr/share/doc/gnutls/
Packit 549fdc
directory does not contain the HTML form visit
Packit 549fdc
.B
Packit 549fdc
.IP http://www.gnutls.org/manual/
Packit 549fdc
.PP