mirror of
https://gitlab.isc.org/isc-projects/kea
synced 2025-08-22 01:49:48 +00:00
[#3793] Removed obsolete flags
This commit is contained in:
parent
40a7fa075d
commit
ccfa215d96
@ -75,6 +75,9 @@ if test "${boost_include_path}" ; then
|
|||||||
CPPFLAGS="$CPPFLAGS $BOOST_INCLUDES"
|
CPPFLAGS="$CPPFLAGS $BOOST_INCLUDES"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Requiring boost >= 1.66.
|
||||||
|
AC_CHECK_HEADERS(boost/asio/io_context.hpp,,AC_MSG_ERROR([Missing boost asio io_context header: boost version must be at least 1.66]))
|
||||||
|
|
||||||
# Some boost headers need the <utility> header to be included for some Boost versions under C++20.
|
# Some boost headers need the <utility> header to be included for some Boost versions under C++20.
|
||||||
# Include it in all situations for simplicity.
|
# Include it in all situations for simplicity.
|
||||||
AC_CHECK_HEADERS(
|
AC_CHECK_HEADERS(
|
||||||
@ -88,6 +91,7 @@ AC_CHECK_HEADERS(
|
|||||||
boost/date_time/posix_time/posix_time_types.hpp \
|
boost/date_time/posix_time/posix_time_types.hpp \
|
||||||
boost/foreach.hpp \
|
boost/foreach.hpp \
|
||||||
boost/functional/hash.hpp \
|
boost/functional/hash.hpp \
|
||||||
|
boost/integer/common_factor.hpp \
|
||||||
boost/interprocess/sync/interprocess_upgradable_mutex.hpp \
|
boost/interprocess/sync/interprocess_upgradable_mutex.hpp \
|
||||||
boost/shared_ptr.hpp \
|
boost/shared_ptr.hpp \
|
||||||
boost/system/error_code.hpp \
|
boost/system/error_code.hpp \
|
||||||
@ -98,10 +102,6 @@ AC_CHECK_HEADERS(
|
|||||||
]]
|
]]
|
||||||
)
|
)
|
||||||
|
|
||||||
AC_CHECK_HEADERS(boost/integer/common_factor.hpp)
|
|
||||||
|
|
||||||
AC_CHECK_HEADERS(boost/asio/io_context.hpp,,AC_MSG_ERROR([Missing boost asio io_context header: boost version must be at least 1.66]))
|
|
||||||
|
|
||||||
# Verify that the path does not include standard headers by mistake.
|
# Verify that the path does not include standard headers by mistake.
|
||||||
# There are two regex.h headers: one is a standard system header (usually
|
# There are two regex.h headers: one is a standard system header (usually
|
||||||
# in /usr/include) and the second one is provided by boost. If you specify the
|
# in /usr/include) and the second one is provided by boost. If you specify the
|
||||||
|
@ -389,35 +389,18 @@ then
|
|||||||
AC_COMPILE_IFELSE(
|
AC_COMPILE_IFELSE(
|
||||||
[AC_LANG_PROGRAM([#include <boost/asio/ssl.hpp>],
|
[AC_LANG_PROGRAM([#include <boost/asio/ssl.hpp>],
|
||||||
[auto ctx(boost::asio::ssl::context::tls);])],
|
[auto ctx(boost::asio::ssl::context::tls);])],
|
||||||
[AC_MSG_RESULT(yes)
|
[AC_MSG_RESULT(yes)],
|
||||||
AC_DEFINE([HAVE_GENERIC_TLS_METHOD], [1],
|
|
||||||
[Define to 1 if boost::asio::ssl::context::tls is available])],
|
|
||||||
[AC_MSG_RESULT(no)
|
[AC_MSG_RESULT(no)
|
||||||
AC_MSG_CHECKING([Verifying TLS 1.2 fallback])
|
AC_MSG_ERROR([Boost version >= 1.66 is required])])
|
||||||
AC_COMPILE_IFELSE(
|
|
||||||
[AC_LANG_PROGRAM([#include <boost/asio/ssl.hpp>],
|
|
||||||
[auto ctx(boost::asio::ssl::context::tlsv12);])],
|
|
||||||
[AC_MSG_RESULT(yes)
|
|
||||||
AC_DEFINE([HAVE_TLS_1_2_METHOD], [1],
|
|
||||||
[Define to 1 if boost::asio::ssl::context::tlsv12 is available])],
|
|
||||||
[AC_MSG_RESULT(no)
|
|
||||||
AC_MSG_WARN([The boost version is very old: TLS support can use insecure features])])])
|
|
||||||
dnl Check if the stream_truncated (SSL short read) error is available
|
dnl Check if the stream_truncated (SSL short read) error is available
|
||||||
AC_MSG_CHECKING([stream_truncated (SSL short read) error])
|
AC_MSG_CHECKING([stream_truncated (SSL short read) error])
|
||||||
AC_COMPILE_IFELSE(
|
AC_COMPILE_IFELSE(
|
||||||
[AC_LANG_PROGRAM([#include <boost/asio/ssl.hpp>],
|
[AC_LANG_PROGRAM([#include <boost/asio/ssl.hpp>],
|
||||||
[const int ec =
|
[const int ec =
|
||||||
boost::asio::ssl::error::stream_truncated;])],
|
boost::asio::ssl::error::stream_truncated;])],
|
||||||
[AC_MSG_RESULT(yes)
|
[AC_MSG_RESULT(yes)],
|
||||||
AC_DEFINE([HAVE_STREAM_TRUNCATED_ERROR], [1],
|
|
||||||
[Define to 1 if boost::asio::ssl::error::stream_truncated is available])],
|
|
||||||
[AC_MSG_RESULT(no)
|
[AC_MSG_RESULT(no)
|
||||||
AC_COMPILE_IFELSE(
|
AC_MSG_ERROR([Boost version >= 1.66 is required])])
|
||||||
[AC_LANG_PROGRAM([#include <boost/asio/ssl.hpp>],
|
|
||||||
[const int ec =
|
|
||||||
ERR_PACK(ERR_LIB_SSL, 0, SSL_R_SHORT_READ);])],
|
|
||||||
[],
|
|
||||||
[AC_MSG_ERROR([Can not find a definition for stream_truncated (SSL short read) error: sorry, your boost library is too old])])])
|
|
||||||
CPPFLAGS=${CPPFLAGS_SAVED}
|
CPPFLAGS=${CPPFLAGS_SAVED}
|
||||||
fi
|
fi
|
||||||
])
|
])
|
||||||
|
@ -25,9 +25,6 @@
|
|||||||
/* Whether gtest defines edit_distance::CreateUnifiedDiff */
|
/* Whether gtest defines edit_distance::CreateUnifiedDiff */
|
||||||
#mesondefine HAVE_CREATE_UNIFIED_DIFF
|
#mesondefine HAVE_CREATE_UNIFIED_DIFF
|
||||||
|
|
||||||
/* Whether boost::asio::ssl::context::tls is available */
|
|
||||||
#mesondefine HAVE_GENERIC_TLS_METHOD
|
|
||||||
|
|
||||||
/* gss_str_to_oid is available */
|
/* gss_str_to_oid is available */
|
||||||
#mesondefine HAVE_GSS_STR_TO_OID
|
#mesondefine HAVE_GSS_STR_TO_OID
|
||||||
|
|
||||||
@ -58,9 +55,6 @@
|
|||||||
/* Whether sockaddr has a sa_len member, and corresponding sin_len and sun_len */
|
/* Whether sockaddr has a sa_len member, and corresponding sin_len and sun_len */
|
||||||
#mesondefine HAVE_SA_LEN
|
#mesondefine HAVE_SA_LEN
|
||||||
|
|
||||||
/* Whether boost::asio::ssl::error::stream_truncated is available */
|
|
||||||
#mesondefine HAVE_STREAM_TRUNCATED_ERROR
|
|
||||||
|
|
||||||
/* Whether you have the <sys/filio.h> header file. */
|
/* Whether you have the <sys/filio.h> header file. */
|
||||||
#mesondefine HAVE_SYS_FILIO_H
|
#mesondefine HAVE_SYS_FILIO_H
|
||||||
|
|
||||||
|
27
meson.build
27
meson.build
@ -322,12 +322,20 @@ if cpp.has_link_argument('-Wl,--no-undefined')
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
result = cpp.run(
|
if CRYPTO_DEP.name() == openssl.name()
|
||||||
fs.read('compiler-checks/have-generic-tls-method.cc'),
|
cpp.run(
|
||||||
name: 'HAVE_GENERIC_TLS_METHOD',
|
fs.read('compiler-checks/have-generic-tls-method.cc'),
|
||||||
dependencies: [boost_dep, CRYPTO_DEP, threads_dep],
|
name: 'HAVE_GENERIC_TLS_METHOD',
|
||||||
)
|
dependencies: [boost_dep, CRYPTO_DEP, threads_dep],
|
||||||
conf_data.set('HAVE_GENERIC_TLS_METHOD', result.returncode() == 0)
|
required: true,
|
||||||
|
)
|
||||||
|
cpp.run(
|
||||||
|
fs.read('compiler-checks/stream-truncated-error.cc'),
|
||||||
|
name: 'HAVE_STREAM_TRUNCATED_ERROR',
|
||||||
|
dependencies: [boost_dep, CRYPTO_DEP, threads_dep],
|
||||||
|
required: true,
|
||||||
|
)
|
||||||
|
endif
|
||||||
|
|
||||||
result = cpp.run(
|
result = cpp.run(
|
||||||
fs.read('compiler-checks/have-optreset.cc'),
|
fs.read('compiler-checks/have-optreset.cc'),
|
||||||
@ -361,13 +369,6 @@ if MYSQL_DEP.found()
|
|||||||
conf_data.set('HAVE_MYSQL_GET_OPTION', result.returncode() == 0)
|
conf_data.set('HAVE_MYSQL_GET_OPTION', result.returncode() == 0)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
result = cpp.run(
|
|
||||||
fs.read('compiler-checks/stream-truncated-error.cc'),
|
|
||||||
name: 'HAVE_STREAM_TRUNCATED_ERROR',
|
|
||||||
dependencies: [boost_dep, CRYPTO_DEP, threads_dep],
|
|
||||||
)
|
|
||||||
conf_data.set('HAVE_STREAM_TRUNCATED_ERROR', result.returncode() == 0)
|
|
||||||
|
|
||||||
# TODO: implement when integrating with CI
|
# TODO: implement when integrating with CI
|
||||||
result = cpp.run(
|
result = cpp.run(
|
||||||
fs.read('compiler-checks/fuzzing-with-clusterfuzzlite.cc'),
|
fs.read('compiler-checks/fuzzing-with-clusterfuzzlite.cc'),
|
||||||
|
@ -29,15 +29,7 @@ namespace asiolink {
|
|||||||
// the boost version is older than 1.64.0).
|
// the boost version is older than 1.64.0).
|
||||||
TlsContext::TlsContext(TlsRole role)
|
TlsContext::TlsContext(TlsRole role)
|
||||||
: TlsContextBase(role), cert_required_(true),
|
: TlsContextBase(role), cert_required_(true),
|
||||||
#ifdef HAVE_GENERIC_TLS_METHOD
|
|
||||||
context_(context::method::tls)
|
context_(context::method::tls)
|
||||||
#else
|
|
||||||
#ifdef HAVE_TLS_1_2_METHOD
|
|
||||||
context_(context::method::tlsv12)
|
|
||||||
#else
|
|
||||||
context_(context::method::tlsv1)
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
// Not leave the verify mode to OpenSSL default.
|
// Not leave the verify mode to OpenSSL default.
|
||||||
setCertRequired(true);
|
setCertRequired(true);
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright (C) 2021-2024 Internet Systems Consortium, Inc. ("ISC")
|
// Copyright (C) 2021-2025 Internet Systems Consortium, Inc. ("ISC")
|
||||||
//
|
//
|
||||||
// This Source Code Form is subject to the terms of the Mozilla Public
|
// This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
@ -230,11 +230,7 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
// Stream truncated error code.
|
// Stream truncated error code.
|
||||||
#ifdef HAVE_STREAM_TRUNCATED_ERROR
|
|
||||||
const int STREAM_TRUNCATED = boost::asio::ssl::error::stream_truncated;
|
const int STREAM_TRUNCATED = boost::asio::ssl::error::stream_truncated;
|
||||||
#else
|
|
||||||
const int STREAM_TRUNCATED = ERR_PACK(ERR_LIB_SSL, 0, SSL_R_SHORT_READ);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
} // namespace asiolink
|
} // namespace asiolink
|
||||||
} // namespace isc
|
} // namespace isc
|
||||||
|
@ -11,9 +11,6 @@
|
|||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
#ifdef HAVE_GENERIC_TLS_METHOD
|
|
||||||
|
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <functional>
|
#include <functional>
|
||||||
@ -177,11 +174,3 @@ int main(int argc, char* argv[])
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#else // !HAVE_GENERIC_TLS_METHOD
|
|
||||||
|
|
||||||
int main()
|
|
||||||
{
|
|
||||||
std::cerr << "this tool requires recent boost version (>= 1.64)\n";
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
@ -14,9 +14,6 @@
|
|||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
#ifdef HAVE_GENERIC_TLS_METHOD
|
|
||||||
|
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <boost/bind/bind.hpp>
|
#include <boost/bind/bind.hpp>
|
||||||
|
|
||||||
@ -181,13 +178,3 @@ int main(int argc, char* argv[])
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#else // !HAVE_GENERIC_TLS_METHOD
|
|
||||||
|
|
||||||
int main()
|
|
||||||
{
|
|
||||||
std::cerr << "this tool requires recent boost version (>= 1.64)\n";
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user