diff options
Diffstat (limited to 'src/pk_keys.cpp')
-rw-r--r-- | src/pk_keys.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/pk_keys.cpp b/src/pk_keys.cpp index 719c5509d..8ada71133 100644 --- a/src/pk_keys.cpp +++ b/src/pk_keys.cpp @@ -6,6 +6,7 @@ #include <botan/pk_keys.h> #include <botan/config.h> #include <botan/oids.h> +#include <botan/libstate.h> namespace Botan { @@ -43,7 +44,8 @@ OID Public_Key::get_oid() const *************************************************/ void Public_Key::load_check() const { - if(!check_key(key_check_level("public"))) + if(!check_key(global_state().prng_reference(), + key_check_level("public"))) throw Invalid_Argument(algo_name() + ": Invalid public key"); } @@ -52,7 +54,8 @@ void Public_Key::load_check() const *************************************************/ void Private_Key::load_check() const { - if(!check_key(key_check_level("private"))) + if(!check_key(global_state().prng_reference(), + key_check_level("private"))) throw Invalid_Argument(algo_name() + ": Invalid private key"); } @@ -61,7 +64,8 @@ void Private_Key::load_check() const *************************************************/ void Private_Key::gen_check() const { - if(!check_key(key_check_level("private_gen"))) + if(!check_key(global_state().prng_reference(), + key_check_level("private_gen"))) throw Self_Test_Failure(algo_name() + " private key generation failed"); } |