Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #88870 > unrolled thread
| Started by | Cecil Westerhof <Cecil@decebal.nl> |
|---|---|
| First post | 2015-04-12 19:48 +0200 |
| Last post | 2015-04-12 21:46 +0000 |
| Articles | 4 — 2 participants |
Back to article view | Back to comp.lang.python
Getting rid of Cecil Westerhof <Cecil@decebal.nl> - 2015-04-12 19:48 +0200
Re: Getting rid of Denis McMahon <denismfmcmahon@gmail.com> - 2015-04-12 18:54 +0000
Re: Getting rid of Cecil Westerhof <Cecil@decebal.nl> - 2015-04-12 21:27 +0200
Re: Getting rid of Denis McMahon <denismfmcmahon@gmail.com> - 2015-04-12 21:46 +0000
| From | Cecil Westerhof <Cecil@decebal.nl> |
|---|---|
| Date | 2015-04-12 19:48 +0200 |
| Subject | Getting rid of |
| Message-ID | <87k2xh9r0a.fsf@Equus.decebal.nl> |
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
[toc] | [next] | [standalone]
| From | Denis McMahon <denismfmcmahon@gmail.com> |
|---|---|
| Date | 2015-04-12 18:54 +0000 |
| Message-ID | <mgef0d$rpd$1@dont-email.me> |
| In reply to | #88870 |
On Sun, 12 Apr 2015 19:48:53 +0200, Cecil Westerhof wrote: > 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) Have you checked that your certificates file exists? You can find the location using the python console: $ python >>> import certifi >>> certifi.where() '/usr/local/lib/python2.7/dist-packages/certifi/cacert.pem' >>> exit() And then check the location from the command line: $ ls -l /usr/local/lib/python2.7/dist-packages/certifi/cacert.pem -rw-r--r-- 1 root staff 315159 Apr 12 19:46 /usr/local/lib/python2.7/dist- packages/certifi/cacert.pem $ -- Denis McMahon, denismfmcmahon@gmail.com
[toc] | [prev] | [next] | [standalone]
| From | Cecil Westerhof <Cecil@decebal.nl> |
|---|---|
| Date | 2015-04-12 21:27 +0200 |
| Message-ID | <87fv859mfx.fsf@Equus.decebal.nl> |
| In reply to | #88871 |
Op Sunday 12 Apr 2015 20:54 CEST schreef Denis McMahon:
> On Sun, 12 Apr 2015 19:48:53 +0200, Cecil Westerhof wrote:
>
>> 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)
>
> Have you checked that your certificates file exists? You can find
> the location using the python console:
>
> $ python
>
>>>> import certifi
>>>> certifi.where()
>
> '/usr/local/lib/python2.7/dist-packages/certifi/cacert.pem'
>
>>>> exit()
>
> And then check the location from the command line:
>
> $ ls -l /usr/local/lib/python2.7/dist-packages/certifi/cacert.pem
>
> -rw-r--r-- 1 root staff 315159 Apr 12 19:46
> /usr/local/lib/python2.7/dist- packages/certifi/cacert.pem
It is another location, but it does exist and has the same lenght as
yours, so probably it is OK:
-rw-r--r-- 1 root root 315159 Apr 11 20:43 /usr/lib/python2.7/site-packages/certifi/cacert.pem
When you run my script you do not get warnings?
--
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof
[toc] | [prev] | [next] | [standalone]
| From | Denis McMahon <denismfmcmahon@gmail.com> |
|---|---|
| Date | 2015-04-12 21:46 +0000 |
| Message-ID | <mgep48$seg$1@dont-email.me> |
| In reply to | #88874 |
On Sun, 12 Apr 2015 21:27:30 +0200, Cecil Westerhof wrote: > When you run my script you do not get warnings? I ran into too many issues trying to install the modules I needed to try and run it. -- Denis McMahon, denismfmcmahon@gmail.com
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.python
csiph-web