All of lore.kernel.org
 help / color / mirror / Atom feed
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 v2 2/3] x86/sgx: Fix compatibility issue with OPENSSL < 1.1.0
Date: Mon, 12 Apr 2021 11:04:55 +0200	[thread overview]
Message-ID: <92282c72-5849-70d0-1553-548130fba2bd@fortanix.com> (raw)
In-Reply-To: <da7ae1e7-59b8-63db-a9f1-607b4e529639@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


  parent reply	other threads:[~2021-04-12  9:31 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-12  8:59 [PATCH v2 0/3] x86/sgx: eextend ioctl Raoul Strackx
2021-04-12  9:04 ` [PATCH v2 1/3] x86/sgx: Adding " Raoul Strackx
2021-04-12  9:04 ` Raoul Strackx [this message]
2021-04-12  9:05 ` [PATCH v2 3/3] x86/sgx: eextend ioctl selftest Raoul Strackx
2021-04-12 15:36 ` [PATCH v2 0/3] x86/sgx: eextend ioctl Dave Hansen
2021-04-12 15:58   ` Jethro Beekman
2021-04-12 16:40     ` Dave Hansen
2021-04-12 16:41       ` Jethro Beekman
2021-04-12 16:47         ` Dave Hansen
2021-04-12 17:01           ` Jethro Beekman
2021-04-14 11:07             ` Jarkko Sakkinen
2021-04-14 10:52 ` Jarkko Sakkinen
2021-04-14 11:01   ` Jethro Beekman
2021-04-16 13:08     ` Jarkko Sakkinen

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=92282c72-5849-70d0-1553-548130fba2bd@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.