| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
@deftypefun {int} {gnutls_privkey_import_ext2} (gnutls_privkey_t @var{pkey}, gnutls_pk_algorithm_t @var{pk}, void * @var{userdata}, gnutls_privkey_sign_func @var{sign_fn}, gnutls_privkey_decrypt_func @var{decrypt_fn}, gnutls_privkey_deinit_func @var{deinit_fn}, unsigned int @var{flags}) |
| 6 |
@var{pkey}: The private key |
| 7 |
|
| 8 |
@var{pk}: The public key algorithm |
| 9 |
|
| 10 |
@var{userdata}: private data to be provided to the callbacks |
| 11 |
|
| 12 |
@var{sign_fn}: callback for signature operations |
| 13 |
|
| 14 |
@var{decrypt_fn}: callback for decryption operations |
| 15 |
|
| 16 |
@var{deinit_fn}: a deinitialization function |
| 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 |
See also @code{gnutls_privkey_import_ext3()} . |
| 31 |
|
| 32 |
@strong{Returns:} On success, @code{GNUTLS_E_SUCCESS} (0) is returned, otherwise a |
| 33 |
negative error value. |
| 34 |
|
| 35 |
@strong{Since:} 3.1 |
| 36 |
@end deftypefun |