Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 21 Jul 2023 23:54:01 GMT
From:      Kevin Bowling <kbowling@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 29ba81195ab3 - main - sysutils/barrier: Fix build with OpenSSL 3
Message-ID:  <202307212354.36LNs1hl036800@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by kbowling:

URL: https://cgit.FreeBSD.org/ports/commit/?id=29ba81195ab384a6b4de7c953cb6ac8ca2fff557

commit 29ba81195ab384a6b4de7c953cb6ac8ca2fff557
Author:     Kevin Bowling <kbowling@FreeBSD.org>
AuthorDate: 2023-07-21 23:52:25 +0000
Commit:     Kevin Bowling <kbowling@FreeBSD.org>
CommitDate: 2023-07-21 23:53:57 +0000

    sysutils/barrier: Fix build with OpenSSL 3
    
    OpenSSL 3 in FreeBSD base no longer links with:
    undefined symbol: RSA_generate_key
---
 .../barrier/files/patch-src_lib_net_SecureUtils.cpp | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/sysutils/barrier/files/patch-src_lib_net_SecureUtils.cpp b/sysutils/barrier/files/patch-src_lib_net_SecureUtils.cpp
new file mode 100644
index 000000000000..4fb4e8c4bea0
--- /dev/null
+++ b/sysutils/barrier/files/patch-src_lib_net_SecureUtils.cpp
@@ -0,0 +1,21 @@
+--- src/lib/net/SecureUtils.cpp.orig	2023-07-21 23:37:03 UTC
++++ src/lib/net/SecureUtils.cpp
+@@ -160,17 +160,11 @@ void generate_pem_self_signed_cert(const std::string& 
+ {
+     auto expiration_days = 365;
+ 
+-    auto* private_key = EVP_PKEY_new();
++    auto* private_key = EVP_RSA_gen(2048);
+     if (!private_key) {
+         throw std::runtime_error("Could not allocate private key for certificate");
+     }
+     auto private_key_free = finally([private_key](){ EVP_PKEY_free(private_key); });
+-
+-    auto* rsa = RSA_generate_key(2048, RSA_F4, nullptr, nullptr);
+-    if (!rsa) {
+-        throw std::runtime_error("Failed to generate RSA key");
+-    }
+-    EVP_PKEY_assign_RSA(private_key, rsa);
+ 
+     auto* cert = X509_new();
+     if (!cert) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202307212354.36LNs1hl036800>