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/rsa | |
parent | c820501357ac3acc81ddb8fad9fd9fd5fee9b32f (diff) |
Use BOTAN_ASSERT in various places
Diffstat (limited to 'src/pubkey/rsa')
-rw-r--r-- | src/pubkey/rsa/rsa.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/pubkey/rsa/rsa.cpp b/src/pubkey/rsa/rsa.cpp index 84048fa2e..54c8fed0b 100644 --- a/src/pubkey/rsa/rsa.cpp +++ b/src/pubkey/rsa/rsa.cpp @@ -10,6 +10,7 @@ #include <botan/parsing.h> #include <botan/numthry.h> #include <botan/keypair.h> +#include <botan/internal/assert.h> namespace Botan { @@ -108,8 +109,8 @@ RSA_Private_Operation::decrypt(const byte msg[], u32bit msg_len) BigInt m(msg, msg_len); BigInt x = blinder.unblind(private_op(blinder.blind(m))); - if(m != powermod_e_n(x)) - throw Internal_Error("RSA private op failed consistency check"); + BOTAN_ASSERT(m == powermod_e_n(x), + "RSA private op failed consistency check"); return BigInt::encode(x); } |