diff options
-rw-r--r-- | src/cli/argparse.h | 4 | ||||
-rw-r--r-- | src/cli/sandbox.h | 23 | ||||
-rw-r--r-- | src/cli/socket_utils.h | 4 | ||||
-rw-r--r-- | src/cli/speed.cpp | 1 | ||||
-rw-r--r-- | src/lib/tls/tls_server.cpp | 2 | ||||
-rw-r--r-- | src/lib/utils/timer.h | 1 | ||||
-rw-r--r-- | src/lib/x509/name_constraint.h | 4 | ||||
-rw-r--r-- | src/scripts/ci/lgtm.yml | 3 | ||||
-rwxr-xr-x | src/scripts/comba.py | 2 | ||||
-rwxr-xr-x | src/scripts/monty.py | 2 | ||||
-rwxr-xr-x | src/scripts/oids.py | 2 | ||||
-rwxr-xr-x | src/scripts/tls_suite_info.py | 2 |
12 files changed, 32 insertions, 18 deletions
diff --git a/src/cli/argparse.h b/src/cli/argparse.h index 2d940f32d..4df4a10c8 100644 --- a/src/cli/argparse.h +++ b/src/cli/argparse.h @@ -4,8 +4,8 @@ * Botan is released under the Simplified BSD License (see license.txt) */ -#ifndef BOTAN_ARGPARSE_H_ -#define BOTAN_ARGPARSE_H_ +#ifndef BOTAN_CLI_ARGPARSE_H_ +#define BOTAN_CLI_ARGPARSE_H_ #include <string> #include <map> diff --git a/src/cli/sandbox.h b/src/cli/sandbox.h index c719b8390..2d6f5c4df 100644 --- a/src/cli/sandbox.h +++ b/src/cli/sandbox.h @@ -4,7 +4,8 @@ * Botan is released under the Simplified BSD License (see license.txt) */ -#ifndef BOTAN_SANDBOX_H_ +#ifndef BOTAN_CLI_SANDBOX_H_ +#define BOTAN_CLI_SANDBOX_H_ #include <string> @@ -13,15 +14,19 @@ namespace Botan_CLI { class Sandbox { public: - explicit Sandbox(); - bool init(); - virtual ~Sandbox(); - const std::string& name() const - { - return m_name; - } + explicit Sandbox(); + virtual ~Sandbox(); + + bool init(); + + const std::string& name() const + { + return m_name; + } + private: - std::string m_name; + std::string m_name; }; } + #endif diff --git a/src/cli/socket_utils.h b/src/cli/socket_utils.h index d7eb4382e..7856f5508 100644 --- a/src/cli/socket_utils.h +++ b/src/cli/socket_utils.h @@ -5,8 +5,8 @@ * Botan is released under the Simplified BSD License (see license.txt) */ -#ifndef BOTAN_SOCKET_H_ -#define BOTAN_SOCKET_H_ +#ifndef BOTAN_CLI_SOCKET_UTILS_H_ +#define BOTAN_CLI_SOCKET_UTILS_H_ #include <botan/build.h> #include "cli_exceptions.h" diff --git a/src/cli/speed.cpp b/src/cli/speed.cpp index 9830c4f29..0b68d579f 100644 --- a/src/cli/speed.cpp +++ b/src/cli/speed.cpp @@ -510,6 +510,7 @@ class Speed final : public Command if(false) { + // Since everything might be disabled, need a block to else if from } #if defined(BOTAN_HAS_HASH) else if(Botan::HashFunction::providers(algo).size() > 0) diff --git a/src/lib/tls/tls_server.cpp b/src/lib/tls/tls_server.cpp index c0c5e1a5c..76941fd11 100644 --- a/src/lib/tls/tls_server.cpp +++ b/src/lib/tls/tls_server.cpp @@ -227,7 +227,7 @@ uint16_t choose_ciphersuite( client_sig_methods.push_back(Signature_Scheme::DSA_SHA1); } - bool we_support_some_hash_by_client = true; + bool we_support_some_hash_by_client = false; for(Signature_Scheme scheme : client_sig_methods) { diff --git a/src/lib/utils/timer.h b/src/lib/utils/timer.h index 5182aa2eb..f54c81fb6 100644 --- a/src/lib/utils/timer.h +++ b/src/lib/utils/timer.h @@ -40,6 +40,7 @@ class BOTAN_TEST_API Timer final {} Timer(const Timer& other) = default; + Timer& operator=(const Timer& other) = default; void start(); diff --git a/src/lib/x509/name_constraint.h b/src/lib/x509/name_constraint.h index 34ee5dc32..c92121589 100644 --- a/src/lib/x509/name_constraint.h +++ b/src/lib/x509/name_constraint.h @@ -102,7 +102,7 @@ class BOTAN_PUBLIC_API(2,0) GeneralSubtree final : public ASN1_Object * @param min minimum path length * @param max maximum path length */ - GeneralSubtree(GeneralName base, size_t min, size_t max) + GeneralSubtree(const GeneralName& base, size_t min, size_t max) : m_base(base), m_minimum(min), m_maximum(max) {} @@ -119,7 +119,7 @@ class BOTAN_PUBLIC_API(2,0) GeneralSubtree final : public ASN1_Object /** * @return name */ - GeneralName base() const { return m_base; } + const GeneralName& base() const { return m_base; } /** * @return minimum path length diff --git a/src/scripts/ci/lgtm.yml b/src/scripts/ci/lgtm.yml index 036470dd6..e5f232b85 100644 --- a/src/scripts/ci/lgtm.yml +++ b/src/scripts/ci/lgtm.yml @@ -1,4 +1,7 @@ +queries: + - exclude: cpp/fixme-comment + extraction: cpp: configure: diff --git a/src/scripts/comba.py b/src/scripts/comba.py index 711d1a950..309dca082 100755 --- a/src/scripts/comba.py +++ b/src/scripts/comba.py @@ -120,5 +120,7 @@ namespace Botan { print("}") + return 0 + if __name__ == '__main__': sys.exit(main()) diff --git a/src/scripts/monty.py b/src/scripts/monty.py index d3e9b5cb3..f253da3f6 100755 --- a/src/scripts/monty.py +++ b/src/scripts/monty.py @@ -90,6 +90,8 @@ namespace Botan { print("}") + return 0 + if __name__ == '__main__': sys.exit(main()) diff --git a/src/scripts/oids.py b/src/scripts/oids.py index 5cc61712a..f303f1f7e 100755 --- a/src/scripts/oids.py +++ b/src/scripts/oids.py @@ -270,7 +270,6 @@ def main(args = None): str2oid = {} dn_ub = {} sig2pads = defaultdict(set) - enc2pads = defaultdict(set) cur_hdr = None for line in oid_lines: @@ -324,6 +323,7 @@ def main(args = None): elif args[1] == "pads": print format_pads_as_map(sig2pads) + return 0 if __name__ == '__main__': sys.exit(main()) diff --git a/src/scripts/tls_suite_info.py b/src/scripts/tls_suite_info.py index 0a894e0bc..21dcd7fcd 100755 --- a/src/scripts/tls_suite_info.py +++ b/src/scripts/tls_suite_info.py @@ -146,7 +146,7 @@ def open_input(args): if len(args) == 1: try: return open('tls-parameters.txt') - except: + except OSError: pass import urllib2 |