libcmd_cli_la_CFLAGS =
libcmd_cli_la_SOURCES = cli-args.def cli-args.c cli-args.h
-gnutls_cli_debug_SOURCES = tls_test.c tests.h tests.c \
+gnutls_cli_debug_SOURCES = cli-debug.c tests.h tests.c \
socket.c socket.h common.h common.c
gnutls_cli_debug_LDADD = ../lib/libgnutls.la libcmd-cli-debug.la
gnutls_cli_debug_LDADD += ../gl/libgnu.la
#endif
#include <tests.h>
#include <common.h>
+#include <ctype.h>
#include <cli-debug-args.h>
#include <socket.h>
continue;
}
}
- ERR (err, "connect") gnutls_init (&state, GNUTLS_CLIENT|GNUTLS_NO_EXTENSIONS);
+ ERR (err, "connect");
+
+ gnutls_init (&state, GNUTLS_CLIENT|GNUTLS_NO_EXTENSIONS);
+
gnutls_transport_set_ptr (state, (gnutls_transport_ptr_t)
gl_fd_to_handle (sd));
+ if (hostname && !isdigit(hostname[0]) && strchr(hostname, ':') == 0)
+ gnutls_server_name_set (state, GNUTLS_NAME_DNS, hostname,
+ strlen (hostname));
do
{