aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/cli/cli.h9
-rw-r--r--src/cli/utils.cpp4
-rw-r--r--src/lib/asn1/x509_dn.cpp1
-rw-r--r--src/lib/pubkey/curve25519/curve25519.cpp2
-rw-r--r--src/lib/pubkey/pbes2/pbes2.cpp2
-rw-r--r--src/lib/pubkey/rsa/rsa.cpp1
-rw-r--r--src/lib/pubkey/x509_key.cpp2
-rw-r--r--src/lib/x509/x509_ext.cpp2
-rw-r--r--src/lib/x509/x509_obj.cpp1
-rw-r--r--src/lib/x509/x509cert.cpp1
10 files changed, 10 insertions, 15 deletions
diff --git a/src/cli/cli.h b/src/cli/cli.h
index 7e2d49f0f..c3dc8d849 100644
--- a/src/cli/cli.h
+++ b/src/cli/cli.h
@@ -317,7 +317,14 @@ class Command
m_spec_flags.insert("help");
m_spec_opts.insert(std::make_pair("output", ""));
m_spec_opts.insert(std::make_pair("error-output", ""));
- m_spec_opts.insert(std::make_pair("rng-type", "auto"));
+
+ m_spec_opts.insert(std::make_pair("rng-type",
+#if defined(BOTAN_HAS_SYSTEM_RNG)
+ "system"
+#else
+ "auto"
+#endif
+ ));
}
/*
diff --git a/src/cli/utils.cpp b/src/cli/utils.cpp
index 664f74eb8..c0af0332e 100644
--- a/src/cli/utils.cpp
+++ b/src/cli/utils.cpp
@@ -131,11 +131,11 @@ class Hash final : public Command
const size_t buf_size = get_arg_sz("buf-size");
- auto files = get_arg_list("files");
+ std::vector<std::string> files = get_arg_list("files");
if(files.empty())
files.push_back("-"); // read stdin if no arguments on command line
- for(auto fsname : files)
+ for(const std::string& fsname : files)
{
try
{
diff --git a/src/lib/asn1/x509_dn.cpp b/src/lib/asn1/x509_dn.cpp
index e5cd2b8cc..a7ceeef4c 100644
--- a/src/lib/asn1/x509_dn.cpp
+++ b/src/lib/asn1/x509_dn.cpp
@@ -269,7 +269,6 @@ void X509_DN::decode_from(BER_Decoder& source)
rdn.start_cons(SEQUENCE)
.decode(oid)
.decode(str)
- .verify_end()
.end_cons();
add_attribute(oid, str.value());
diff --git a/src/lib/pubkey/curve25519/curve25519.cpp b/src/lib/pubkey/curve25519/curve25519.cpp
index 4908bf46f..070b8e841 100644
--- a/src/lib/pubkey/curve25519/curve25519.cpp
+++ b/src/lib/pubkey/curve25519/curve25519.cpp
@@ -52,7 +52,6 @@ Curve25519_PublicKey::Curve25519_PublicKey(const AlgorithmIdentifier&,
BER_Decoder(key_bits)
.start_cons(SEQUENCE)
.decode(m_public, OCTET_STRING)
- .verify_end()
.end_cons();
size_check(m_public.size(), "public key");
@@ -81,7 +80,6 @@ Curve25519_PrivateKey::Curve25519_PrivateKey(const AlgorithmIdentifier&,
.start_cons(SEQUENCE)
.decode(m_public, OCTET_STRING)
.decode(m_private, OCTET_STRING)
- .verify_end()
.end_cons();
size_check(m_public.size(), "public key");
diff --git a/src/lib/pubkey/pbes2/pbes2.cpp b/src/lib/pubkey/pbes2/pbes2.cpp
index 3f1000170..01bab76bb 100644
--- a/src/lib/pubkey/pbes2/pbes2.cpp
+++ b/src/lib/pubkey/pbes2/pbes2.cpp
@@ -116,7 +116,6 @@ pbes2_decrypt(const secure_vector<uint8_t>& key_bits,
.start_cons(SEQUENCE)
.decode(kdf_algo)
.decode(enc_algo)
- .verify_end()
.end_cons();
AlgorithmIdentifier prf_algo;
@@ -136,7 +135,6 @@ pbes2_decrypt(const secure_vector<uint8_t>& key_bits,
.decode_optional(prf_algo, SEQUENCE, CONSTRUCTED,
AlgorithmIdentifier("HMAC(SHA-160)",
AlgorithmIdentifier::USE_NULL_PARAM))
- .verify_end()
.end_cons();
const std::string cipher = OIDS::lookup(enc_algo.oid);
diff --git a/src/lib/pubkey/rsa/rsa.cpp b/src/lib/pubkey/rsa/rsa.cpp
index 1a287473a..d8deccab3 100644
--- a/src/lib/pubkey/rsa/rsa.cpp
+++ b/src/lib/pubkey/rsa/rsa.cpp
@@ -58,7 +58,6 @@ RSA_PublicKey::RSA_PublicKey(const AlgorithmIdentifier&,
.start_cons(SEQUENCE)
.decode(m_n)
.decode(m_e)
- .verify_end()
.end_cons();
}
diff --git a/src/lib/pubkey/x509_key.cpp b/src/lib/pubkey/x509_key.cpp
index 700020901..6fadeb70d 100644
--- a/src/lib/pubkey/x509_key.cpp
+++ b/src/lib/pubkey/x509_key.cpp
@@ -46,7 +46,6 @@ Public_Key* load_key(DataSource& source)
.start_cons(SEQUENCE)
.decode(alg_id)
.decode(key_bits, BIT_STRING)
- .verify_end()
.end_cons();
}
else
@@ -59,7 +58,6 @@ Public_Key* load_key(DataSource& source)
.start_cons(SEQUENCE)
.decode(alg_id)
.decode(key_bits, BIT_STRING)
- .verify_end()
.end_cons();
}
diff --git a/src/lib/x509/x509_ext.cpp b/src/lib/x509/x509_ext.cpp
index 199ca6bcc..965c8efcf 100644
--- a/src/lib/x509/x509_ext.cpp
+++ b/src/lib/x509/x509_ext.cpp
@@ -219,7 +219,6 @@ void Extensions::decode_from(BER_Decoder& from_source)
.decode(oid)
.decode_optional(critical, BOOLEAN, UNIVERSAL, false)
.decode(value, OCTET_STRING)
- .verify_end()
.end_cons();
m_extensions_raw.emplace(oid, std::make_pair(value, critical));
@@ -300,7 +299,6 @@ void Basic_Constraints::decode_inner(const std::vector<uint8_t>& in)
.start_cons(SEQUENCE)
.decode_optional(m_is_ca, BOOLEAN, UNIVERSAL, false)
.decode_optional(m_path_limit, INTEGER, UNIVERSAL, NO_CERT_PATH_LIMIT)
- .verify_end()
.end_cons();
if(m_is_ca == false)
diff --git a/src/lib/x509/x509_obj.cpp b/src/lib/x509/x509_obj.cpp
index cc97c1f15..43e92d322 100644
--- a/src/lib/x509/x509_obj.cpp
+++ b/src/lib/x509/x509_obj.cpp
@@ -105,7 +105,6 @@ void X509_Object::decode_from(BER_Decoder& from)
.end_cons()
.decode(m_sig_algo)
.decode(m_sig, BIT_STRING)
- .verify_end()
.end_cons();
}
diff --git a/src/lib/x509/x509cert.cpp b/src/lib/x509/x509cert.cpp
index e53034dce..b6e15a3e0 100644
--- a/src/lib/x509/x509cert.cpp
+++ b/src/lib/x509/x509cert.cpp
@@ -95,7 +95,6 @@ void X509_Certificate::force_decode()
.start_cons(SEQUENCE)
.decode(start)
.decode(end)
- .verify_end()
.end_cons()
.decode(dn_subject);