Hello Erwan, On Monday 15 September 2014 07:56:52 Erwan David wrote: > Since urllib3 does not do SNI, I cannot activate verification (the > wrong certificate is retrieved)
urllib3 supports SNI, see here to configure it correctly: http://urllib3.readthedocs.org/en/latest/contrib.html#module-urllib3.contrib.pyopenssl All the required dependencies are in Debian and for Python 2 I put them in Recommends. Are python-ndg-httpsclient, python-openssl and python-pyasn1 installed? > SInce latest versioneach time it is launched I get followibng message: > > /usr/lib/python2.7/dist-packages/urllib3/connectionpool.py:732: > InsecureRequestWarning: Unverified HTTPS request is being made. Adding > certificate verification is strongly advised. See: > https://urllib3.readthedocs.org/en/latest/security.html (This warning will > only appear once by default.) InsecureRequestWarning) This is a new feature of urllib3 1.9. > My only solutions is to drop all errors from script (which is run > hourly from crontab), thus making me unaware of any other problem. > > Id I specify to *not* verify it is because I cannot use it duie to the > limitations of the lib. Can you try, at first, to enable SNI? As I said, urllib3 can do SNI. > So, how can I disable this warning ? You can disable urllib warnings as specified here: https://urllib3.readthedocs.org/en/latest/security.html#insecurerequestwarning But remember that making unverified HTTPS requests is not a good pratice and you can use SNI with urllib3 so I suggest you to enamble it. HTH, -- Daniele Tricoli 'Eriol' http://mornie.org
signature.asc
Description: This is a digitally signed message part.