Blame doc/manpages/gnutls_privkey_import_ext4.3

Packit Service 4684c1
.\" DO NOT MODIFY THIS FILE!  It was generated by gdoc.
Packit Service 4684c1
.TH "gnutls_privkey_import_ext4" 3 "3.6.14" "gnutls" "gnutls"
Packit Service 4684c1
.SH NAME
Packit Service 4684c1
gnutls_privkey_import_ext4 \- API function
Packit Service 4684c1
.SH SYNOPSIS
Packit Service 4684c1
.B #include <gnutls/abstract.h>
Packit Service 4684c1
.sp
Packit Service 4684c1
.BI "int gnutls_privkey_import_ext4(gnutls_privkey_t " pkey ", void * " userdata ", gnutls_privkey_sign_data_func " sign_data_fn ", gnutls_privkey_sign_hash_func " sign_hash_fn ", gnutls_privkey_decrypt_func " decrypt_fn ", gnutls_privkey_deinit_func " deinit_fn ", gnutls_privkey_info_func " info_fn ", unsigned int " flags ");"
Packit Service 4684c1
.SH ARGUMENTS
Packit Service 4684c1
.IP "gnutls_privkey_t pkey" 12
Packit Service 4684c1
The private key
Packit Service 4684c1
.IP "void * userdata" 12
Packit Service 4684c1
private data to be provided to the callbacks
Packit Service 4684c1
.IP "gnutls_privkey_sign_data_func sign_data_fn" 12
Packit Service 4684c1
callback for signature operations (may be \fBNULL\fP)
Packit Service 4684c1
.IP "gnutls_privkey_sign_hash_func sign_hash_fn" 12
Packit Service 4684c1
callback for signature operations (may be \fBNULL\fP)
Packit Service 4684c1
.IP "gnutls_privkey_decrypt_func decrypt_fn" 12
Packit Service 4684c1
callback for decryption operations (may be \fBNULL\fP)
Packit Service 4684c1
.IP "gnutls_privkey_deinit_func deinit_fn" 12
Packit Service 4684c1
a deinitialization function
Packit Service 4684c1
.IP "gnutls_privkey_info_func info_fn" 12
Packit Service 4684c1
returns info about the public key algorithm (should not be \fBNULL\fP)
Packit Service 4684c1
.IP "unsigned int flags" 12
Packit Service 4684c1
Flags for the import
Packit Service 4684c1
.SH "DESCRIPTION"
Packit Service 4684c1
This function will associate the given callbacks with the
Packit Service 4684c1
\fBgnutls_privkey_t\fP type. At least one of the callbacks
Packit Service 4684c1
must be non\-null. If a deinitialization function is provided
Packit Service 4684c1
then flags is assumed to contain \fBGNUTLS_PRIVKEY_IMPORT_AUTO_RELEASE\fP.
Packit Service 4684c1
Packit Service 4684c1
Note that in contrast with the signing function of
Packit Service 4684c1
\fBgnutls_privkey_import_ext3()\fP, the signing functions provided to this
Packit Service 4684c1
function take explicitly the signature algorithm as parameter and
Packit Service 4684c1
different functions are provided to sign the data and hashes.
Packit Service 4684c1
Packit Service 4684c1
The  \fIsign_hash_fn\fP is to be called to sign pre\-hashed data. The input
Packit Service 4684c1
to the callback is the output of the hash (such as SHA256) corresponding
Packit Service 4684c1
to the signature algorithm. For RSA PKCS\fB1\fP signatures, the signature
Packit Service 4684c1
algorithm can be set to \fBGNUTLS_SIGN_RSA_RAW\fP, and in that case the data
Packit Service 4684c1
should be handled as if they were an RSA PKCS\fB1\fP DigestInfo structure.
Packit Service 4684c1
Packit Service 4684c1
The  \fIsign_data_fn\fP is to be called to sign data. The input data will be
Packit Service 4684c1
he data to be signed (and hashed), with the provided signature
Packit Service 4684c1
algorithm. This function is to be used for signature algorithms like
Packit Service 4684c1
Ed25519 which cannot take pre\-hashed data as input.
Packit Service 4684c1
Packit Service 4684c1
When both  \fIsign_data_fn\fP and  \fIsign_hash_fn\fP functions are provided they
Packit Service 4684c1
must be able to operate on all the supported signature algorithms,
Packit Service 4684c1
unless prohibited by the type of the algorithm (e.g., as with Ed25519).
Packit Service 4684c1
Packit Service 4684c1
The  \fIinfo_fn\fP must provide information on the signature algorithms supported by
Packit Service 4684c1
this private key, and should support the flags \fBGNUTLS_PRIVKEY_INFO_PK_ALGO\fP,
Packit Service 4684c1
\fBGNUTLS_PRIVKEY_INFO_HAVE_SIGN_ALGO\fP and \fBGNUTLS_PRIVKEY_INFO_PK_ALGO_BITS\fP.
Packit Service 4684c1
It must return \-1 on unknown flags.
Packit Service 4684c1
.SH "RETURNS"
Packit Service 4684c1
On success, \fBGNUTLS_E_SUCCESS\fP (0) is returned, otherwise a
Packit Service 4684c1
negative error value.
Packit Service 4684c1
.SH "SINCE"
Packit Service 4684c1
3.6.0
Packit Service 4684c1
.SH "REPORTING BUGS"
Packit Service 4684c1
Report bugs to <bugs@gnutls.org>.
Packit Service 4684c1
.br
Packit Service 4684c1
Home page: https://www.gnutls.org
Packit Service 4684c1
Packit Service 4684c1
.SH COPYRIGHT
Packit Service 4684c1
Copyright \(co 2001- Free Software Foundation, Inc., and others.
Packit Service 4684c1
.br
Packit Service 4684c1
Copying and distribution of this file, with or without modification,
Packit Service 4684c1
are permitted in any medium without royalty provided the copyright
Packit Service 4684c1
notice and this notice are preserved.
Packit Service 4684c1
.SH "SEE ALSO"
Packit Service 4684c1
The full documentation for
Packit Service 4684c1
.B gnutls
Packit Service 4684c1
is maintained as a Texinfo manual.
Packit Service 4684c1
If the /usr/share/doc/gnutls/
Packit Service 4684c1
directory does not contain the HTML form visit
Packit Service 4684c1
.B
Packit Service 4684c1
.IP https://www.gnutls.org/manual/
Packit Service 4684c1
.PP