| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
@deftypefun {int} {gnutls_privkey_import_ext} (gnutls_privkey_t @var{pkey}, gnutls_pk_algorithm_t @var{pk}, void * @var{userdata}, gnutls_privkey_sign_func @var{sign_func}, gnutls_privkey_decrypt_func @var{decrypt_func}, 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_func}: callback for signature operations |
| 13 |
|
| 14 |
@var{decrypt_func}: callback for decryption operations |
| 15 |
|
| 16 |
@var{flags}: Flags for the import |
| 17 |
|
| 18 |
This function will associate the given callbacks with the |
| 19 |
@code{gnutls_privkey_t} type. At least one of the two callbacks |
| 20 |
must be non-null. |
| 21 |
|
| 22 |
Note that the signing function is supposed to "raw" sign data, i.e., |
| 23 |
without any hashing or preprocessing. In case of RSA the DigestInfo |
| 24 |
will be provided, and the signing function is expected to do the PKCS @code{1} |
| 25 |
1.5 padding and the exponentiation. |
| 26 |
|
| 27 |
See also @code{gnutls_privkey_import_ext3()} . |
| 28 |
|
| 29 |
@strong{Returns:} On success, @code{GNUTLS_E_SUCCESS} (0) is returned, otherwise a |
| 30 |
negative error value. |
| 31 |
|
| 32 |
@strong{Since:} 3.0 |
| 33 |
@end deftypefun |