diff options
Diffstat (limited to 'src/pubkey/gost_3410/gost_3410.cpp')
-rw-r--r-- | src/pubkey/gost_3410/gost_3410.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/pubkey/gost_3410/gost_3410.cpp b/src/pubkey/gost_3410/gost_3410.cpp index f2fb15a2e..47438653d 100644 --- a/src/pubkey/gost_3410/gost_3410.cpp +++ b/src/pubkey/gost_3410/gost_3410.cpp @@ -50,7 +50,14 @@ GOST_3410_PublicKey::GOST_3410_PublicKey(const AlgorithmIdentifier& alg_id, public_key = PointGFp(domain().get_curve(), x, y); - X509_load_hook(); + try + { + public_key.check_invariants(); + } + catch(Illegal_Point) + { + throw Internal_Error("Loaded ECC private key failed self test"); + } } bool GOST_3410_PublicKey::verify(const byte msg[], u32bit msg_len, |