diff options
author | lloyd <[email protected]> | 2010-09-26 17:10:02 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2010-09-26 17:10:02 +0000 |
commit | 3181cda998fc96868efc17b9630fdd5dceff9404 (patch) | |
tree | 556cb4ef134b1ed34c26ea1a08ebb1aba605b988 /src/pubkey/ecdh/ecdh.cpp | |
parent | c820501357ac3acc81ddb8fad9fd9fd5fee9b32f (diff) |
Use BOTAN_ASSERT in various places
Diffstat (limited to 'src/pubkey/ecdh/ecdh.cpp')
-rw-r--r-- | src/pubkey/ecdh/ecdh.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/pubkey/ecdh/ecdh.cpp b/src/pubkey/ecdh/ecdh.cpp index 8d13e7f65..2c78b65a6 100644 --- a/src/pubkey/ecdh/ecdh.cpp +++ b/src/pubkey/ecdh/ecdh.cpp @@ -8,6 +8,7 @@ */ #include <botan/ecdh.h> +#include <botan/internal/assert.h> namespace Botan { @@ -25,8 +26,8 @@ SecureVector<byte> ECDH_KA_Operation::agree(const byte w[], u32bit w_len) PointGFp S = (cofactor * point) * l_times_priv; - if(!S.on_the_curve()) - throw Internal_Error("ECDH: Agreed value was not on the curve"); + BOTAN_ASSERT(S.on_the_curve(), + "ECDH agreed value not on the curve"); return BigInt::encode_1363(S.get_affine_x(), curve.get_p().bytes()); |