Re: [PATCH V2 STABLE 🚑] mail: actually use the verifycert config value

Augie Fackler raf at durin42.com
Thu Nov 6 08:43:44 CST 2014


On Nov 6, 2014, at 4:32 AM, Pierre-Yves David <pierre-yves.david at ens-lyon.org> wrote:

> # HG changeset patch
> # User Pierre-Yves David <pierre-yves.david at fb.com>
> # Date 1415212299 0
> #      Wed Nov 05 18:31:39 2014 +0000
> # Branch stable
> # Node ID aa6436f89b88f05584d500ec3d5e30180e3d4d88
> # Parent  c35ffa4249cab47a1e089a30bc16fc65a0727f48
> mail: actually use the verifycert config value

Queued for stable, thanks.

> 
> The mail module only verify 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' and equivalent for 'loose'.
> 
> This changeset fixes it.
> 
> diff --git a/mercurial/mail.py b/mercurial/mail.py
> --- a/mercurial/mail.py
> +++ b/mercurial/mail.py
> @@ -102,10 +102,11 @@ def _smtp(ui):
>     verifycert = ui.config('smtp', 'verifycert', 'strict')
>     if verifycert not in ['strict', 'loose']:
>         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:
>         sslkwargs = {}
>     if smtps:
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel



More information about the Mercurial-devel mailing list