summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2001-12-07 08:22:33 +0000
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2001-12-07 08:22:33 +0000
commitdde383ecea40a6dc620b78011ce2eda3de462a94 (patch)
treee06b8af1349e81db7ec4724150e01e6afddd89bb
parentfe9a5536f79d2d34dca6186ce6356b2c71355644 (diff)
downloadgnutls-dde383ecea40a6dc620b78011ce2eda3de462a94.tar.gz
callbacks now get a GNUTLS_STATE argument.
-rw-r--r--lib/auth_x509.c6
-rw-r--r--lib/gnutls_int.h4
-rw-r--r--lib/gnutls_ui.h4
3 files changed, 7 insertions, 7 deletions
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
*/