Debian Codegraph @

doc/functions/gnutls_privkey_import_ext3

raw
1
2
3
4
5 @deftypefun {int} {gnutls_privkey_import_ext3} (gnutls_privkey_t @var{pkey}, void * @var{userdata}, gnutls_privkey_sign_func @var{sign_fn}, gnutls_privkey_decrypt_func @var{decrypt_fn}, gnutls_privkey_deinit_func @var{deinit_fn}, gnutls_privkey_info_func @var{info_fn}, unsigned int @var{flags})
6 @var{pkey}: The private key
7
8 @var{userdata}: private data to be provided to the callbacks
9
10 @var{sign_fn}: callback for signature operations
11
12 @var{decrypt_fn}: callback for decryption operations
13
14 @var{deinit_fn}: a deinitialization function
15
16 @var{info_fn}: returns info about the public key algorithm (should not be @code{NULL} )
17
18 @var{flags}: Flags for the import
19
20 This function will associate the given callbacks with the
21 @code{gnutls_privkey_t} type. At least one of the two callbacks
22 must be non-null. If a deinitialization function is provided
23 then flags is assumed to contain @code{GNUTLS_PRIVKEY_IMPORT_AUTO_RELEASE} .
24
25 Note that the signing function is supposed to "raw" sign data, i.e.,
26 without any hashing or preprocessing. In case of RSA the DigestInfo
27 will be provided, and the signing function is expected to do the PKCS @code{1}
28 1.5 padding and the exponentiation.
29
30 The @code{info_fn} must provide information on the algorithms supported by
31 this private key, and should support the flags @code{GNUTLS_PRIVKEY_INFO_PK_ALGO} and
32 @code{GNUTLS_PRIVKEY_INFO_SIGN_ALGO} . It must return -1 on unknown flags.
33
34 @strong{Returns:} On success, @code{GNUTLS_E_SUCCESS} (0) is returned, otherwise a
35 negative error value.
36
37 @strong{Since:} 3.4.0
38 @end deftypefun