aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDag-Erling Smørgrav <des@FreeBSD.org>2023-10-27 09:16:29 +0000
committerDag-Erling Smørgrav <des@FreeBSD.org>2023-10-27 09:16:43 +0000
commite11bc472633868a658ecbb8176b2b3ede4ae6e0d (patch)
tree6d83d52e27e8a8d986aabd3003f9d121eaef2e6b
parent19f40054803cbe761265a9b4f3e7e7dccc2d2dd5 (diff)
downloadports-e11bc472633868a658ecbb8176b2b3ede4ae6e0d.tar.gz
ports-e11bc472633868a658ecbb8176b2b3ede4ae6e0d.zip
mail/opensmtpd: Use the correct OpenSSL idiom to load the trust store.
Fixes: bde578cbfcf9 PR: 274322 MFH: 2023Q4 Approved by: fluffy Differential Revision: https://reviews.freebsd.org/D42123
-rw-r--r--mail/opensmtpd/Makefile2
-rw-r--r--mail/opensmtpd/files/patch-mk_smtpd_Makefile.in6
-rw-r--r--mail/opensmtpd/files/patch-openbsd-compat_libtls_tls.c16
3 files changed, 20 insertions, 4 deletions
diff --git a/mail/opensmtpd/Makefile b/mail/opensmtpd/Makefile
index 771230a5b80e..4bf5a859e556 100644
--- a/mail/opensmtpd/Makefile
+++ b/mail/opensmtpd/Makefile
@@ -1,6 +1,6 @@
PORTNAME= opensmtpd
PORTVERSION= 7.3.0
-PORTREVISION= 1
+PORTREVISION= 2
DISTVERSIONSUFFIX= p2
PORTEPOCH= 1
CATEGORIES= mail
diff --git a/mail/opensmtpd/files/patch-mk_smtpd_Makefile.in b/mail/opensmtpd/files/patch-mk_smtpd_Makefile.in
index e1597ed92f0e..3604c0868c76 100644
--- a/mail/opensmtpd/files/patch-mk_smtpd_Makefile.in
+++ b/mail/opensmtpd/files/patch-mk_smtpd_Makefile.in
@@ -1,8 +1,8 @@
---- mk/smtpd/Makefile.in.orig 2019-10-26 11:56:36 UTC
+--- mk/smtpd/Makefile.in.orig 2023-09-16 18:13:47 UTC
+++ mk/smtpd/Makefile.in
-@@ -1404,13 +1404,7 @@ install-exec-hook: $(CONFIGFILES) $(MANPAGES)
- $(MKDIR_P) $(DESTDIR)$(bindir)
+@@ -1471,13 +1471,7 @@ install-exec-hook: $(CONFIGFILES) $(MANPAGES)
$(MKDIR_P) $(DESTDIR)$(mandir)/$(mansubdir)5
+ $(MKDIR_P) $(DESTDIR)$(mandir)/$(mansubdir)7
$(MKDIR_P) $(DESTDIR)$(mandir)/$(mansubdir)8
-
- @if [ ! -f $(DESTDIR)$(sysconfdir)/smtpd.conf ]; then \
diff --git a/mail/opensmtpd/files/patch-openbsd-compat_libtls_tls.c b/mail/opensmtpd/files/patch-openbsd-compat_libtls_tls.c
new file mode 100644
index 000000000000..cd033b41dace
--- /dev/null
+++ b/mail/opensmtpd/files/patch-openbsd-compat_libtls_tls.c
@@ -0,0 +1,16 @@
+--- openbsd-compat/libtls/tls.c.orig 2023-09-16 18:11:28 UTC
++++ openbsd-compat/libtls/tls.c
+@@ -584,10 +584,10 @@ tls_configure_ssl_verify(struct tls *ctx, SSL_CTX *ssl
+
+ /* If no CA has been specified, attempt to load the default. */
+ if (ctx->config->ca_mem == NULL && ctx->config->ca_path == NULL) {
+- if (tls_config_load_file(&ctx->error, "CA", tls_default_ca_cert_file(),
+- &ca_mem, &ca_len) != 0)
++ if (!SSL_CTX_set_default_verify_paths(ssl_ctx)) {
++ tls_set_error(ctx, "failed to load default trust store");
+ goto err;
+- ca_free = ca_mem;
++ }
+ }
+
+ if (ca_mem != NULL) {