Blame doc/manpages/gnutls_privkey_import_ext4.3

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