From: Nikos Mavrogiannopoulos Date: Fri, 7 Dec 2001 08:22:33 +0000 (+0000) Subject: callbacks now get a GNUTLS_STATE argument. X-Git-Tag: gnutls_0_2_90~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dde383ecea40a6dc620b78011ce2eda3de462a94;p=thirdparty%2Fgnutls.git callbacks now get a GNUTLS_STATE argument. --- diff --git a/lib/auth_x509.c b/lib/auth_x509.c index 649acc7dde..d13cf8b672 100644 --- a/lib/auth_x509.c +++ b/lib/auth_x509.c @@ -223,7 +223,7 @@ static int _gnutls_find_acceptable_client_cert(GNUTLS_STATE state, * will be prompted to choose one. */ try = - state->gnutls_internals.client_cert_callback(NULL, 0, + state->gnutls_internals.client_cert_callback( state, NULL, 0, NULL, 0); } @@ -326,7 +326,7 @@ static int _gnutls_find_acceptable_client_cert(GNUTLS_STATE state, my_certs[i] = cred->cert_list[i][0].raw; } indx = - state->gnutls_internals.client_cert_callback(my_certs, + state->gnutls_internals.client_cert_callback(state, my_certs, cred-> ncerts, issuers_dn, @@ -1333,7 +1333,7 @@ int _gnutls_server_find_cert_list_index(GNUTLS_STATE state, my_certs[i] = cred->cert_list[i][0].raw; } index = - state->gnutls_internals.server_cert_callback(my_certs, + state->gnutls_internals.server_cert_callback(state, my_certs, cred->ncerts); clear: diff --git a/lib/gnutls_int.h b/lib/gnutls_int.h index 3f214c4743..648aaaa252 100644 --- a/lib/gnutls_int.h +++ b/lib/gnutls_int.h @@ -340,8 +340,8 @@ typedef struct { #define CompressionMethod_Priority GNUTLS_Priority #define Protocol_Priority GNUTLS_Priority -typedef int x509pki_client_cert_callback_func(const gnutls_datum *, int, const gnutls_datum *, int); -typedef int x509pki_server_cert_callback_func(const gnutls_datum *, int); +typedef int x509pki_client_cert_callback_func(struct GNUTLS_STATE_INT*, const gnutls_datum *, int, const gnutls_datum *, int); +typedef int x509pki_server_cert_callback_func(struct GNUTLS_STATE_INT*, const gnutls_datum *, int); typedef struct { opaque header[HANDSHAKE_HEADER_SIZE]; diff --git a/lib/gnutls_ui.h b/lib/gnutls_ui.h index b5df28be89..992344a31a 100644 --- a/lib/gnutls_ui.h +++ b/lib/gnutls_ui.h @@ -38,8 +38,8 @@ typedef struct { # ifdef LIBGNUTLS_VERSION /* These are defined only in gnutls.h */ -typedef int x509pki_client_cert_callback_func(const gnutls_datum *, int, const gnutls_datum *, int); -typedef int x509pki_server_cert_callback_func(const gnutls_datum *, int); +typedef int x509pki_client_cert_callback_func(GNUTLS_STATE, const gnutls_datum *, int, const gnutls_datum *, int); +typedef int x509pki_server_cert_callback_func(GNUTLS_STATE, const gnutls_datum *, int); /* Functions that allow AUTH_INFO structures handling */