Mercurial > hg
changeset 23223:a4af6fd99fb0 stable
mail: actually use the verifycert config value
The mail module only verifies the smtp ssl certificate if 'verifycert' is enabled
(the default). The 'verifycert' can take three possible values:
- 'strict'
- 'loose'
- any "False" value, eg: 'false' or '0'
We tested the validity of the third value, but never converted it to actual
falseness, making 'False' an equivalent for 'loose'.
This changeset fixes it.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Wed, 05 Nov 2014 18:31:39 +0000 |
parents | a7f25a31e021 |
children | f4ab47ccefde |
files | mercurial/mail.py |
diffstat | 1 files changed, 1 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/mail.py Thu Nov 06 09:36:39 2014 +0100 +++ b/mercurial/mail.py Wed Nov 05 18:31:39 2014 +0000 @@ -104,6 +104,7 @@ if util.parsebool(verifycert) is not False: raise util.Abort(_('invalid smtp.verifycert configuration: %s') % (verifycert)) + verifycert = False if (starttls or smtps) and verifycert: sslkwargs = sslutil.sslkwargs(ui, mailhost) else: