Clean up some LIBRESSL_VERSION_NUMBER patches that either did nothing
or provided functions that are now available in libcrypto. ok gsoares, sthen (for a more aggressive earlier version) I'll revisit the other bits at p2k18.
This commit is contained in:
parent
9d4e548dff
commit
bec5903648
@ -1,10 +1,10 @@
|
||||
# $OpenBSD: Makefile,v 1.90 2018/01/11 19:27:09 rpe Exp $
|
||||
# $OpenBSD: Makefile,v 1.91 2018/04/14 09:05:14 tb Exp $
|
||||
|
||||
COMMENT= SSL encryption wrapper for standard network daemons
|
||||
|
||||
DISTNAME= stunnel-5.44
|
||||
CATEGORIES= security
|
||||
REVISION= 0
|
||||
REVISION= 1
|
||||
|
||||
MAINTAINER= Gleydson Soares <gsoares@openbsd.org>
|
||||
|
||||
@ -25,7 +25,7 @@ CONFIGURE_STYLE= gnu
|
||||
CONFIGURE_ARGS+= --with-ssl=/usr \
|
||||
--disable-libwrap
|
||||
MODGNU_CONFIG_GUESS_DIRS=${WRKSRC}/auto
|
||||
NO_TEST= Yes
|
||||
|
||||
USE_GMAKE= Yes
|
||||
|
||||
pre-configure:
|
||||
|
@ -1,21 +0,0 @@
|
||||
$OpenBSD: patch-src_common_h,v 1.1 2016/11/09 23:14:31 gsoares Exp $
|
||||
--- src/common.h.orig Mon Jun 27 04:29:32 2016
|
||||
+++ src/common.h Thu Nov 3 23:57:29 2016
|
||||
@@ -448,7 +448,7 @@ extern char *sys_errlist[];
|
||||
#define OPENSSL_NO_TLS1_2
|
||||
#endif /* OpenSSL older than 1.0.1 || defined(OPENSSL_NO_TLS1) */
|
||||
|
||||
-#if OPENSSL_VERSION_NUMBER>=0x10100000L
|
||||
+#if OPENSSL_VERSION_NUMBER>=0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)
|
||||
#ifndef OPENSSL_NO_SSL2
|
||||
#define OPENSSL_NO_SSL2
|
||||
#endif /* !defined(OPENSSL_NO_SSL2) */
|
||||
@@ -474,7 +474,7 @@ extern char *sys_errlist[];
|
||||
#include <openssl/des.h>
|
||||
#ifndef OPENSSL_NO_DH
|
||||
#include <openssl/dh.h>
|
||||
-#if OPENSSL_VERSION_NUMBER<0x10100000L
|
||||
+#if OPENSSL_VERSION_NUMBER<0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
|
||||
int DH_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g);
|
||||
#endif /* OpenSSL older than 1.1.0 */
|
||||
#endif /* !defined(OPENSSL_NO_DH) */
|
@ -1,4 +1,4 @@
|
||||
$OpenBSD: patch-src_ssl_c,v 1.7 2017/12/01 00:08:44 gsoares Exp $
|
||||
$OpenBSD: patch-src_ssl_c,v 1.8 2018/04/14 09:05:14 tb Exp $
|
||||
Index: src/ssl.c
|
||||
--- src/ssl.c.orig
|
||||
+++ src/ssl.c
|
||||
@ -11,12 +11,3 @@ Index: src/ssl.c
|
||||
OPENSSL_init_ssl(OPENSSL_INIT_LOAD_SSL_STRINGS |
|
||||
OPENSSL_INIT_LOAD_CRYPTO_STRINGS | OPENSSL_INIT_LOAD_CONFIG, NULL);
|
||||
#else
|
||||
@@ -87,7 +87,7 @@ int ssl_init(void) { /* init TLS before parsing config
|
||||
}
|
||||
|
||||
#ifndef OPENSSL_NO_DH
|
||||
-#if OPENSSL_VERSION_NUMBER<0x10100000L
|
||||
+#if OPENSSL_VERSION_NUMBER<0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
|
||||
/* this is needed for dhparam.c generated with OpenSSL >= 1.1.0
|
||||
* to be linked against the older versions */
|
||||
int DH_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g) {
|
||||
|
@ -1,32 +0,0 @@
|
||||
$OpenBSD: patch-src_tls_c,v 1.1 2017/12/01 00:08:44 gsoares Exp $
|
||||
|
||||
Index: src/tls.c
|
||||
--- src/tls.c.orig
|
||||
+++ src/tls.c
|
||||
@@ -41,7 +41,7 @@
|
||||
volatile int tls_initialized=0;
|
||||
|
||||
NOEXPORT void tls_platform_init();
|
||||
-#if OPENSSL_VERSION_NUMBER<0x10100000L
|
||||
+#if OPENSSL_VERSION_NUMBER<0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
|
||||
NOEXPORT void free_function(void *);
|
||||
#endif
|
||||
|
||||
@@ -52,7 +52,7 @@ void tls_init() {
|
||||
tls_platform_init();
|
||||
tls_initialized=1;
|
||||
ui_tls=tls_alloc(NULL, NULL, "ui");
|
||||
-#if OPENSSL_VERSION_NUMBER>=0x10100000L
|
||||
+#if OPENSSL_VERSION_NUMBER>=0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)
|
||||
CRYPTO_set_mem_functions(str_alloc_detached_debug,
|
||||
str_realloc_detached_debug, str_free_debug);
|
||||
#else
|
||||
@@ -184,7 +184,7 @@ TLS_DATA *tls_get() {
|
||||
|
||||
/**************************************** OpenSSL allocator hook */
|
||||
|
||||
-#if OPENSSL_VERSION_NUMBER<0x10100000L
|
||||
+#if OPENSSL_VERSION_NUMBER<0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
|
||||
NOEXPORT void free_function(void *ptr) {
|
||||
/* CRYPTO_set_mem_ex_functions() needs a function rather than a macro */
|
||||
/* unfortunately, OpenSSL provides no file:line information here */
|
Loading…
x
Reference in New Issue
Block a user