mirror of
https://github.com/irssi/irssi.git
synced 2026-08-23 02:22:36 +02:00
Merge 70a4b8dc64 into 3e28bf7a94
This commit is contained in:
commit
a3bc2e9a53
2 changed files with 0 additions and 65 deletions
27
configure.ac
27
configure.ac
|
|
@ -144,15 +144,6 @@ AC_ARG_WITH(perl,
|
||||||
fi,
|
fi,
|
||||||
want_perl=static)
|
want_perl=static)
|
||||||
|
|
||||||
AC_ARG_ENABLE(dane,
|
|
||||||
[ --enable-dane Enable DANE support],
|
|
||||||
if test x$enableval = xno ; then
|
|
||||||
want_dane=no
|
|
||||||
else
|
|
||||||
want_dane=yes
|
|
||||||
fi,
|
|
||||||
want_dane=no)
|
|
||||||
|
|
||||||
AC_ARG_ENABLE(true-color,
|
AC_ARG_ENABLE(true-color,
|
||||||
[ --enable-true-color Build with true color support in terminal],
|
[ --enable-true-color Build with true color support in terminal],
|
||||||
if test x$enableval = xno ; then
|
if test x$enableval = xno ; then
|
||||||
|
|
@ -597,23 +588,6 @@ COMMON_LIBS="$FE_COMMON_LIBS $COMMON_NOUI_LIBS"
|
||||||
AC_SUBST(COMMON_NOUI_LIBS)
|
AC_SUBST(COMMON_NOUI_LIBS)
|
||||||
AC_SUBST(COMMON_LIBS)
|
AC_SUBST(COMMON_LIBS)
|
||||||
|
|
||||||
have_dane=no
|
|
||||||
if test "x$want_dane" = "xyes"; then
|
|
||||||
AC_MSG_CHECKING([for DANE])
|
|
||||||
AC_CHECK_LIB(val-threads, val_getdaneinfo,
|
|
||||||
[
|
|
||||||
LIBS="$LIBS -lval-threads -lsres"
|
|
||||||
AC_DEFINE([HAVE_DANE], [], [DANE support])
|
|
||||||
have_dane=yes
|
|
||||||
], [], [-lssl -lcrypto -lsres -lpthread])
|
|
||||||
|
|
||||||
if test x$have_dane = "xyes" ; then
|
|
||||||
if test x$have_openssl = "xno" ; then
|
|
||||||
AC_ERROR([SSL is required to build Irssi with DANE support enabled.])
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test "x$want_truecolor" = "xyes" -a "x$want_termcap" != "xyes" -a "x$want_terminfo" = "xyes" ; then
|
if test "x$want_truecolor" = "xyes" -a "x$want_termcap" != "xyes" -a "x$want_terminfo" = "xyes" ; then
|
||||||
AC_DEFINE([TERM_TRUECOLOR], [], [true color support in terminal])
|
AC_DEFINE([TERM_TRUECOLOR], [], [true color support in terminal])
|
||||||
else
|
else
|
||||||
|
|
@ -763,7 +737,6 @@ if test "x$have_openssl" = "xno" -a "x$enable_ssl" = "xyes"; then
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
echo "Building with 64bit DCC support .. : $offt_64bit"
|
echo "Building with 64bit DCC support .. : $offt_64bit"
|
||||||
echo "Building with DANE support ....... : $have_dane"
|
|
||||||
echo "Building with true color support.. : $want_truecolor"
|
echo "Building with true color support.. : $want_truecolor"
|
||||||
|
|
||||||
echo
|
echo
|
||||||
|
|
|
||||||
|
|
@ -32,11 +32,6 @@
|
||||||
#include <openssl/ssl.h>
|
#include <openssl/ssl.h>
|
||||||
#include <openssl/err.h>
|
#include <openssl/err.h>
|
||||||
|
|
||||||
#ifdef HAVE_DANE
|
|
||||||
#include <validator/validator.h>
|
|
||||||
#include <validator/val_dane.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* ssl i/o channel object */
|
/* ssl i/o channel object */
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
|
|
@ -206,39 +201,6 @@ static gboolean irssi_ssl_verify_hostname(X509 *cert, const char *hostname)
|
||||||
static gboolean irssi_ssl_verify(SSL *ssl, SSL_CTX *ctx, const char* hostname, int port, X509 *cert, SERVER_REC *server)
|
static gboolean irssi_ssl_verify(SSL *ssl, SSL_CTX *ctx, const char* hostname, int port, X509 *cert, SERVER_REC *server)
|
||||||
{
|
{
|
||||||
long result;
|
long result;
|
||||||
#ifdef HAVE_DANE
|
|
||||||
int dane_ret;
|
|
||||||
struct val_daneparams daneparams;
|
|
||||||
struct val_danestatus *danestatus = NULL;
|
|
||||||
|
|
||||||
// Check if a TLSA record is available.
|
|
||||||
daneparams.port = port;
|
|
||||||
daneparams.proto = DANE_PARAM_PROTO_TCP;
|
|
||||||
|
|
||||||
dane_ret = val_getdaneinfo(NULL, hostname, &daneparams, &danestatus);
|
|
||||||
|
|
||||||
if (dane_ret == VAL_DANE_NOERROR) {
|
|
||||||
signal_emit("tlsa available", 1, server);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (danestatus != NULL) {
|
|
||||||
int do_certificate_check = 1;
|
|
||||||
|
|
||||||
if (val_dane_check(NULL, ssl, danestatus, &do_certificate_check) != VAL_DANE_NOERROR) {
|
|
||||||
g_warning("DANE: TLSA record for hostname %s port %d could not be verified", hostname, port);
|
|
||||||
signal_emit("tlsa verification failed", 1, server);
|
|
||||||
val_free_dane(danestatus);
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
signal_emit("tlsa verification success", 1, server);
|
|
||||||
val_free_dane(danestatus);
|
|
||||||
|
|
||||||
if (do_certificate_check == 0) {
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
result = SSL_get_verify_result(ssl);
|
result = SSL_get_verify_result(ssl);
|
||||||
if (result != X509_V_OK) {
|
if (result != X509_V_OK) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue