From db305d9ae8d5fa89d9932fbea7867e90d32f454e Mon Sep 17 00:00:00 2001 From: Alon Bar-Lev Date: Sat, 5 Jan 2019 22:14:15 +0200 Subject: [PATCH] build: support libressl-2.7 --- gnupg-pkcs11-scd/keyutil.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gnupg-pkcs11-scd/keyutil.c b/gnupg-pkcs11-scd/keyutil.c index 1c99d2a..f903324 100644 --- a/gnupg-pkcs11-scd/keyutil.c +++ b/gnupg-pkcs11-scd/keyutil.c @@ -34,6 +34,7 @@ #endif #if defined(ENABLE_OPENSSL) #include +#include #endif #include "encoding.h" #include "keyutil.h" @@ -45,8 +46,8 @@ typedef unsigned char *my_openssl_d2i_t; typedef const unsigned char *my_openssl_d2i_t; #endif -#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) -void RSA_get0_key(const RSA *r, const BIGNUM **n, const BIGNUM **e, const BIGNUM **d) { +#if OPENSSL_VERSION_NUMBER < 0x10100000L || (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L) +static void RSA_get0_key(const RSA *r, const BIGNUM **n, const BIGNUM **e, const BIGNUM **d) { if (n != NULL) { *n = r->n; }