windows 8 versus urllib2 certificate verify

Robin Becker robin at reportlab.com
Tue Sep 12 09:05:33 EDT 2017


On 12/09/2017 08:35, dieter wrote:
> Robin Becker <robin at reportlab.com> writes:
> Certificate verification generally depends on local configuration:
> specifically, the set of installed trusted root certificates.
> 
> I do not know about Windows, but often the root certificates installed
> for other packages, e.g. the browser, are used. And different
> versions of the same package may install different sets of trusted
> certificates. It might also be that your new environment lacks
> one of the packages from your old environment - and it has provided
> the required root certificate.
> 
> 
> Of course, the problem might also be caused by a general problem.
> Try to access a "common" https site via urllib2, one you do not have
> any problems to connect with a browser (or another "http" utility
> like "wget" or "curl") from the same machines.
> If this works, the problem is assiciated with the specific certificate.
> 
The certs are fine at least in all the browsers I have access to.

It's pretty hard to use the python that's built in to a pyinstaller exe so I 
have used the certifi method and passed certifi.where() into the urlopen calls.

That seems to work, but obviously if the compiled in root certs become too old 
problems will recur.
-- 
Robin Becker




More information about the Python-list mailing list