aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorlloyd <[email protected]>2014-10-31 11:30:40 +0000
committerlloyd <[email protected]>2014-10-31 11:30:40 +0000
commitaf0cc3c7308d0f5320e82394590b0ca93f43c4d4 (patch)
tree71c24e07a7cfaea3a0ddd90a4a57a763ee45bd3e /src
parent05d29e973175889685a695d34cf810992497b316 (diff)
No need to pass version by reference
Diffstat (limited to 'src')
-rw-r--r--src/lib/tls/tls_policy.cpp2
-rw-r--r--src/lib/tls/tls_policy.h2
-rw-r--r--src/tests/unit_tls.cpp3
3 files changed, 4 insertions, 3 deletions
diff --git a/src/lib/tls/tls_policy.cpp b/src/lib/tls/tls_policy.cpp
index 602667f05..c4867d81a 100644
--- a/src/lib/tls/tls_policy.cpp
+++ b/src/lib/tls/tls_policy.cpp
@@ -139,7 +139,7 @@ u32bit Policy::session_ticket_lifetime() const
return 86400; // 1 day
}
-bool Policy::send_fallback_scsv(const Protocol_Version& version) const
+bool Policy::send_fallback_scsv(Protocol_Version version) const
{
return version != latest_supported_version(version.is_datagram_protocol());
}
diff --git a/src/lib/tls/tls_policy.h b/src/lib/tls/tls_policy.h
index a109ecc44..378b9ee94 100644
--- a/src/lib/tls/tls_policy.h
+++ b/src/lib/tls/tls_policy.h
@@ -143,7 +143,7 @@ class BOTAN_DLL Policy
* Default returns true iff version is not the latest version the
* policy allows, exists to allow override in case of interop problems.
*/
- virtual bool send_fallback_scsv(const Protocol_Version& version) const;
+ virtual bool send_fallback_scsv(Protocol_Version version) const;
/**
* Allows policy to reject any ciphersuites which are undesirable
diff --git a/src/tests/unit_tls.cpp b/src/tests/unit_tls.cpp
index 875fe8a48..cc5c1e240 100644
--- a/src/tests/unit_tls.cpp
+++ b/src/tests/unit_tls.cpp
@@ -271,7 +271,8 @@ size_t basic_test_handshake(RandomNumberGenerator& rng,
class Test_Policy : public TLS::Policy
{
public:
- bool acceptable_protocol_version(TLS::Protocol_Version) const { return true; }
+ bool acceptable_protocol_version(TLS::Protocol_Version) const override { return true; }
+ bool send_fallback_scsv(TLS::Protocol_Version) const override { return false; }
};
}