aboutsummaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorDirk Meyer <dinoex@FreeBSD.org>2023-06-08 18:02:56 +0000
committerDirk Meyer <dinoex@FreeBSD.org>2023-06-08 18:02:56 +0000
commit21bc9af15c833fd11a75db9127f22fa27ba685fe (patch)
treee5b2137d277a568c66f79c88591f24c83f8bc272 /net
parent858d1744d99365174aa42af82d4d26d138b8783a (diff)
downloadports-21bc9af15c833fd11a75db9127f22fa27ba685fe.tar.gz
ports-21bc9af15c833fd11a75db9127f22fa27ba685fe.zip
net/x11vnc: fix build with openssl30
Diffstat (limited to 'net')
-rw-r--r--net/x11vnc/Makefile2
-rw-r--r--net/x11vnc/files/patch-sslhelper.c32
2 files changed, 33 insertions, 1 deletions
diff --git a/net/x11vnc/Makefile b/net/x11vnc/Makefile
index 2c95f289fcc7..12f0bc497ab3 100644
--- a/net/x11vnc/Makefile
+++ b/net/x11vnc/Makefile
@@ -1,6 +1,6 @@
PORTNAME= x11vnc
PORTVERSION= 0.9.16
-PORTREVISION= 3
+PORTREVISION= 4
CATEGORIES= net
MAINTAINER= dinoex@FreeBSD.org
diff --git a/net/x11vnc/files/patch-sslhelper.c b/net/x11vnc/files/patch-sslhelper.c
new file mode 100644
index 000000000000..223495a207cb
--- /dev/null
+++ b/net/x11vnc/files/patch-sslhelper.c
@@ -0,0 +1,32 @@
+--- src/sslhelper.c.orig 2019-01-05 13:22:11 UTC
++++ src/sslhelper.c
+@@ -732,8 +732,10 @@ static void ssl_xfer(int csock, int s_in, int s_out, i
+ #include <openssl/rand.h>
+
+ static SSL_CTX *ctx = NULL;
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
+ static RSA *rsa_512 = NULL;
+ static RSA *rsa_1024 = NULL;
++#endif
+ static SSL *ssl = NULL;
+ static X509_STORE *revocation_store = NULL;
+
+@@ -1063,8 +1065,9 @@ void openssl_init(int isclient) {
+ sslerrexit();
+ }
+
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
+ ds = dnow();
+- rsa_512 = RSA_generate_key(512, RSA_F4, NULL, NULL);
++ rsa_512 = RSA_generate_key_ex(512, RSA_F4, NULL, NULL);
+ if (rsa_512 == NULL) {
+ rfbLog("openssl_init: RSA_generate_key(512) failed.\n");
+ sslerrexit();
+@@ -1087,6 +1090,7 @@ void openssl_init(int isclient) {
+ rfbLog("openssl_init: SSL_CTX_set_tmp_rsa(1024) failed.\n");
+ sslerrexit();
+ }
++#endif
+
+ mode = 0;
+ mode |= SSL_MODE_ENABLE_PARTIAL_WRITE;