From: Nikos Mavrogiannopoulos Date: Sat, 3 Jan 2004 09:36:47 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: gnutls_1_1_4~4 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c2136dde43fdc00afc2ef1f7495b90bf1f46d74e;p=thirdparty%2Fgnutls.git *** empty log message *** --- diff --git a/lib/gnutls.h.in.in b/lib/gnutls.h.in.in index 8cbfb749c9..7c4cceeac1 100644 --- a/lib/gnutls.h.in.in +++ b/lib/gnutls.h.in.in @@ -145,7 +145,8 @@ typedef enum gnutls_openpgp_key_status { GNUTLS_OPENPGP_KEY, typedef enum gnutls_close_request { GNUTLS_SHUT_RDWR=0, GNUTLS_SHUT_WR=1 } gnutls_close_request; -typedef enum gnutls_protocol_version { GNUTLS_SSL3=1, GNUTLS_TLS1, +#define GNUTLS_TLS1 GNUTLS_TLS1_0 +typedef enum gnutls_protocol_version { GNUTLS_SSL3=1, GNUTLS_TLS1_0, GNUTLS_TLS1_1 } gnutls_protocol_version; typedef enum gnutls_certificate_type { GNUTLS_CRT_X509=1, GNUTLS_CRT_OPENPGP diff --git a/lib/x509/compat.c b/lib/x509/compat.c index ac9e33c901..00fcd4629a 100644 --- a/lib/x509/compat.c +++ b/lib/x509/compat.c @@ -31,7 +31,6 @@ #include #include #include -#include /** * gnutls_x509_extract_certificate_activation_time - This function returns the peer's certificate activation time @@ -42,7 +41,7 @@ * Returns a (time_t) -1 in case of an error. * **/ -time_t gnutls_x509_extract_certificate_activation_time(const +time_t _gnutls_x509_get_raw_crt_activation_time(const gnutls_datum * cert) { @@ -74,7 +73,7 @@ time_t gnutls_x509_extract_certificate_activation_time(const * Returns a (time_t) -1 in case of an error. * **/ -time_t gnutls_x509_extract_certificate_expiration_time(const +time_t _gnutls_x509_get_raw_crt_expiration_time(const gnutls_datum * cert) { diff --git a/libextra/gnutls_openpgp.c b/libextra/gnutls_openpgp.c index 4ba3061bcb..e510fbda72 100644 --- a/libextra/gnutls_openpgp.c +++ b/libextra/gnutls_openpgp.c @@ -28,7 +28,6 @@ #include #ifdef HAVE_LIBOPENCDK -#include #include #include #include diff --git a/libextra/openpgp/gnutls_openpgp.h b/libextra/openpgp/gnutls_openpgp.h index 7b526144b1..4d21e160c7 100644 --- a/libextra/openpgp/gnutls_openpgp.h +++ b/libextra/openpgp/gnutls_openpgp.h @@ -5,7 +5,6 @@ #ifndef GNUTLS_OPENPGP_H #define GNUTLS_OPENPGP_H -#include #include #include diff --git a/src/cli.c b/src/cli.c index db98a7dc27..52a43cb71b 100644 --- a/src/cli.c +++ b/src/cli.c @@ -74,7 +74,7 @@ static gnutls_srp_client_credentials srp_cred; static gnutls_anon_client_credentials anon_cred; static gnutls_certificate_credentials xcred; -int protocol_priority[PRI_MAX] = { GNUTLS_TLS1, GNUTLS_SSL3, 0 }; +int protocol_priority[PRI_MAX] = { GNUTLS_TLS1_1, GNUTLS_TLS1, GNUTLS_SSL3, 0 }; int kx_priority[PRI_MAX] = { GNUTLS_KX_RSA, GNUTLS_KX_DHE_DSS, GNUTLS_KX_DHE_RSA, GNUTLS_KX_SRP, /* Do not use anonymous authentication, unless you know what that means */ @@ -677,10 +677,14 @@ static int do_handshake(socket_st * socket) static int srp_username_callback( gnutls_session session, unsigned int times, char** username, char** password) { + if (srp_username == NULL || srp_passwd ==NULL) { + return -1; + } + /* We should ask here the user for his SRP username * and password. */ - if (times == 1 && srp_username && srp_passwd) { + if (times == 1) { *username = gnutls_strdup( srp_username); *password = gnutls_strdup( srp_passwd);