diff options
author | Jack Lloyd <[email protected]> | 2016-11-12 01:53:56 -0500 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2016-11-12 01:53:56 -0500 |
commit | 9c72dabc9dc73e2603c22dfce48611b5b626238b (patch) | |
tree | bda4f84f78bfbdd28e2199ee8f9998b08cc3c634 /src/lib/prov/tpm | |
parent | 618f890fd7ede74c728612ca8bc590c72ee353f1 (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/prov/tpm')
-rw-r--r-- | src/lib/prov/tpm/tpm.cpp | 4 | ||||
-rw-r--r-- | src/lib/prov/tpm/tpm.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/prov/tpm/tpm.cpp b/src/lib/prov/tpm/tpm.cpp index 7604a9be0..cb5a242eb 100644 --- a/src/lib/prov/tpm/tpm.cpp +++ b/src/lib/prov/tpm/tpm.cpp @@ -335,10 +335,10 @@ BigInt TPM_PrivateKey::get_e() const size_t TPM_PrivateKey::estimated_strength() const { - return if_work_factor(get_n().bits()); + return if_work_factor(key_length()); } -size_t TPM_PrivateKey::max_input_bits() const +size_t TPM_PrivateKey::key_length() const { return get_n().bits(); } diff --git a/src/lib/prov/tpm/tpm.h b/src/lib/prov/tpm/tpm.h index 413896df1..804d42e70 100644 --- a/src/lib/prov/tpm/tpm.h +++ b/src/lib/prov/tpm/tpm.h @@ -150,7 +150,7 @@ class BOTAN_DLL TPM_PrivateKey : public Private_Key size_t estimated_strength() const override; - size_t max_input_bits() const override; + size_t key_length() const override; AlgorithmIdentifier algorithm_identifier() const override; |