www/ruby-puma: prepare for upcoming libcrypto bump and use the

OpenSSL 1.1 code path to handle DH.
This commit is contained in:
tb 2021-12-04 09:10:30 +00:00
parent d44fc7f481
commit 510b915c9f
2 changed files with 25 additions and 1 deletions

View File

@ -1,9 +1,10 @@
# $OpenBSD: Makefile,v 1.10 2021/05/26 20:32:38 jeremy Exp $
# $OpenBSD: Makefile,v 1.11 2021/12/04 09:10:30 tb Exp $
COMMENT = simple, fast, threaded webserver for rack applications
DISTNAME = puma-5.3.2
CATEGORIES = www
REVISION = 0
HOMEPAGE = https://puma.io/

View File

@ -0,0 +1,23 @@
$OpenBSD: patch-ext_puma_http11_mini_ssl_c,v 1.1 2021/12/04 09:10:30 tb Exp $
Fix build with Opaque DH in LibreSSL 3.5.
Index: ext/puma_http11/mini_ssl.c
--- ext/puma_http11/mini_ssl.c.orig
+++ ext/puma_http11/mini_ssl.c
@@ -91,13 +91,13 @@ DH *get_dh2048() {
static unsigned char dh2048_g[] = { 0x02 };
DH *dh;
-#if !(OPENSSL_VERSION_NUMBER < 0x10100005L || defined(LIBRESSL_VERSION_NUMBER))
+#if !(OPENSSL_VERSION_NUMBER < 0x10100005L)
BIGNUM *p, *g;
#endif
dh = DH_new();
-#if OPENSSL_VERSION_NUMBER < 0x10100005L || defined(LIBRESSL_VERSION_NUMBER)
+#if OPENSSL_VERSION_NUMBER < 0x10100005L
dh->p = BN_bin2bn(dh2048_p, sizeof(dh2048_p), NULL);
dh->g = BN_bin2bn(dh2048_g, sizeof(dh2048_g), NULL);