diff options
author | Jack Lloyd <[email protected]> | 2022-02-04 18:36:11 -0500 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2022-02-06 08:52:17 -0500 |
commit | a651ccc4da6d329500e45cd972b9a5d7e284ccdb (patch) | |
tree | 4b5d725dfd8ded460b6a882a03b5dc6e7d311645 /src | |
parent | bfa36e60338538a3563f542e0ac76d21b6ad7019 (diff) |
More perf fixes
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/pubkey/pk_keys.cpp | 2 | ||||
-rw-r--r-- | src/lib/pubkey/pk_ops.cpp | 4 | ||||
-rw-r--r-- | src/lib/pubkey/pubkey.cpp | 2 | ||||
-rw-r--r-- | src/lib/x509/x509_dn.cpp | 2 | ||||
-rw-r--r-- | src/lib/x509/x509path.cpp | 2 |
5 files changed, 6 insertions, 6 deletions
diff --git a/src/lib/pubkey/pk_keys.cpp b/src/lib/pubkey/pk_keys.cpp index 070f59dfd..c07f9ed8f 100644 --- a/src/lib/pubkey/pk_keys.cpp +++ b/src/lib/pubkey/pk_keys.cpp @@ -52,7 +52,7 @@ std::vector<uint8_t> Public_Key::subject_public_key() const */ OID Public_Key::get_oid() const { - const OID o = OIDS::str2oid_or_empty(algo_name()); + OID o = OIDS::str2oid_or_empty(algo_name()); if(o.empty()) throw Lookup_Error("PK algo " + algo_name() + " has no defined OIDs"); return o; diff --git a/src/lib/pubkey/pk_ops.cpp b/src/lib/pubkey/pk_ops.cpp index c9f25b748..02f23f84d 100644 --- a/src/lib/pubkey/pk_ops.cpp +++ b/src/lib/pubkey/pk_ops.cpp @@ -53,11 +53,11 @@ secure_vector<uint8_t> PK_Ops::Key_Agreement_with_KDF::agree(size_t key_len, const uint8_t w[], size_t w_len, const uint8_t salt[], size_t salt_len) { - const secure_vector<uint8_t> z = raw_agree(w, w_len); + secure_vector<uint8_t> z = raw_agree(w, w_len); if(m_kdf) return m_kdf->derive_key(key_len, z, salt, salt_len); return z; - } + } PK_Ops::Signature_with_EMSA::Signature_with_EMSA(const std::string& emsa, bool with_message_recovery) : Signature(), diff --git a/src/lib/pubkey/pubkey.cpp b/src/lib/pubkey/pubkey.cpp index 17532f939..d3d7d3e5b 100644 --- a/src/lib/pubkey/pubkey.cpp +++ b/src/lib/pubkey/pubkey.cpp @@ -281,7 +281,7 @@ size_t PK_Signer::signature_length() const std::vector<uint8_t> PK_Signer::signature(RandomNumberGenerator& rng) { - const std::vector<uint8_t> sig = unlock(m_op->sign(rng)); + std::vector<uint8_t> sig = unlock(m_op->sign(rng)); if(m_sig_format == IEEE_1363) { diff --git a/src/lib/x509/x509_dn.cpp b/src/lib/x509/x509_dn.cpp index 7e8f3ce25..d8a6ded23 100644 --- a/src/lib/x509/x509_dn.cpp +++ b/src/lib/x509/x509_dn.cpp @@ -374,7 +374,7 @@ namespace { std::string to_short_form(const OID& oid) { - const std::string long_id = oid.to_formatted_string(); + std::string long_id = oid.to_formatted_string(); if(long_id == "X520.CommonName") return "CN"; diff --git a/src/lib/x509/x509path.cpp b/src/lib/x509/x509path.cpp index cb248d563..02a18dc51 100644 --- a/src/lib/x509/x509path.cpp +++ b/src/lib/x509/x509path.cpp @@ -499,7 +499,7 @@ PKIX::check_crl_online(const std::vector<X509_Certificate>& cert_path, } } - const CertificatePathStatusCodes crl_status = PKIX::check_crl(cert_path, crls, ref_time); + auto crl_status = PKIX::check_crl(cert_path, crls, ref_time); if(crl_store) { |