Skip to content
This repository has been archived by the owner on Jul 19, 2022. It is now read-only.

SSL error #27

Open
fgpietersz opened this issue Sep 13, 2014 · 3 comments
Open

SSL error #27

fgpietersz opened this issue Sep 13, 2014 · 3 comments

Comments

@fgpietersz
Copy link

pypodio2 with httplib2 0.9 (same with 0.8) and Python 3.4 gives me the error below which is related to: https://github.com/jcgregorio/httplib2/issues/173

/home/[username]/[path]/pypodio2/api.py in OAuthAppClient(client_id, client_secret, app_id, app_token, user_agent, domain)
     18 
     19     auth = transport.OAuthAppAuthorization(app_id, app_token,
---> 20     client_id, client_secret, domain)
     21
     22     return AuthorizingClient(domain, auth, user_agent=user_agent)

/home/[username]/[path]/pypodio2/transport.py in __init__(self, app_id, app_token, key, secret, domain)
     60         headers = {'content-type':'application/x-www-form-urlencoded'}
     61         response, data = h.request(domain + "/oauth/token", "POST",
---> 62                                   urlencode(body), headers=headers)
     63         if response['status'] == '200':
     64              self.token = OAuthToken(_handle_response(response, data))

/usr/local/lib/python3.4/dist-packages/httplib2/__init__.py in request(self, uri, method, body, headers, redirections, connection_type)
   1172                                 ca_certs=self.ca_certs,
   1173                                 disable_ssl_certificate_validation=
-> 1174                                         self.disable_ssl_certificate_validation)
   1175                 else:
   1176                     conn = self.connections[conn_key] = connection_type(

/usr/local/lib/python3.4/dist-packages/httplib2/__init__.py in __init__(self, host, port, key_file, cert_file, timeout, proxy_info, ca_certs, disable_ssl_certificate_validation)
    827                 self, host, port=port, key_file=key_file,
    828                 cert_file=cert_file, timeout=timeout, context=context,
--> 829                 check_hostname=True)
    830
    831

/usr/lib/python3.4/http/client.py in __init__(self, host, port, key_file, cert_file, timeout, source_address, context, check_hostname)
   1209                 check_hostname = will_verify
   1210             elif check_hostname and not will_verify:
-> 1211                 raise ValueError("check_hostname needs a SSL context with "
   1212                                  "either CERT_OPTIONAL or CERT_REQUIRED")
   1213             if key_file or cert_file:

ValueError: check_hostname needs a SSL context with either CERT_OPTIONAL or CERT_REQUIRED
@r14c
Copy link
Contributor

r14c commented Nov 24, 2014

I'm seeing the same issue

@gmcguire
Copy link

👍

gmcguire added a commit to gmcguire/podio-py that referenced this issue Jul 23, 2015
This fixes issue podio#27. As far as I can tell api.podio.com has a perfectly valid SSL certificate.
kwilcox added a commit to kwilcox/podio-py that referenced this issue Mar 14, 2016
@uwekamper
Copy link

I was able to make it work by upgrading vom httplib2-0.9.2 to httplib2-0.10.3 by running pip install httplib2 --upgrade in the affected virtualenv.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants