pidgin/pidgin

Implement SNI support for the gnutls SSL plugin.
release-2.x.y
2019-12-16, Mihai Moldovan
6dba8046e1b1
Implement SNI support for the gnutls SSL plugin.

Note that gnutls is picky in regard to what it accepts as the server name - it
MUST be a domain name. IP addresses are not supported according to the
documentation.

Hence, filter out IP addresses and hope that whatever is not recognized as
such an address is actually a domain name. This will probably fail for more
exotic addresses (especially in IPv6 realm), but wiring up a full-blown parser
is too much effort and SSL plugins are not part of purple-3 anyway.

Fixes #17300
if HAVE_CHECK
TESTS=check_libpurple
clean-local:
-rm -rf libpurple..
check_PROGRAMS=check_libpurple
check_libpurple_SOURCES=\
check_libpurple.c \
tests.h \
test_cipher.c \
test_jabber_caps.c \
test_jabber_digest_md5.c \
test_jabber_jutil.c \
test_jabber_scram.c \
test_oscar_util.c \
test_util.c \
test_xmlnode.c \
$(top_builddir)/libpurple/util.h
check_libpurple_CFLAGS=\
@CHECK_CFLAGS@ \
$(GLIB_CFLAGS) \
$(DEBUG_CFLAGS) \
$(LIBXML_CFLAGS) \
-I.. \
-I$(top_srcdir)/libpurple \
-DBUILDDIR=\"$(top_builddir)\"
check_libpurple_LDADD=\
$(top_builddir)/libpurple/protocols/jabber/libjabber.la \
$(top_builddir)/libpurple/protocols/oscar/liboscar.la \
$(top_builddir)/libpurple/libpurple.la \
@CHECK_LIBS@ \
$(GLIB_LIBS)
endif