git: ef3410d93b5d - 2022Q1 - net/relayd: fix build
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 01 Mar 2022 14:21:32 UTC
The branch 2022Q1 has been updated by fernape: URL: https://cgit.FreeBSD.org/ports/commit/?id=ef3410d93b5d57d467404236e8731e6a2da6852c commit ef3410d93b5d57d467404236e8731e6a2da6852c Author: Steve Wills <swills@FreeBSD.org> AuthorDate: 2022-02-25 13:19:12 +0000 Commit: Fernando Apesteguía <fernape@FreeBSD.org> CommitDate: 2022-03-01 14:15:04 +0000 net/relayd: fix build While here, pet linters. PR: 262004 Reported by: swills@FreeBSD.org Approved by: koue@chaosophia.net (maintainer) MFH: 2022Q1 build fix (cherry picked from commit b4d94c7c3d864775002f92322cc978bf522d27b2) --- net/relayd/Makefile | 12 ++++++------ net/relayd/files/patch-relayd_Makefile | 12 ++++++++++++ net/relayd/files/patch-relayd_relay.c | 18 ++++++++++++++++++ net/relayd/files/patch-relayd_relayd.h | 11 +++++++++++ 4 files changed, 47 insertions(+), 6 deletions(-) diff --git a/net/relayd/Makefile b/net/relayd/Makefile index decfb1e6970e..e9cd92faecd0 100644 --- a/net/relayd/Makefile +++ b/net/relayd/Makefile @@ -8,23 +8,23 @@ COMMENT= OpenBSD relay daemon LICENSE= ISCL -GH_ACCOUNT= mmatuska - USES= ssl uidfix USE_GITHUB= yes +GH_ACCOUNT= mmatuska + USE_RC_SUBR= relayd -WRKSRC_SUBDIR= src/usr.sbin +MAKE_ARGS+= BINDIR=${PREFIX}/sbin \ + MANDIR=${PREFIX}/man/man CFLAGS+= -Wall -MAKE_ARGS+= BINDIR=${PREFIX}/sbin \ - MANDIR=${PREFIX}/man/man +WRKSRC_SUBDIR= src/usr.sbin USERS= _relayd GROUPS= _relayd post-install: - @${INSTALL_DATA} ${WRKSRC}/../etc/relayd.conf \ + ${INSTALL_DATA} ${WRKSRC}/../etc/relayd.conf \ ${STAGEDIR}${PREFIX}/etc/relayd.conf.sample .include <bsd.port.pre.mk> diff --git a/net/relayd/files/patch-relayd_Makefile b/net/relayd/files/patch-relayd_Makefile new file mode 100644 index 000000000000..08b89f0f61c9 --- /dev/null +++ b/net/relayd/files/patch-relayd_Makefile @@ -0,0 +1,12 @@ +--- relayd/Makefile.orig 2014-08-10 20:08:47 UTC ++++ relayd/Makefile +@@ -28,8 +28,7 @@ SRCS+= parse.y \ + relay_udp.c \ + relayd.c \ + shuffle.c \ +- ssl.c \ +- ssl_privsep.c ++ ssl.c + + .PATH: ${.CURDIR}/../../../libevent + SRCS+= buffer.c \ diff --git a/net/relayd/files/patch-relayd_relay.c b/net/relayd/files/patch-relayd_relay.c index 42c6745bf485..cb0c2378a152 100644 --- a/net/relayd/files/patch-relayd_relay.c +++ b/net/relayd/files/patch-relayd_relay.c @@ -1,5 +1,23 @@ --- relayd/relay.c.orig 2014-08-10 20:08:47 UTC +++ relayd/relay.c +@@ -2097,7 +2097,7 @@ relay_ssl_ctx_create(struct relay *rlay) + /* Verify the server certificate if we have a CA chain */ + if ((rlay->rl_conf.flags & F_SSLCLIENT) && + (rlay->rl_ssl_ca != NULL)) { +- if (!ssl_ctx_load_verify_memory(ctx, ++ if (!SSL_CTX_load_verify_mem(ctx, + rlay->rl_ssl_ca, rlay->rl_conf.ssl_ca_len)) + goto err; + SSL_CTX_set_verify(ctx, SSL_VERIFY_PEER, NULL); +@@ -2107,7 +2107,7 @@ relay_ssl_ctx_create(struct relay *rlay) + return (ctx); + + log_debug("%s: loading certificate", __func__); +- if (!ssl_ctx_use_certificate_chain(ctx, ++ if (!SSL_CTX_use_certificate_chain_mem(ctx, + rlay->rl_ssl_cert, rlay->rl_conf.ssl_cert_len)) + goto err; + @@ -2716,12 +2716,12 @@ relay_load_certfiles(struct relay *rlay) return (-1); diff --git a/net/relayd/files/patch-relayd_relayd.h b/net/relayd/files/patch-relayd_relayd.h index a3b511623af1..cbde779fb369 100644 --- a/net/relayd/files/patch-relayd_relayd.h +++ b/net/relayd/files/patch-relayd_relayd.h @@ -49,3 +49,14 @@ /* Attach the control socket to the following process */ #define PROC_CONTROL PROC_PFE +@@ -1242,10 +1252,6 @@ int ssl_load_pkey(const void *, size_t, char *, off_t + X509 **, EVP_PKEY **); + int ssl_ctx_fake_private_key(SSL_CTX *, const void *, size_t, + char *, off_t, X509 **, EVP_PKEY **); +- +-/* ssl_privsep.c */ +-int ssl_ctx_use_certificate_chain(SSL_CTX *, char *, off_t); +-int ssl_ctx_load_verify_memory(SSL_CTX *, char *, off_t); + + /* ca.c */ + pid_t ca(struct privsep *, struct privsep_proc *);