aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/misc/srp6
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2015-12-11 09:42:06 -0500
committerJack Lloyd <[email protected]>2015-12-11 09:42:06 -0500
commit6b9a3a534071ef84c121c406559f8fc7ad546104 (patch)
treec11480ad1f07e443ba4e992fefcd618b532c2e93 /src/lib/misc/srp6
parent79a51627ee11f4d7f55d589751b30463d1f02a76 (diff)
Reroot the exception hierarchy into a toplevel Exception class
As the alternatives are unfortunate for applications trying to catch all library errors, and it seems deriving from std::runtime_error causes problems with MSVC DLLs (GH #340) Effectively reverts 2837e915d82e43
Diffstat (limited to 'src/lib/misc/srp6')
-rw-r--r--src/lib/misc/srp6/srp6.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/misc/srp6/srp6.cpp b/src/lib/misc/srp6/srp6.cpp
index f567db875..7fca6461f 100644
--- a/src/lib/misc/srp6/srp6.cpp
+++ b/src/lib/misc/srp6/srp6.cpp
@@ -70,7 +70,7 @@ std::string srp6_group_identifier(const BigInt& N, const BigInt& g)
if(group.get_p() == N && group.get_g() == g)
return group_name;
- throw std::runtime_error("Unknown SRP params");
+ throw Exception("Unknown SRP params");
}
catch(...)
{
@@ -94,7 +94,7 @@ srp6_client_agree(const std::string& identifier,
const size_t p_bytes = group.get_p().bytes();
if(B <= 0 || B >= p)
- throw std::runtime_error("Invalid SRP parameter from server");
+ throw Exception("Invalid SRP parameter from server");
BigInt k = hash_seq(hash_id, p_bytes, p, g);
@@ -150,7 +150,7 @@ BigInt SRP6_Server_Session::step1(const BigInt& v,
SymmetricKey SRP6_Server_Session::step2(const BigInt& A)
{
if(A <= 0 || A >= m_p)
- throw std::runtime_error("Invalid SRP parameter from client");
+ throw Exception("Invalid SRP parameter from client");
const BigInt u = hash_seq(m_hash_id, m_p_bytes, A, m_B);