diff options
author | lloyd <[email protected]> | 2006-09-30 06:14:12 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2006-09-30 06:14:12 +0000 |
commit | 268b1f3089a9692d9a4166a81375930cb1897401 (patch) | |
tree | aa869ee1a6aaa1c9e82e8bab592f90ce16c23e70 | |
parent | e52d871393f180042822950966597d160b9adf70 (diff) |
Catch Encoding_Error in the keypair consistency check when we generate the
signature; if we catch it, skip the rest of the tests.
-rw-r--r-- | src/keypair.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/keypair.cpp b/src/keypair.cpp index eb613b971..ef3e5f2a9 100644 --- a/src/keypair.cpp +++ b/src/keypair.cpp @@ -46,7 +46,15 @@ void check_key(PK_Signer* signer, PK_Verifier* verifier) SecureVector<byte> message(16); Global_RNG::randomize(message, message.size()); - SecureVector<byte> signature = sig->sign_message(message); + SecureVector<byte> signature; + + try { + signature = sig->sign_message(message); + } + catch(Encoding_Error) + { + return; + } if(!ver->verify_message(message, signature)) throw Self_Test_Failure("Signature key pair consistency failure"); |