[nginx] Mail: added Auth-SSL header to indicate SSL.
Maxim Dounin
mdounin at mdounin.ru
Wed Feb 25 14:58:31 UTC 2015
details: http://hg.nginx.org/nginx/rev/3b3f789655dc
branches:
changeset: 5988:3b3f789655dc
user: Maxim Dounin <mdounin at mdounin.ru>
date: Wed Feb 25 17:47:49 2015 +0300
description:
Mail: added Auth-SSL header to indicate SSL.
Based on a patch by Filipe da Silva.
diffstat:
src/mail/ngx_mail_auth_http_module.c | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diffs (29 lines):
diff --git a/src/mail/ngx_mail_auth_http_module.c b/src/mail/ngx_mail_auth_http_module.c
--- a/src/mail/ngx_mail_auth_http_module.c
+++ b/src/mail/ngx_mail_auth_http_module.c
@@ -1173,6 +1173,9 @@ ngx_mail_auth_http_create_request(ngx_ma
+ sizeof("Auth-SMTP-Helo: ") - 1 + s->smtp_helo.len + sizeof(CRLF) - 1
+ sizeof("Auth-SMTP-From: ") - 1 + s->smtp_from.len + sizeof(CRLF) - 1
+ sizeof("Auth-SMTP-To: ") - 1 + s->smtp_to.len + sizeof(CRLF) - 1
+#if (NGX_MAIL_SSL)
+ + sizeof("Auth-SSL: on" CRLF) - 1
+#endif
+ ahcf->header.len
+ sizeof(CRLF) - 1;
@@ -1255,6 +1258,15 @@ ngx_mail_auth_http_create_request(ngx_ma
}
+#if (NGX_MAIL_SSL)
+
+ if (s->connection->ssl) {
+ b->last = ngx_cpymem(b->last, "Auth-SSL: on" CRLF,
+ sizeof("Auth-SSL: on" CRLF) - 1);
+ }
+
+#endif
+
if (ahcf->header.len) {
b->last = ngx_copy(b->last, ahcf->header.data, ahcf->header.len);
}
More information about the nginx-devel
mailing list