aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/prov/openssl/openssl_rsa.cpp
diff options
context:
space:
mode:
authorAlexander Bluhm <[email protected]>2017-05-24 19:03:25 +0200
committerAlexander Bluhm <[email protected]>2017-05-24 19:19:15 +0200
commitfb22884637cd15e746dbb53864284a7ee71b6a77 (patch)
treea026a2910022b79f69493cd2c33a5983dd9721ef /src/lib/prov/openssl/openssl_rsa.cpp
parent51abe0773f6e96f19500ab6e6c25464e3ef8122f (diff)
Make Botan compile with LibreSSL again.
Add some #ifdef LIBRESSL_VERSION_NUMBER in addition to the OPENSSL_VERSION_NUMBER switch. Narrow down API compatiblity between LibreSSL and OpenSSL version in docs.
Diffstat (limited to 'src/lib/prov/openssl/openssl_rsa.cpp')
-rw-r--r--src/lib/prov/openssl/openssl_rsa.cpp4
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 f8b2b82d6..58a09cb0d 100644
--- a/src/lib/prov/openssl/openssl_rsa.cpp
+++ b/src/lib/prov/openssl/openssl_rsa.cpp
@@ -154,7 +154,7 @@ class OpenSSL_RSA_Verification_Operation : public PK_Ops::Verification_with_EMSA
size_t max_input_bits() const override
{
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
return ::BN_num_bits(m_openssl_rsa->n) - 1;
#else
return ::RSA_bits(m_openssl_rsa.get()) - 1;
@@ -224,7 +224,7 @@ class OpenSSL_RSA_Signing_Operation : public PK_Ops::Signature_with_EMSA
size_t max_input_bits() const override
{
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
return ::BN_num_bits(m_openssl_rsa->n) - 1;
#else
return ::RSA_bits(m_openssl_rsa.get()) - 1;