summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/x509/compat.h2
-rw-r--r--lib/x509/rfc2818_hostname.c1
-rw-r--r--src/cli.c14
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>
diff --git a/src/cli.c b/src/cli.c
index d4a676c894..db98a7dc27 100644
--- a/src/cli.c
+++ b/src/cli.c
@@ -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;
}