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; }