diff options
author | Sunil Nimmagadda <sunil@cvs.openbsd.org> | 2015-12-12 10:26:58 +0000 |
---|---|---|
committer | Sunil Nimmagadda <sunil@cvs.openbsd.org> | 2015-12-12 10:26:58 +0000 |
commit | e68e8138e22f4a3a572926fd5709a795d780066f (patch) | |
tree | c1b81dbc4d44a5c66d10e1619eb5d8483a633378 | |
parent | a2556d3e41f9ba6635d3b4fdbc5a4abc88afed8d (diff) |
In the configuration test mode (smtpd -n) setup queue crypto iff a
valid queue key is specified.
Ok gilles@ jung@
-rw-r--r-- | usr.sbin/smtpd/smtpd.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/usr.sbin/smtpd/smtpd.c b/usr.sbin/smtpd/smtpd.c index 635918786d6..154c952777f 100644 --- a/usr.sbin/smtpd/smtpd.c +++ b/usr.sbin/smtpd/smtpd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: smtpd.c,v 1.262 2015/12/11 07:44:59 sunil Exp $ */ +/* $OpenBSD: smtpd.c,v 1.263 2015/12/12 10:26:57 sunil Exp $ */ /* * Copyright (c) 2008 Gilles Chehade <gilles@poolp.org> @@ -578,6 +578,12 @@ main(int argc, char *argv[]) errx(1, "config file exceeds PATH_MAX"); if (env->sc_opts & SMTPD_OPT_NOACTION) { + if (env->sc_queue_key && + crypto_setup(env->sc_queue_key, + strlen(env->sc_queue_key)) == 0) { + fatalx("crypto_setup:" + "invalid key for queue encryption"); + } load_pki_tree(); load_pki_keys(); fprintf(stderr, "configuration OK\n"); |