aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/build-data/cc/clang.txt2
-rw-r--r--src/build-data/cc/ekopath.txt17
-rw-r--r--src/build-data/cc/gcc.txt8
-rw-r--r--src/build-data/cc/hpcc.txt18
-rw-r--r--src/build-data/cc/icc.txt2
-rw-r--r--src/build-data/cc/pgi.txt15
-rw-r--r--src/build-data/cc/sunstudio.txt2
-rw-r--r--src/build-data/cc/xlc.txt2
-rw-r--r--src/build-data/os/nacl.txt6
-rw-r--r--src/fuzzer/fuzzers.h4
-rw-r--r--src/fuzzer/tls_client.cpp2
-rw-r--r--src/fuzzer/tls_server.cpp2
-rw-r--r--src/lib/block/aes/aes_power8/aes_power8.cpp6
-rw-r--r--src/lib/block/aes/aes_vperm/aes_vperm.cpp6
-rw-r--r--src/lib/prov/openssl/openssl_rsa.cpp2
-rw-r--r--src/lib/utils/dyn_load/dyn_load.cpp4
-rw-r--r--src/lib/utils/ghash/ghash_cpu/ghash_cpu.cpp8
-rw-r--r--src/scripts/ci/appveyor.yml48
-rwxr-xr-xsrc/scripts/ci/setup_travis.sh4
-rw-r--r--src/scripts/ci/travis.yml22
20 files changed, 27 insertions, 153 deletions
diff --git a/src/build-data/cc/clang.txt b/src/build-data/cc/clang.txt
index ab37b33d5..c0e4eda5f 100644
--- a/src/build-data/cc/clang.txt
+++ b/src/build-data/cc/clang.txt
@@ -2,7 +2,7 @@ macro_name CLANG
binary_name clang++
-lang_flags "-std=c++11 -D_REENTRANT"
+lang_flags "-std=c++17 -D_REENTRANT"
warning_flags "-Wall -Wextra -Wpedantic -Wshadow -Wstrict-aliasing -Wstrict-overflow=5 -Wcast-align -Wmissing-declarations -Wpointer-arith -Wcast-qual"
diff --git a/src/build-data/cc/ekopath.txt b/src/build-data/cc/ekopath.txt
deleted file mode 100644
index 490396ac4..000000000
--- a/src/build-data/cc/ekopath.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-macro_name PATHSCALE
-
-binary_name pathCC
-
-optimization_flags "-O3"
-
-lang_flags "-D_REENTRANT -ansi -Wno-long-long"
-warning_flags "-W -Wall"
-
-ar_command pathCC
-ar_options "-ar -o"
-
-shared_flags "-fPIC"
-
-<so_link_commands>
-default -> "$(CXX) -shared -fPIC -Wl,-soname,{soname_abi}"
-</so_link_commands>
diff --git a/src/build-data/cc/gcc.txt b/src/build-data/cc/gcc.txt
index d7e019212..3848fb0dd 100644
--- a/src/build-data/cc/gcc.txt
+++ b/src/build-data/cc/gcc.txt
@@ -2,15 +2,15 @@ macro_name GCC
binary_name g++
-lang_flags "-std=c++11 -D_REENTRANT"
+lang_flags "-std=c++17 -D_REENTRANT"
-# This should only contain flags which are included in GCC 4.8
-warning_flags "-Wall -Wextra -Wpedantic -Wstrict-aliasing -Wcast-align -Wmissing-declarations -Wpointer-arith -Wcast-qual -Wzero-as-null-pointer-constant -Wnon-virtual-dtor"
+# This should only contain flags which are included in GCC 9
+warning_flags "-Wall -Wextra -Wpedantic -Wstrict-aliasing -Wcast-align -Wmissing-declarations -Wpointer-arith -Wcast-qual -Wzero-as-null-pointer-constant -Wnon-virtual-dtor -Wold-style-cast -Wsuggest-override -Wshadow -Wextra-semi"
# Boost headers have 0 as nullptr and non-virtual-dtor issues so we can't werror on them
werror_flags "-Werror -Wno-error=strict-overflow -Wno-error=zero-as-null-pointer-constant -Wno-error=non-virtual-dtor"
-maintainer_warning_flags "-Wstrict-overflow=5 -Wold-style-cast -Wsuggest-override -Wshadow -Wextra-semi"
+maintainer_warning_flags "-Wstrict-overflow=5"
optimization_flags "-O3"
sanitizer_optimization_flags "-O1 -fno-optimize-sibling-calls -fno-omit-frame-pointer"
diff --git a/src/build-data/cc/hpcc.txt b/src/build-data/cc/hpcc.txt
deleted file mode 100644
index cbe50c37d..000000000
--- a/src/build-data/cc/hpcc.txt
+++ /dev/null
@@ -1,18 +0,0 @@
-macro_name HP_ACC
-
-binary_name aCC
-
-lang_flags "-AA -ext +eh -z"
-optimization_flags "+O2"
-warning_flags "+w"
-shared_flags "+Z"
-
-<mach_abi_linking>
-hppa1.0 -> "+DAportable"
-hppa1.1 -> "+DA1.1"
-hppa2.0 -> "+DA2.0W"
-</mach_abi_linking>
-
-<so_link_commands>
-default -> "$(CXX) +Z -b -Wl,+h,{soname_abi}" # Documented in cc(1), but not CC(1) (?)
-</so_link_commands>
diff --git a/src/build-data/cc/icc.txt b/src/build-data/cc/icc.txt
index c8a1aa3dc..fcf5786d7 100644
--- a/src/build-data/cc/icc.txt
+++ b/src/build-data/cc/icc.txt
@@ -5,7 +5,7 @@ binary_name icpc
optimization_flags "-O2"
size_optimization_flags "-Os"
-lang_flags "-std=c++11"
+lang_flags "-std=c++17"
warning_flags "-w1"
shared_flags "-fPIC"
diff --git a/src/build-data/cc/pgi.txt b/src/build-data/cc/pgi.txt
deleted file mode 100644
index 811578cdc..000000000
--- a/src/build-data/cc/pgi.txt
+++ /dev/null
@@ -1,15 +0,0 @@
-macro_name PGI
-
-binary_name pgc++
-
-lang_flags "-std=c++11"
-
-optimization_flags "-O3"
-shared_flags "-fPIC"
-
-visibility_build_flags "-fvisibility=hidden"
-visibility_attribute '__attribute__((visibility("default")))'
-
-<so_link_commands>
-default -> "$(CXX) -shared -fPIC -Wl,-soname,{soname_abi}"
-</so_link_commands>
diff --git a/src/build-data/cc/sunstudio.txt b/src/build-data/cc/sunstudio.txt
index 3dd8e00b0..094a74ef0 100644
--- a/src/build-data/cc/sunstudio.txt
+++ b/src/build-data/cc/sunstudio.txt
@@ -6,7 +6,7 @@ optimization_flags "-xO2"
shared_flags "-KPIC"
warning_flags "+w -erroff=truncwarn,wnoretvalue,wlessrestrictedthrow"
-lang_flags "-std=c++11 +p -features=extensions"
+lang_flags "-std=c++17 +p -features=extensions"
ar_command CC
ar_options "-xar -o"
diff --git a/src/build-data/cc/xlc.txt b/src/build-data/cc/xlc.txt
index a54b7f91f..8a7b46d15 100644
--- a/src/build-data/cc/xlc.txt
+++ b/src/build-data/cc/xlc.txt
@@ -4,7 +4,7 @@ binary_name xlC
optimization_flags "-O2"
-lang_flags "-std=c++11"
+lang_flags "-std=c++17"
visibility_build_flags "-fvisibility=hidden"
visibility_attribute '__attribute__((visibility("default")))'
diff --git a/src/build-data/os/nacl.txt b/src/build-data/os/nacl.txt
deleted file mode 100644
index 0cb08ab93..000000000
--- a/src/build-data/os/nacl.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-<target_features>
-threads
-thread_local
-</target_features>
diff --git a/src/fuzzer/fuzzers.h b/src/fuzzer/fuzzers.h
index ee78f7a6d..1df6e94c9 100644
--- a/src/fuzzer/fuzzers.h
+++ b/src/fuzzer/fuzzers.h
@@ -87,7 +87,7 @@ int fuzz_files(char* files[])
if(in.good())
{
std::vector<uint8_t> buf(max_fuzzer_input_size);
- in.read((char*)buf.data(), buf.size());
+ in.read(reinterpret_cast<char*>(buf.data()), buf.size());
const size_t got = in.gcount();
buf.resize(got);
buf.shrink_to_fit();
@@ -119,7 +119,7 @@ int main(int argc, char* argv[])
#endif
{
std::vector<uint8_t> buf(max_fuzzer_input_size);
- std::cin.read((char*)buf.data(), buf.size());
+ std::cin.read(reinterpret_cast<char*>(buf.data()), buf.size());
const size_t got = std::cin.gcount();
buf.resize(got);
diff --git a/src/fuzzer/tls_client.cpp b/src/fuzzer/tls_client.cpp
index a5c8137bf..c8e5839f4 100644
--- a/src/fuzzer/tls_client.cpp
+++ b/src/fuzzer/tls_client.cpp
@@ -22,7 +22,7 @@ class Fuzzer_TLS_Policy : public Botan::TLS::Policy
{
public:
std::vector<uint16_t> ciphersuite_list(Botan::TLS::Protocol_Version version,
- bool have_srp) const
+ bool have_srp) const override
{
std::vector<uint16_t> ciphersuites;
diff --git a/src/fuzzer/tls_server.cpp b/src/fuzzer/tls_server.cpp
index d45ff5f5c..9df6151a7 100644
--- a/src/fuzzer/tls_server.cpp
+++ b/src/fuzzer/tls_server.cpp
@@ -113,7 +113,7 @@ class Fuzzer_TLS_Policy : public Botan::TLS::Policy
{
public:
std::vector<uint16_t> ciphersuite_list(Botan::TLS::Protocol_Version version,
- bool have_srp) const
+ bool have_srp) const override
{
std::vector<uint16_t> ciphersuites;
diff --git a/src/lib/block/aes/aes_power8/aes_power8.cpp b/src/lib/block/aes/aes_power8/aes_power8.cpp
index 18bc85933..8ab784a50 100644
--- a/src/lib/block/aes/aes_power8/aes_power8.cpp
+++ b/src/lib/block/aes/aes_power8/aes_power8.cpp
@@ -40,17 +40,17 @@ inline Altivec8x16 reverse_vec(Altivec8x16 src)
inline Altivec64x2 load_key(const uint32_t key[])
{
- return (Altivec64x2)reverse_vec((Altivec8x16)vec_vsx_ld(0, key));;
+ return reinterpret_cast<Altivec64x2>(reverse_vec(reinterpret_cast<Altivec8x16>(vec_vsx_ld(0, key))));
}
inline Altivec64x2 load_block(const uint8_t src[])
{
- return (Altivec64x2)reverse_vec(vec_vsx_ld(0, src));
+ return reinterpret_cast<Altivec64x2>(reverse_vec(vec_vsx_ld(0, src)));
}
inline void store_block(Altivec64x2 src, uint8_t dest[])
{
- vec_vsx_st(reverse_vec((Altivec8x16)src), 0, dest);
+ vec_vsx_st(reverse_vec(reinterpret_cast<Altivec8x16>(src)), 0, dest);
}
inline void store_blocks(Altivec64x2 B0, Altivec64x2 B1,
diff --git a/src/lib/block/aes/aes_vperm/aes_vperm.cpp b/src/lib/block/aes/aes_vperm/aes_vperm.cpp
index 4ae6bb223..3c71421b6 100644
--- a/src/lib/block/aes/aes_vperm/aes_vperm.cpp
+++ b/src/lib/block/aes/aes_vperm/aes_vperm.cpp
@@ -44,9 +44,9 @@ inline SIMD_4x32 BOTAN_FUNC_ISA(BOTAN_VPERM_ISA) shuffle(SIMD_4x32 a, SIMD_4x32
#elif defined(BOTAN_SIMD_USE_ALTIVEC)
const auto zero = vec_splat_s8(0x00);
- const auto mask = vec_cmplt((__vector signed char)b.raw(), zero);
- const auto r = vec_perm((__vector signed char)a.raw(), (__vector signed char)a.raw(), (__vector unsigned char)b.raw());
- return SIMD_4x32((__vector unsigned int)vec_sel(r, zero, mask));
+ const auto mask = vec_cmplt(reinterpret_cast<__vector signed char>(b.raw()), zero);
+ const auto r = vec_perm(reinterpret_cast<__vector signed char>(a.raw()), reinterpret_cast<__vector signed char>(a.raw()), reinterpret_cast<__vector unsigned char>(b.raw()));
+ return SIMD_4x32(reinterpret_cast<__vector unsigned int>(vec_sel(r, zero, mask)));
#else
#error "No shuffle implementation available"
diff --git a/src/lib/prov/openssl/openssl_rsa.cpp b/src/lib/prov/openssl/openssl_rsa.cpp
index 6744b35b2..8fbfa6b5d 100644
--- a/src/lib/prov/openssl/openssl_rsa.cpp
+++ b/src/lib/prov/openssl/openssl_rsa.cpp
@@ -59,7 +59,7 @@ class OpenSSL_RSA_Encryption_Operation final : public PK_Ops::Encryption
size_t ciphertext_length(size_t) const override { return ::RSA_size(m_openssl_rsa.get()); }
- size_t max_input_bits() const override { return m_bits; };
+ size_t max_input_bits() const override { return m_bits; }
secure_vector<uint8_t> encrypt(const uint8_t msg[], size_t msg_len,
RandomNumberGenerator&) override
diff --git a/src/lib/utils/dyn_load/dyn_load.cpp b/src/lib/utils/dyn_load/dyn_load.cpp
index b32fe4b3a..c9f455b3a 100644
--- a/src/lib/utils/dyn_load/dyn_load.cpp
+++ b/src/lib/utils/dyn_load/dyn_load.cpp
@@ -58,7 +58,7 @@ Dynamically_Loaded_Library::~Dynamically_Loaded_Library()
#if defined(BOTAN_TARGET_OS_HAS_POSIX1)
::dlclose(m_lib);
#elif defined(BOTAN_TARGET_OS_HAS_WIN32)
- ::FreeLibrary((HMODULE)m_lib);
+ ::FreeLibrary(reinterpret_cast<HMODULE>(m_lib));
#endif
}
@@ -69,7 +69,7 @@ void* Dynamically_Loaded_Library::resolve_symbol(const std::string& symbol)
#if defined(BOTAN_TARGET_OS_HAS_POSIX1)
addr = ::dlsym(m_lib, symbol.c_str());
#elif defined(BOTAN_TARGET_OS_HAS_WIN32)
- addr = reinterpret_cast<void*>(::GetProcAddress((HMODULE)m_lib, symbol.c_str()));
+ addr = reinterpret_cast<void*>(::GetProcAddress(reinterpret_cast<HMODULE>(m_lib), symbol.c_str()));
#endif
if(!addr)
diff --git a/src/lib/utils/ghash/ghash_cpu/ghash_cpu.cpp b/src/lib/utils/ghash/ghash_cpu/ghash_cpu.cpp
index b1feb98f0..8d9342b57 100644
--- a/src/lib/utils/ghash/ghash_cpu/ghash_cpu.cpp
+++ b/src/lib/utils/ghash/ghash_cpu/ghash_cpu.cpp
@@ -68,9 +68,11 @@ BOTAN_FORCE_INLINE SIMD_4x32 BOTAN_FUNC_ISA(BOTAN_CLMUL_ISA) clmul(const SIMD_4x
i2 = mask_lo.andc(i2);
}
- return SIMD_4x32((__vector unsigned int)__builtin_crypto_vpmsumd(
- (__vector unsigned long)i1.raw(),
- (__vector unsigned long)i2.raw())
+ return SIMD_4x32(
+ reinterpret_cast<__vector unsigned int>(
+ __builtin_crypto_vpmsumd(
+ reinterpret_cast<__vector unsigned long>(i1.raw()),
+ reinterpret_cast<__vector unsigned long>(i2.raw())))
);
#endif
}
diff --git a/src/scripts/ci/appveyor.yml b/src/scripts/ci/appveyor.yml
index dbe806a51..9f97c54f4 100644
--- a/src/scripts/ci/appveyor.yml
+++ b/src/scripts/ci/appveyor.yml
@@ -2,58 +2,12 @@
clone_depth: 5
environment:
- SCCACHE_CACHE_SIZE: 160M
+ SCCACHE_CACHE_SIZE: 300M
SCCACHE_VERSION: 0.2.12
APPVEYOR_SAVE_CACHE_ON_ERROR: true
matrix:
- # MSVC 2015 DLL x86-32
- - CC: VC2015
- PLATFORM: x86
- TARGET: shared
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
- BOOST_ROOT: "C:\\Libraries\\boost_1_69_0"
- BOOST_LIBRARYDIR: "C:\\Libraries\\boost_1_69_0\\lib32-msvc-14.0"
- BOOST_SYSTEM_LIBRARY: "libboost_system-vc140-mt-x32-1_69"
- MAKE_TOOL: nmake
- TARGET_CC: msvc
- EXTRA_FLAGS: "--disable-werror"
-
- # MSVC 2017 DLL x86-32
- - CC: VC2017
- PLATFORM: x86
- TARGET: shared
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
- BOOST_ROOT: "C:\\Libraries\\boost_1_69_0"
- BOOST_LIBRARYDIR: "C:\\Libraries\\boost_1_69_0\\lib32-msvc-14.1"
- BOOST_SYSTEM_LIBRARY: "libboost_system-vc141-mt-x32-1_69"
- MAKE_TOOL: jom
- TARGET_CC: msvc
-
- # MSVC 2017 DLL x86-64
- - CC: VC2017
- PLATFORM: x86_amd64
- TARGET: shared
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
- BOOST_ROOT: "C:\\Libraries\\boost_1_69_0"
- BOOST_LIBRARYDIR: "C:\\Libraries\\boost_1_69_0\\lib64-msvc-14.1"
- BOOST_SYSTEM_LIBRARY: "libboost_system-vc141-mt-x64-1_69"
- MAKE_TOOL: jom
- TARGET_CC: msvc
-
- # MSVC 2017 static x86-64
- - CC: VC2017
- PLATFORM: x86_amd64
- TARGET: static
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
- BOOST_ROOT: "C:\\Libraries\\boost_1_69_0"
- BOOST_LIBRARYDIR: "C:\\Libraries\\boost_1_69_0\\lib64-msvc-14.1"
- BOOST_SYSTEM_LIBRARY: "libboost_system-vc141-mt-x64-1_69"
- MAKE_TOOL: jom
- TARGET_CC: msvc
- EXTRA_FLAGS: "--extra-cxxflags=/DUNICODE --extra-cxxflags=/D_UNICODE"
-
# MSVC 2019 static x86-64 w/debug iterators
- CC: VC2019
PLATFORM: x86_amd64
diff --git a/src/scripts/ci/setup_travis.sh b/src/scripts/ci/setup_travis.sh
index f039e574d..d54500a6a 100755
--- a/src/scripts/ci/setup_travis.sh
+++ b/src/scripts/ci/setup_travis.sh
@@ -19,10 +19,6 @@ if [ "$TRAVIS_OS_NAME" = "linux" ]; then
sudo apt-get -qq update
sudo apt-get install g++-4.8
- elif [ "$TARGET" = "clang8" ]; then
- sudo apt-get -qq update
- sudo apt-get install clang-8
-
elif [ "$TARGET" = "cross-i386" ]; then
sudo apt-get -qq update
sudo apt-get install g++-multilib linux-libc-dev libc6-dev-i386
diff --git a/src/scripts/ci/travis.yml b/src/scripts/ci/travis.yml
index c0d2c36cb..64579c892 100644
--- a/src/scripts/ci/travis.yml
+++ b/src/scripts/ci/travis.yml
@@ -46,11 +46,6 @@ jobs:
env:
- TARGET="shared"
- - name: Linux ppc32 cross (GCC)
- dist: xenial
- env:
- - TARGET="cross-ppc32"
-
- name: macOS x86_64 (XCode Clang)
os: osx
compiler: clang
@@ -83,18 +78,6 @@ jobs:
env:
- TARGET="cross-i386"
- - name: Linux GCC 4.8
- dist: bionic
- env:
- - TARGET="gcc4.8"
- - EXTRA_FLAGS="--disable-werror"
-
- - name: Linux Clang 8
- compiler: clang
- env:
- - TARGET="clang8"
- - CXX="/usr/bin/clang++-8"
-
- name: Minimized
arch: arm64
env:
@@ -110,11 +93,6 @@ jobs:
env:
- TARGET="bsi"
- - name: NIST policy
- arch: arm64
- env:
- - TARGET="nist"
-
- name: Pylint
arch: arm64
dist: bionic