Getting rid of

Cecil Westerhof Cecil at decebal.nl
Sun Apr 12 13:48:53 EDT 2015


I am playing a little bit with libturpial. I got a few warnings. Most
I could get rid of, but one I still get, while I have done what is
said in the reference of the warning.

Example code:
    #!/usr/bin/env python
    
    import certifi
    import urllib3
    import urllib3.contrib.pyopenssl
    
    from libturpial.api.core import Core
    
    urllib3.contrib.pyopenssl.inject_into_urllib3()
    
    http = urllib3.PoolManager(
        cert_reqs='CERT_REQUIRED', # Force certificate check.
        ca_certs=certifi.where(),  # Path to the Certifi bundle.
    )
    
    Core()

What should I do to get rid of the warnings:
    /usr/lib/python2.7/site-packages/requests-2.6.0-py2.7.egg/requests/packages/urllib3/connectionpool.py:769: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.org/en/latest/security.html
      InsecureRequestWarning)
    /usr/lib/python2.7/site-packages/requests-2.6.0-py2.7.egg/requests/packages/urllib3/connectionpool.py:769: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.org/en/latest/security.html
      InsecureRequestWarning)
    /usr/lib/python2.7/site-packages/requests-2.6.0-py2.7.egg/requests/packages/urllib3/connectionpool.py:769: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.org/en/latest/security.html
      InsecureRequestWarning)

-- 
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof



More information about the Python-list mailing list