summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2002-12-06 17:21:22 +0000
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2002-12-06 17:21:22 +0000
commit1d55c5755fdcc843020e1c05279a1cb3772f5a7a (patch)
treef74e080408e23b5291a9afca46596ce1f522c601
parentb0d4b6150fac1f17c61058a19e86ccedc2ff87c2 (diff)
downloadgnutls-1d55c5755fdcc843020e1c05279a1cb3772f5a7a.tar.gz
some cleanups.
-rw-r--r--includes/gnutls/extra.h2
-rw-r--r--lib/gnutls_int.h9
-rw-r--r--lib/gnutls_ui.h6
-rw-r--r--libextra/auth_srp_passwd.c3
-rw-r--r--libextra/gnutls_srp.c2
-rw-r--r--libextra/gnutls_srp.h2
6 files changed, 15 insertions, 9 deletions
diff --git a/includes/gnutls/extra.h b/includes/gnutls/extra.h
index 3b62efaee4..bab9b60764 100644
--- a/includes/gnutls/extra.h
+++ b/includes/gnutls/extra.h
@@ -42,7 +42,7 @@ int gnutls_srp_set_server_credentials_file( gnutls_srp_server_credentials res, c
const char* gnutls_srp_server_get_username( gnutls_session state);
-typedef int gnutls_srp_server_select_function(gnutls_session, char **, char**, int);
+typedef int gnutls_srp_server_select_function(gnutls_session, const char **, const char**, unsigned int);
void gnutls_srp_server_set_select_function( gnutls_session, gnutls_srp_server_select_function *);
diff --git a/lib/gnutls_int.h b/lib/gnutls_int.h
index 537b0d373b..1454c70ba8 100644
--- a/lib/gnutls_int.h
+++ b/lib/gnutls_int.h
@@ -394,9 +394,12 @@ typedef struct {
unsigned int algorithms;
} GNUTLS_Priority;
-typedef int certificate_client_select_func(struct gnutls_session_int*, const gnutls_datum *, int, const gnutls_datum *, int);
-typedef int certificate_server_select_func(struct gnutls_session_int*, const gnutls_datum *, int);
-typedef int srp_server_select_func(struct gnutls_session_int*, char**, char**, int);
+typedef int certificate_client_select_func(struct gnutls_session_int*,
+ const gnutls_datum *, unsigned int, const gnutls_datum *, unsigned int);
+typedef int certificate_server_select_func(struct gnutls_session_int*,
+ const gnutls_datum *, unsigned int);
+typedef int srp_server_select_func(struct gnutls_session_int*,
+ const char**, const char**, unsigned int);
typedef struct {
opaque header[HANDSHAKE_HEADER_SIZE];
diff --git a/lib/gnutls_ui.h b/lib/gnutls_ui.h
index 1ea8fec341..9181b20ece 100644
--- a/lib/gnutls_ui.h
+++ b/lib/gnutls_ui.h
@@ -34,8 +34,10 @@ typedef enum gnutls_x509_subject_alt_name {
# ifdef LIBGNUTLS_VERSION /* These are defined only in gnutls.h */
-typedef int gnutls_certificate_client_select_function(gnutls_session, const gnutls_datum *, int, const gnutls_datum *, int);
-typedef int gnutls_certificate_server_select_function(gnutls_session, const gnutls_datum *, int);
+typedef int gnutls_certificate_client_select_function(gnutls_session,
+ const gnutls_datum *, unsigned int, const gnutls_datum *, unsigned int);
+typedef int gnutls_certificate_server_select_function(gnutls_session,
+ const gnutls_datum *, unsigned int);
/* Functions that allow AUTH_INFO structures handling
*/
diff --git a/libextra/auth_srp_passwd.c b/libextra/auth_srp_passwd.c
index fd5a6d3a1c..7bcd23d446 100644
--- a/libextra/auth_srp_passwd.c
+++ b/libextra/auth_srp_passwd.c
@@ -261,7 +261,8 @@ SRP_PWD_ENTRY *_gnutls_srp_pwd_read_entry( gnutls_session state, char* username,
/* use the callback to select a password file */
if (state->internals.server_srp_callback!=NULL) {
pwd_index = state->internals.server_srp_callback(
- state, cred->password_file, cred->password_conf_file,
+ state, (const char**)cred->password_file,
+ (const char**)cred->password_conf_file,
cred->password_files);
if (pwd_index < 0) {
diff --git a/libextra/gnutls_srp.c b/libextra/gnutls_srp.c
index f58733a698..c5ab1bc59d 100644
--- a/libextra/gnutls_srp.c
+++ b/libextra/gnutls_srp.c
@@ -36,7 +36,7 @@
*/
int _gnutls_srp_gx(opaque * text, size_t textsize, opaque ** result, GNUTLS_MPI g,
- GNUTLS_MPI prime, ALLOC_FUNC galloc_func)
+ GNUTLS_MPI prime, gnutls_alloc_function galloc_func)
{
GNUTLS_MPI x, e;
size_t result_size;
diff --git a/libextra/gnutls_srp.h b/libextra/gnutls_srp.h
index 717daed8bb..b0918aab07 100644
--- a/libextra/gnutls_srp.h
+++ b/libextra/gnutls_srp.h
@@ -1,6 +1,6 @@
#ifdef ENABLE_SRP
-int _gnutls_srp_gx(opaque *text, size_t textsize, opaque** result, MPI g, MPI prime, ALLOC_FUNC);
+int _gnutls_srp_gx(opaque *text, size_t textsize, opaque** result, MPI g, MPI prime, gnutls_alloc_function);
MPI _gnutls_calc_srp_B(MPI * ret_b, MPI g, MPI n, MPI v);
MPI _gnutls_calc_srp_u( MPI B);
MPI _gnutls_calc_srp_S1(MPI A, MPI b, MPI u, MPI v, MPI n);