당신은 인증서 확인을 무시 disable_ssl_certificate_validation
를 사용할 수 있습니다 여기 내 코드입니다. 아래 샘플을 확인하십시오. 그러나 다음 버그로 인해 Python 3.x과 작동하지 않습니다. 따라서이 문제에 대한 의견에서 권장하는대로 Python33\Lib\site-packages\httplib2\__init__.py
을 업데이트해야합니다. 파이썬 3.x를위한
HTTPS request doesn't work when disable_ssl_certificate_validation = True
import httplib2
h = httplib2.Http(".cache", disable_ssl_certificate_validation=True)
resp, content = h.request("https://github.com/", "GET")
패치 :
diff --git a/__init__.py b/__init__.py
index 65f90ac..4495994 100644
--- a/__init__.py
+++ b/__init__.py
@@ -823,10 +823,13 @@ class HTTPSConnectionWithTimeout(http.client.HTTPSConnection):
context.load_cert_chain(cert_file, key_file)
if ca_certs:
context.load_verify_locations(ca_certs)
+ check_hostname = True
+ if disable_ssl_certificate_validation:
+ check_hostname = False
http.client.HTTPSConnection.__init__(
self, host, port=port, key_file=key_file,
cert_file=cert_file, timeout=timeout, context=context,
- check_hostname=True)
+ check_hostname=check_hostname)
SCHEME_TO_CONNECTION = {
가능한 매개 변수에 대한 도움말을 보려면, 당신은 단지 [설명서를 참조]에 필요 (http://httplib2.googlecode.com /hg/doc/html/libhttplib2.html#http-objects). 'ctrl-f'를 사용하면 두 번째 질문에 대한 답변도 얻을 수 있습니다. – goncalopp