summaryrefslogtreecommitdiff
path: root/usr.sbin/smtpd/smtp_session.c
diff options
context:
space:
mode:
authorGilles Chehade <gilles@cvs.openbsd.org>2015-12-12 10:27:19 +0000
committerGilles Chehade <gilles@cvs.openbsd.org>2015-12-12 10:27:19 +0000
commit0ad343bdc1eb2fe2cc6b4efd5d524db621f4c922 (patch)
treee478ea4234a8c0e07cfbc96479242e0ab5d38785 /usr.sbin/smtpd/smtp_session.c
parente68e8138e22f4a3a572926fd5709a795d780066f (diff)
if ca name not specified, pass hint to lka that a wildcard can match
Diffstat (limited to 'usr.sbin/smtpd/smtp_session.c')
-rw-r--r--usr.sbin/smtpd/smtp_session.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/usr.sbin/smtpd/smtp_session.c b/usr.sbin/smtpd/smtp_session.c
index d2ee0a6723c..6500dacc19c 100644
--- a/usr.sbin/smtpd/smtp_session.c
+++ b/usr.sbin/smtpd/smtp_session.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: smtp_session.c,v 1.247 2015/12/12 10:24:27 gilles Exp $ */
+/* $OpenBSD: smtp_session.c,v 1.248 2015/12/12 10:27:18 gilles Exp $ */
/*
* Copyright (c) 2008 Gilles Chehade <gilles@poolp.org>
@@ -899,12 +899,16 @@ smtp_mfa_response(struct smtp_session *s, int msg, int status, uint32_t code,
if (s->listener->flags & F_SMTPS) {
req_ca_cert.reqid = s->id;
- if (s->listener->pki_name[0])
+ if (s->listener->pki_name[0]) {
(void)strlcpy(req_ca_cert.name, s->listener->pki_name,
sizeof req_ca_cert.name);
- else
+ req_ca_cert.fallback = 0;
+ }
+ else {
(void)strlcpy(req_ca_cert.name, s->smtpname,
sizeof req_ca_cert.name);
+ req_ca_cert.fallback = 1;
+ }
m_compose(p_lka, IMSG_SMTP_TLS_INIT, 0, 0, -1,
&req_ca_cert, sizeof(req_ca_cert));
tree_xset(&wait_ssl_init, s->id, s);