[PATCH 4 of 4] ssl: remove CERT_REQUIRED constant that was necessary for compatibility

Augie Fackler raf at durin42.com
Fri Jun 5 10:32:33 CDT 2015


On Fri, Jun 05, 2015 at 11:21:23PM +0900, Yuya Nishihara wrote:
> # HG changeset patch
> # User Yuya Nishihara <yuya at tcha.org>
> # Date 1433508344 -32400
> #      Fri Jun 05 21:45:44 2015 +0900
> # Node ID 576ea2cd1fcb8361ec50853727354d1da6ae63fa
> # Parent  4df50cda89ce5cca2846dcef20cb485297ec8e38
> ssl: remove CERT_REQUIRED constant that was necessary for compatibility

These all look wonderful, thanks! Queued with delight.

>
> diff --git a/mercurial/sslutil.py b/mercurial/sslutil.py
> --- a/mercurial/sslutil.py
> +++ b/mercurial/sslutil.py
> @@ -12,7 +12,6 @@ from mercurial import util
>  from mercurial.i18n import _
>
>  _canloaddefaultcerts = False
> -CERT_REQUIRED = ssl.CERT_REQUIRED
>  try:
>      ssl_context = ssl.SSLContext
>      _canloaddefaultcerts = util.safehasattr(ssl_context, 'load_default_certs')
> @@ -144,7 +143,7 @@ def sslkwargs(ui, host):
>          ui.setconfig('web', 'cacerts', cacerts, 'defaultcacerts')
>      if cacerts != '!':
>          kws.update({'ca_certs': cacerts,
> -                    'cert_reqs': CERT_REQUIRED,
> +                    'cert_reqs': ssl.CERT_REQUIRED,
>                      })
>      return kws
>
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> https://selenic.com/mailman/listinfo/mercurial-devel


More information about the Mercurial-devel mailing list