Skip to content

Commit

Permalink
Merge pull request #2 from modille/master
Browse files Browse the repository at this point in the history
Add certificate verification
  • Loading branch information
zchee authored Jul 27, 2018
2 parents a361138 + 7f5fca3 commit 20873fa
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion rplugin/python3/deoplete/dockerhub/dockerhub/dockerhub.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import ujson as json
except ImportError:
import json
import certifi
import urllib3


Expand All @@ -16,7 +17,9 @@ def __init__(self, url=None, version=None):
self.url = url or '{0}/{1}'.format(
'https://hub.docker.com', self.version
)
self.http = urllib3.PoolManager()
self.http = urllib3.PoolManager(
cert_reqs='CERT_REQUIRED',
ca_certs=certifi.where())

def _request(self, path):
return self.http.request('GET', '{0}/{1}/'.format(self.url, path))
Expand Down

0 comments on commit 20873fa

Please sign in to comment.