diff options
author | Jack Lloyd <[email protected]> | 2016-09-14 16:33:37 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2016-10-07 19:27:58 -0400 |
commit | 239bdf36a617df86dc97efb11ec96d7c6d357534 (patch) | |
tree | 1011ccccee0a4aad5e58943fa3a4af621c968b8a /src/lib/prov/openssl | |
parent | 25b6fb53eec30620d084411fb1dbc8913142fc6d (diff) |
Revert PK_Verifier change (don't require RNG there).
Verification is deterministic and public, so really no RNG is ever needed.
Change provider handling - accepts "base", "openssl", or empty, otherwise
throws a Provider_Not_Found exception.
Diffstat (limited to 'src/lib/prov/openssl')
-rw-r--r-- | src/lib/prov/openssl/openssl_rsa.cpp | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/src/lib/prov/openssl/openssl_rsa.cpp b/src/lib/prov/openssl/openssl_rsa.cpp index 5405ddda1..defa566f0 100644 --- a/src/lib/prov/openssl/openssl_rsa.cpp +++ b/src/lib/prov/openssl/openssl_rsa.cpp @@ -228,28 +228,16 @@ class OpenSSL_RSA_Signing_Operation : public PK_Ops::Signature_with_EMSA std::unique_ptr<PK_Ops::Encryption> make_openssl_rsa_enc_op(const RSA_PublicKey& key, const std::string& params) { - try - { - auto pad_info = get_openssl_enc_pad(params); - return std::unique_ptr<PK_Ops::Encryption>( - new OpenSSL_RSA_Encryption_Operation(key, pad_info.first, pad_info.second)); - } - catch(...) {} - - return {}; + auto pad_info = get_openssl_enc_pad(params); + return std::unique_ptr<PK_Ops::Encryption>( + new OpenSSL_RSA_Encryption_Operation(key, pad_info.first, pad_info.second)); } std::unique_ptr<PK_Ops::Decryption> make_openssl_rsa_dec_op(const RSA_PrivateKey& key, const std::string& params) { - try - { - auto pad_info = get_openssl_enc_pad(params); - return std::unique_ptr<PK_Ops::Decryption>(new OpenSSL_RSA_Decryption_Operation(key, pad_info.first)); - } - catch(...) {} - - return {}; + auto pad_info = get_openssl_enc_pad(params); + return std::unique_ptr<PK_Ops::Decryption>(new OpenSSL_RSA_Decryption_Operation(key, pad_info.first)); } std::unique_ptr<PK_Ops::Verification> |