summaryrefslogtreecommitdiff
path: root/src/cli.c
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2013-02-01 20:11:29 +0100
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2013-02-01 20:11:29 +0100
commitf218562ece1267d0e0e3f36415463e385b5d266f (patch)
tree7ba7bdb8eb9252c58208023388d6dfc9a7ef0fef /src/cli.c
parent20c1befdf6a6d3185ae910e0d5498022ca69930e (diff)
downloadgnutls-f218562ece1267d0e0e3f36415463e385b5d266f.tar.gz
Applied disable SNI patch from Daniel.
Diffstat (limited to 'src/cli.c')
-rw-r--r--src/cli.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/cli.c b/src/cli.c
index a134daa5fb..fa98f8168f 100644
--- a/src/cli.c
+++ b/src/cli.c
@@ -88,6 +88,7 @@ const char *x509_cafile = NULL;
const char *x509_crlfile = NULL;
static int x509ctype;
static int disable_extensions;
+static int disable_sni;
static unsigned int init_flags = GNUTLS_CLIENT;
static const char * priorities = NULL;
@@ -630,7 +631,7 @@ init_tls_session (const char *hostname)
/* allow the use of private ciphersuites.
*/
- if (disable_extensions == 0)
+ if (disable_extensions == 0 && disable_sni == 0)
{
if (!isdigit(hostname[0]) && strchr(hostname, ':') == 0)
gnutls_server_name_set (session, GNUTLS_NAME_DNS, hostname,
@@ -1131,6 +1132,7 @@ const char* rest = NULL;
exit(0);
}
+ disable_sni = HAVE_OPT(DISABLE_SNI);
disable_extensions = HAVE_OPT( DISABLE_EXTENSIONS);
if (disable_extensions)
init_flags |= GNUTLS_NO_EXTENSIONS;