From: Raoul Strackx <raoul.strackx@fortanix.com>
To: Jarkko Sakkinen <jarkko@kernel.org>,
Dave Hansen <dave.hansen@linux.intel.com>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>,
linux-sgx@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH RESEND 2/3] x86/sgx: Fix compatibility issue with OPENSSL < 1.1.0
Date: Wed, 31 Mar 2021 14:51:18 +0200 [thread overview]
Message-ID: <1b0e22f0-1639-40d7-e860-0d6f2c97d341@fortanix.com> (raw)
In-Reply-To: <cover.1617194795.git.raoul.strackx@fortanix.com>
The `RSA_get0_key` function only got introduced in OpenSSL 1.1.0. This makes compilation fail with older versions.
Signed-off-by: Raoul Strackx <raoul.strackx@fortanix.com>
---
tools/testing/selftests/sgx/sigstruct.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/tools/testing/selftests/sgx/sigstruct.c b/tools/testing/selftests/sgx/sigstruct.c
index dee7a3d..aac9cbc 100644
--- a/tools/testing/selftests/sgx/sigstruct.c
+++ b/tools/testing/selftests/sgx/sigstruct.c
@@ -128,8 +128,11 @@ static bool check_crypto_errors(void)
static inline const BIGNUM *get_modulus(RSA *key)
{
const BIGNUM *n;
-
+#if OPENSSL_VERSION_NUMBER >= 0x10100000L
RSA_get0_key(key, &n, NULL, NULL);
+#else
+ n = key->n;
+#endif
return n;
}
--
2.7.4
next prev parent reply other threads:[~2021-03-31 12:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <cover.1617194795.git.raoul.strackx@fortanix.com>
2021-03-31 12:51 ` [PATCH RESEND 1/3] x86/sgx: Adding eextend ioctl Raoul Strackx
2021-03-31 12:51 ` Raoul Strackx [this message]
2021-03-31 12:51 ` [PATCH RESEND 3/3] x86/sgx: eextend ioctl selftest Raoul Strackx
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1b0e22f0-1639-40d7-e860-0d6f2c97d341@fortanix.com \
--to=raoul.strackx@fortanix.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=jarkko@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sgx@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).