aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/prov/openssl/openssl_rsa.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/prov/openssl/openssl_rsa.cpp')
-rw-r--r--src/lib/prov/openssl/openssl_rsa.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lib/prov/openssl/openssl_rsa.cpp b/src/lib/prov/openssl/openssl_rsa.cpp
index e7a562cf5..f0e13667b 100644
--- a/src/lib/prov/openssl/openssl_rsa.cpp
+++ b/src/lib/prov/openssl/openssl_rsa.cpp
@@ -146,6 +146,8 @@ class OpenSSL_RSA_Verification_Operation : public PK_Ops::Verification_with_EMSA
const std::vector<uint8_t> der = rsa.public_key_bits();
const uint8_t* der_ptr = der.data();
m_openssl_rsa.reset(::d2i_RSAPublicKey(nullptr, &der_ptr, der.size()));
+ if(!m_openssl_rsa)
+ throw OpenSSL_Error("d2i_RSAPublicKey");
}
size_t max_input_bits() const override { return ::BN_num_bits(m_openssl_rsa->n) - 1; }