From aed41a2ec18a34563b981cd4ffe4b2711e1f85da Mon Sep 17 00:00:00 2001 From: Kristof Provost Date: Thu, 6 Jul 2023 21:48:43 +0200 Subject: [PATCH] sysutils/voucher: fix build with openssl 1 OpenSSL 1 calls EVP_PKEY_get_bits() EVP_PKEY_bits(). Add a compatibility stub to fix the build. While here bump the portrevision, which we neglected to do in the previous change. --- sysutils/voucher/Makefile | 2 +- sysutils/voucher/files/voucher.c | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/sysutils/voucher/Makefile b/sysutils/voucher/Makefile index 3dae1fbfcff2..ad1ebd102feb 100644 --- a/sysutils/voucher/Makefile +++ b/sysutils/voucher/Makefile @@ -2,7 +2,7 @@ PORTNAME= voucher PORTVERSION= 0.1 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= sysutils MASTER_SITES= # empty DISTFILES= # none diff --git a/sysutils/voucher/files/voucher.c b/sysutils/voucher/files/voucher.c index 770572ddb69f..0d984b63051c 100644 --- a/sysutils/voucher/files/voucher.c +++ b/sysutils/voucher/files/voucher.c @@ -128,6 +128,13 @@ #include #endif +#if OPENSSL_VERSION_NUMBER < 0x30000000L +int EVP_PKEY_get_bits(EVP_PKEY *key) +{ + return EVP_PKEY_bits(key); +} +#endif + #ifdef DEBUG #define HELP "\n\ voucher [-d] [-c cfg_file] -k public_key voucher\n\