diff options
author | Jack Lloyd <[email protected]> | 2018-11-17 16:23:51 -0500 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2018-11-23 11:15:25 -0500 |
commit | b909778857b3e0b7eb86ac26c818e5f25baaddbd (patch) | |
tree | f8a5c9cbec26310bbfc9077563892b04db158a48 /src/tests/test_tss.cpp | |
parent | c20a428ca2f7c1ef96e642f55bb898010444c499 (diff) |
Make exceptions easier to translate to error codes
Avoid throwing base Botan::Exception type, as it is difficult to
determine what the error is in that case.
Add Exception::error_code and Exception::error_type which allows
(for error code) more information about the error and (for error type)
allows knowing the error type without requiring a sequence of catches.
See GH #1742
Diffstat (limited to 'src/tests/test_tss.cpp')
-rw-r--r-- | src/tests/test_tss.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/tests/test_tss.cpp b/src/tests/test_tss.cpp index 714f08df6..139e2087d 100644 --- a/src/tests/test_tss.cpp +++ b/src/tests/test_tss.cpp @@ -40,8 +40,8 @@ class TSS_Recovery_Tests final : public Text_Based_Test shares.push_back(Botan::RTSS_Share(v.data(), v.size())); } - auto reconstructed_secret = Botan::RTSS_Share::reconstruct(shares); - result.test_eq("Reconstructed secret correctly from all shares", reconstructed_secret, input); + auto reconstructed_secret_all = Botan::RTSS_Share::reconstruct(shares); + result.test_eq("Reconstructed secret correctly from all shares", reconstructed_secret_all, input); if(header == "Invalid") result.test_failure("Invalid shares should not result in recovery"); @@ -127,8 +127,8 @@ class TSS_Generation_Tests final : public Text_Based_Test result.test_eq("Expected share", shares[i].data(), expected_shares[i]); } - auto reconstructed_secret = Botan::RTSS_Share::reconstruct(shares); - result.test_eq("Reconstructed secret correctly from all shares", reconstructed_secret, input); + auto reconstructed_secret_all = Botan::RTSS_Share::reconstruct(shares); + result.test_eq("Reconstructed secret correctly from all shares", reconstructed_secret_all, input); if(N != M) { |