boinc: Add compatibility with OpenSSL 3.0
authorEneas U de Queiroz <cotequeiroz@gmail.com>
Thu, 9 Feb 2023 15:03:32 +0000 (12:03 -0300)
committerEneas U de Queiroz <cotequeiroz@gmail.com>
Thu, 16 Feb 2023 13:28:52 +0000 (10:28 -0300)
This adds a patch from upstream allowing to build with OpenSSL 3.0.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
net/boinc/Makefile
net/boinc/patches/003-update-to-openssl-3.0.0.patch [new file with mode: 0644]

index 694acd70da07bdf740fab445d117eace43ac816c..cb91155129d21fad509fecb8f3bd73934fb79539 100644 (file)
@@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
 PKG_NAME:=boinc
 PKG_VERSION:=7.16.16
 PKG_VERSION_SHORT:=$(shell echo $(PKG_VERSION)| cut -f1,2 -d.)
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE_DATE:=2020-02-25
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
diff --git a/net/boinc/patches/003-update-to-openssl-3.0.0.patch b/net/boinc/patches/003-update-to-openssl-3.0.0.patch
new file mode 100644 (file)
index 0000000..75fab90
--- /dev/null
@@ -0,0 +1,34 @@
+From 689dc20ede9768377d4032ff8c70b58269c8dc9c Mon Sep 17 00:00:00 2001
+From: Charlie Fenton <charlief@example.com>
+Date: Mon, 18 Oct 2021 01:43:08 -0700
+Subject: [PATCH] Mac: update dependent libraries to latest: c-ares-1.17.2,
+ curl-7.79.1, freetype-2.11.0, openssl-3.0.0 Previously updated to
+ wxWidgets-3.1.5. FTGL version ftgl-2.1.3~rc5  is still the current version.
+
+---
+cotequeiroz: Trimming original commit to lib/crypt.cpp only
+
+ lib/crypt.cpp                             |   7 +-
+
+--- a/lib/crypt.cpp
++++ b/lib/crypt.cpp
+@@ -1,6 +1,6 @@
+ // This file is part of BOINC.
+ // http://boinc.berkeley.edu
+-// Copyright (C) 2008 University of California
++// Copyright (C) 2021 University of California
+ //
+ // BOINC is free software; you can redistribute it and/or modify it
+ // under the terms of the GNU Lesser General Public License
+@@ -670,7 +670,10 @@ int check_validity_of_cert(
+         }
+ #ifdef HAVE_OPAQUE_RSA_DSA_DH
+         RSA *rsa;
+-        rsa = EVP_PKEY_get0_RSA(pubKey);
++        // CAUTION: In OpenSSL 3.0.0, EVP_PKEY_get0_RSA() now returns a
++        // pointer of type "const struct rsa_st*" to an immutable value.
++        // Do not try to modify the contents of the returned struct.
++        rsa = (rsa_st*)EVP_PKEY_get0_RSA(pubKey);
+         if (!RSA_blinding_on(rsa, c)) {
+ #else
+         if (!RSA_blinding_on(pubKey->pkey.rsa, c)) {