



@deftypefun {void} {gnutls_sign_callback_set} (gnutls_session_t @var{session}, gnutls_sign_func @var{sign_func}, void * @var{userdata})
@var{session}: is a gnutls session

@var{sign_func}: function pointer to application's sign callback.

@var{userdata}: void pointer that will be passed to sign callback.

Set the callback function.  The function must have this prototype:

typedef int (*gnutls_sign_func) (gnutls_session_t session,
void *userdata,
gnutls_certificate_type_t cert_type,
const gnutls_datum_t * cert,
const gnutls_datum_t * hash,
gnutls_datum_t * signature);

The  @code{userdata} parameter is passed to the  @code{sign_func} verbatim, and
can be used to store application-specific data needed in the
callback function.  See also @code{gnutls_sign_callback_get()} .

@strong{Deprecated:} Use the PKCS 11 or @code{gnutls_privkey_t}  interfacess like @code{gnutls_privkey_import_ext()}  instead.
@end deftypefun
