diff options
author | Jack Lloyd <[email protected]> | 2016-10-09 07:30:18 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2016-10-09 07:30:18 -0400 |
commit | 55b8fb5a33f1ec8a337623788ab84810527089db (patch) | |
tree | 2257fbfbcfbaeddc36ab2b1a33334bb671577c0d /src/lib/pubkey | |
parent | ad5d17bad98d4681de7e7c7cdefd6f01a8bd38a1 (diff) |
OpenSSL EC: Correctly handle OpenSSL not supporting the curve
GH #656
Diffstat (limited to 'src/lib/pubkey')
-rw-r--r-- | src/lib/pubkey/ecdh/ecdh.cpp | 4 | ||||
-rw-r--r-- | src/lib/pubkey/ecdsa/ecdsa.cpp | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/lib/pubkey/ecdh/ecdh.cpp b/src/lib/pubkey/ecdh/ecdh.cpp index a4791e15e..f3da737bb 100644 --- a/src/lib/pubkey/ecdh/ecdh.cpp +++ b/src/lib/pubkey/ecdh/ecdh.cpp @@ -64,10 +64,10 @@ ECDH_PrivateKey::create_key_agreement_op(RandomNumberGenerator& /*rng*/, { return make_openssl_ecdh_ka_op(*this, params); } - catch(Exception& e) + catch(Lookup_Error&) { if(provider == "openssl") - throw Exception("OpenSSL ECDH refused key or params", e.what()); + throw; } } #endif diff --git a/src/lib/pubkey/ecdsa/ecdsa.cpp b/src/lib/pubkey/ecdsa/ecdsa.cpp index f93fcc7a5..48d16caca 100644 --- a/src/lib/pubkey/ecdsa/ecdsa.cpp +++ b/src/lib/pubkey/ecdsa/ecdsa.cpp @@ -169,10 +169,10 @@ ECDSA_PublicKey::create_verification_op(const std::string& params, { return make_openssl_ecdsa_ver_op(*this, params); } - catch(Exception& e) + catch(Lookup_Error& e) { if(provider == "openssl") - throw Exception("OpenSSL provider refused ECDSA pubkey", e.what()); + throw; } } #endif @@ -195,10 +195,10 @@ ECDSA_PrivateKey::create_signature_op(RandomNumberGenerator& /*rng*/, { return make_openssl_ecdsa_sig_op(*this, params); } - catch(Exception& e) + catch(Lookup_Error& e) { if(provider == "openssl") - throw Exception("OpenSSL provider refused ECDSA privkey", e.what()); + throw; } } #endif |