-/* $OpenBSD: mta.c,v 1.240 2021/06/14 17:58:15 eric Exp $ */
+/* $OpenBSD: mta.c,v 1.241 2022/02/10 14:59:35 millert Exp $ */
/*
* Copyright (c) 2008 Pierre-Yves Ritschard <pyr@openbsd.org>
== -1)
fatal("tls_config_set_ca_file");
- if (remote->tls_noverify) {
+ if (remote->tls_verify) {
+ tls_config_verify(config);
+ } else {
tls_config_insecure_noverifycert(config);
tls_config_insecure_noverifyname(config);
tls_config_insecure_noverifytime(config);
}
- else
- tls_config_verify(config);
remote->tls_config = config;
}
if (!key.authlabel[0])
key.authlabel = NULL;
- if ((key.tls == RELAY_TLS_STARTTLS || key.tls == RELAY_TLS_SMTPS) &&
- dispatcher->u.remote.tls_noverify == 0)
- key.flags |= RELAY_TLS_VERIFY;
-
if ((r = SPLAY_FIND(mta_relay_tree, &relays, &key)) == NULL) {
r = xcalloc(1, sizeof *r);
TAILQ_INIT(&r->tasks);
-/* $OpenBSD: mta_session.c,v 1.144 2021/07/28 19:39:50 benno Exp $ */
+/* $OpenBSD: mta_session.c,v 1.145 2022/02/10 14:59:35 millert Exp $ */
/*
* Copyright (c) 2008 Pierre-Yves Ritschard <pyr@openbsd.org>
log_info("%016"PRIx64" mta tls ciphers=%s",
s->id, tls_to_text(io_tls(s->io)));
s->flags |= MTA_TLS;
- if (!s->relay->dispatcher->u.remote.tls_noverify)
+ if (s->relay->dispatcher->u.remote.tls_verify)
s->flags |= MTA_TLS_VERIFIED;
mta_tls_started(s);
-/* $OpenBSD: parse.y,v 1.290 2021/10/15 15:01:29 naddy Exp $ */
+/* $OpenBSD: parse.y,v 1.291 2022/02/10 14:59:35 millert Exp $ */
/*
* Copyright (c) 2008 Gilles Chehade <gilles@poolp.org>
}
dsp->u.remote.tls_required = 1;
+ dsp->u.remote.tls_verify = 1;
}
| TLS NO_VERIFY {
if (dsp->u.remote.tls_required == 1) {
}
dsp->u.remote.tls_required = 1;
- dsp->u.remote.tls_noverify = 1;
}
| AUTH tables {
struct table *t = $2;
-/* $OpenBSD: smtpd.h,v 1.671 2021/09/22 17:12:34 eric Exp $ */
+/* $OpenBSD: smtpd.h,v 1.672 2022/02/10 14:59:35 millert Exp $ */
/*
* Copyright (c) 2008 Gilles Chehade <gilles@poolp.org>
#define RELAY_AUTH 0x08
#define RELAY_LMTP 0x80
-#define RELAY_TLS_VERIFY 0x200
#define MTA_EXT_DSN 0x400
char *auth;
int tls_required;
- int tls_noverify;
+ int tls_verify;
char *tls_protocols;
char *tls_ciphers;