diff options
author | Jack Lloyd <[email protected]> | 2021-05-22 11:49:49 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2021-05-22 11:50:34 -0400 |
commit | 9745a8fed0f94d0fd26f6056572eb072d7108840 (patch) | |
tree | 6efcf45d34070e1badbb0ebca9f8b61af8a65c78 /src/lib/prov/openssl/openssl_rsa.cpp | |
parent | cb803e0c1b016428f9851eb9705498bc253bdb0f (diff) |
Prevent using non-sensical padding schemes
Most padding schemes require message recovery, which, now that NR and
RW have both been removed, limits their usage to RSA.
Diffstat (limited to 'src/lib/prov/openssl/openssl_rsa.cpp')
-rw-r--r-- | src/lib/prov/openssl/openssl_rsa.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/prov/openssl/openssl_rsa.cpp b/src/lib/prov/openssl/openssl_rsa.cpp index 875dab1d3..4fc9b15b9 100644 --- a/src/lib/prov/openssl/openssl_rsa.cpp +++ b/src/lib/prov/openssl/openssl_rsa.cpp @@ -150,7 +150,7 @@ class OpenSSL_RSA_Verification_Operation final : public PK_Ops::Verification_wit public: OpenSSL_RSA_Verification_Operation(const RSA_PublicKey& rsa, const std::string& emsa) : - PK_Ops::Verification_with_EMSA(emsa), + PK_Ops::Verification_with_EMSA(emsa, true), m_openssl_rsa(nullptr, ::RSA_free) { const std::vector<uint8_t> der = rsa.public_key_bits(); @@ -202,7 +202,7 @@ class OpenSSL_RSA_Signing_Operation final : public PK_Ops::Signature_with_EMSA public: OpenSSL_RSA_Signing_Operation(const RSA_PrivateKey& rsa, const std::string& emsa) : - PK_Ops::Signature_with_EMSA(emsa), + PK_Ops::Signature_with_EMSA(emsa, true), m_openssl_rsa(nullptr, ::RSA_free) { const secure_vector<uint8_t> der = rsa.private_key_bits(); |