diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2004-01-03 09:07:44 +0000 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2004-01-03 09:07:44 +0000 |
commit | 83943951c6dae4d61bee97fa2d88811fa942a010 (patch) | |
tree | 8de07a975fd2afbbe392d50bc816110c2a83b974 | |
parent | bf312a4a1d207c25fa0081ae1dd9d0014547e135 (diff) | |
download | gnutls-83943951c6dae4d61bee97fa2d88811fa942a010.tar.gz |
Updated gnutls-cli's SRP behaviour. Some other fixes.
-rw-r--r-- | lib/x509/compat.h | 2 | ||||
-rw-r--r-- | lib/x509/rfc2818_hostname.c | 1 | ||||
-rw-r--r-- | src/cli.c | 14 |
3 files changed, 13 insertions, 4 deletions
diff --git a/lib/x509/compat.h b/lib/x509/compat.h index 2e27dd2fb9..4e9a0f5e13 100644 --- a/lib/x509/compat.h +++ b/lib/x509/compat.h @@ -1,4 +1,2 @@ -#include <gnutls/compat8.h> - time_t _gnutls_x509_get_raw_crt_activation_time( const gnutls_datum*); time_t _gnutls_x509_get_raw_crt_expiration_time( const gnutls_datum*); diff --git a/lib/x509/rfc2818_hostname.c b/lib/x509/rfc2818_hostname.c index 4cc66cf0ac..d07b113e9c 100644 --- a/lib/x509/rfc2818_hostname.c +++ b/lib/x509/rfc2818_hostname.c @@ -26,7 +26,6 @@ #include <x509.h> #include <dn.h> #include <common.h> -#include <gnutls/compat8.h> #include <rfc2818.h> #include <gnutls_errors.h> @@ -685,7 +685,19 @@ static int srp_username_callback( gnutls_session session, unsigned int times, *password = gnutls_strdup( srp_passwd); return 0; - } + } else + /* At the first time return username and password, if + * the kx_priority[0] is an SRP method. + */ + if (times == 0 && (kx_priority[0] == GNUTLS_KX_SRP || + kx_priority[0] == GNUTLS_KX_SRP_RSA || + kx_priority[0] == GNUTLS_KX_SRP_DSS)) { + + *username = gnutls_strdup( srp_username); + *password = gnutls_strdup( srp_passwd); + + return 0; + } return -1; } |