aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/tls
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2016-11-12 01:53:56 -0500
committerJack Lloyd <[email protected]>2016-11-12 01:53:56 -0500
commit9c72dabc9dc73e2603c22dfce48611b5b626238b (patch)
treebda4f84f78bfbdd28e2199ee8f9998b08cc3c634 /src/lib/tls
parent618f890fd7ede74c728612ca8bc590c72ee353f1 (diff)
Pubkey cleanups
Add Public_Key::key_length usable for policy checking (as in TLS::Policy::check_peer_key_acceptable) Remove Public_Key::max_input_bits because it didn't make much sense for most algorithms actually. Remove message_parts and message_part_size from PK_Ops
Diffstat (limited to 'src/lib/tls')
-rw-r--r--src/lib/tls/tls_policy.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/lib/tls/tls_policy.cpp b/src/lib/tls/tls_policy.cpp
index 3ed02f4c5..c7c285716 100644
--- a/src/lib/tls/tls_policy.cpp
+++ b/src/lib/tls/tls_policy.cpp
@@ -175,14 +175,12 @@ void Policy::check_peer_key_acceptable(const Public_Key& public_key) const
{
const std::string algo_name = public_key.algo_name();
- // FIXME this is not really the right way to do this
- size_t keylength = public_key.max_input_bits();
+ const size_t keylength = public_key.key_length();
size_t expected_keylength = 0;
if(algo_name == "RSA")
{
expected_keylength = minimum_rsa_bits();
- keylength += 1; // fixup for use of max_input_bits above
}
else if(algo_name == "DH")
{