diff options
author | Jacek Masiulaniec <jacekm@cvs.openbsd.org> | 2009-05-19 11:42:53 +0000 |
---|---|---|
committer | Jacek Masiulaniec <jacekm@cvs.openbsd.org> | 2009-05-19 11:42:53 +0000 |
commit | 4579f9e8556f4837002ef10b9409bc7857688c25 (patch) | |
tree | de2e131f6811cd72eae2f94c35dfe56a17a373a7 /usr.sbin/smtpd/smtpd.h | |
parent | 65424ed6191c108c9522ceb76fb060bf2a3dccc1 (diff) |
- Don't advertise nor accept STARTTLS command when session is secure.
- Make the condition when STARTTLS and AUTH are advertised & accepted
more readable.
ok gilles@
Diffstat (limited to 'usr.sbin/smtpd/smtpd.h')
-rw-r--r-- | usr.sbin/smtpd/smtpd.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/usr.sbin/smtpd/smtpd.h b/usr.sbin/smtpd/smtpd.h index 6d5d7540009..c2e785db5d5 100644 --- a/usr.sbin/smtpd/smtpd.h +++ b/usr.sbin/smtpd/smtpd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: smtpd.h,v 1.110 2009/05/19 11:37:44 jacekm Exp $ */ +/* $OpenBSD: smtpd.h,v 1.111 2009/05/19 11:42:52 jacekm Exp $ */ /* * Copyright (c) 2008 Gilles Chehade <gilles@openbsd.org> @@ -79,6 +79,11 @@ #define F_AUTH 0x04 #define F_SSL (F_SMTPS|F_STARTTLS) +#define ADVERTISE_TLS(s) \ + ((s)->s_l->flags & F_STARTTLS && !((s)->s_flags & F_SECURE)) + +#define ADVERTISE_AUTH(s) \ + ((s)->s_l->flags & F_AUTH && ((s)->s_flags & F_SECURE)) struct netaddr { struct sockaddr_storage ss; |