summaryrefslogtreecommitdiff
path: root/usr.sbin/smtpd
diff options
context:
space:
mode:
authorGilles Chehade <gilles@cvs.openbsd.org>2015-11-30 14:32:01 +0000
committerGilles Chehade <gilles@cvs.openbsd.org>2015-11-30 14:32:01 +0000
commit3965ac6e87c6a9088036601ce49cf8846f301da5 (patch)
tree7703d6cd9227c487f79632f3ecb1b390b05d18ae /usr.sbin/smtpd
parentfdf6f91a0f54ca501fc917eb31f327449a22e1bf (diff)
if a ca_name is set, dump it to on-disk envelope so we recall it on reload.
we don't set ca_name yet, it is part of a larger diff i'm splitting
Diffstat (limited to 'usr.sbin/smtpd')
-rw-r--r--usr.sbin/smtpd/envelope.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/usr.sbin/smtpd/envelope.c b/usr.sbin/smtpd/envelope.c
index a64caa7da4d..6a5d67de087 100644
--- a/usr.sbin/smtpd/envelope.c
+++ b/usr.sbin/smtpd/envelope.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: envelope.c,v 1.33 2015/11/30 12:26:55 sunil Exp $ */
+/* $OpenBSD: envelope.c,v 1.34 2015/11/30 14:32:00 gilles Exp $ */
/*
* Copyright (c) 2013 Eric Faurot <eric@openbsd.org>
@@ -220,6 +220,7 @@ envelope_dump_buffer(const struct envelope *ep, char *dest, size_t len)
envelope_ascii_dump(ep, &dest, &len, "mta-relay");
envelope_ascii_dump(ep, &dest, &len, "mta-relay-auth");
envelope_ascii_dump(ep, &dest, &len, "mta-relay-cert");
+ envelope_ascii_dump(ep, &dest, &len, "mta-relay-ca");
envelope_ascii_dump(ep, &dest, &len, "mta-relay-flags");
envelope_ascii_dump(ep, &dest, &len, "mta-relay-heloname");
envelope_ascii_dump(ep, &dest, &len, "mta-relay-helotable");
@@ -510,6 +511,10 @@ ascii_load_field(const char *field, struct envelope *ep, char *buf)
return ascii_load_string(ep->agent.mta.relay.pki_name, buf,
sizeof ep->agent.mta.relay.pki_name);
+ if (strcasecmp("mta-relay-ca", field) == 0)
+ return ascii_load_string(ep->agent.mta.relay.ca_name, buf,
+ sizeof ep->agent.mta.relay.ca_name);
+
if (strcasecmp("mta-relay-flags", field) == 0)
return ascii_load_mta_relay_flags(&ep->agent.mta.relay.flags, buf);
@@ -839,6 +844,10 @@ ascii_dump_field(const char *field, const struct envelope *ep,
return ascii_dump_string(ep->agent.mta.relay.pki_name,
buf, len);
+ if (strcasecmp(field, "mta-relay-ca") == 0)
+ return ascii_dump_string(ep->agent.mta.relay.ca_name,
+ buf, len);
+
if (strcasecmp(field, "mta-relay-flags") == 0)
return ascii_dump_mta_relay_flags(ep->agent.mta.relay.flags,
buf, len);