Skip to content
This repository was archived by the owner on Jan 13, 2021. It is now read-only.
This repository was archived by the owner on Jan 13, 2021. It is now read-only.

_ssl.c errors #333

Description

@KOLANICH

en.wikipedia.org -> _ssl.c:733: The handshake operation timed out
github.com, google.com, yandex.ru -> SSLError: [SSL: UNKNOWN_PROTOCOL] unknown protocol (_ssl.c:749)
twitter.com -> SSLEOFError: EOF occured in violation of protocol (_ssl.c:749)

Activity

  1. Lukasa commented on Jul 4, 2017

    @Lukasa
    Member

    In all of these cases it's very hard to know without additional details what's going on. What version of Python and OpenSSL are you using?

  2. KOLANICH commented on Jul 4, 2017

    @KOLANICH
    ContributorAuthor

    Anaconda custom-py36_0 based on 4.4.0-np112py36_1 x86 (32 bit) (just fully updated that version)
    python 3.6.1.final.0

  3. Lukasa commented on Jul 4, 2017

    @Lukasa
    Member

    What about OpenSSL?

  4. KOLANICH commented on Jul 4, 2017

    @KOLANICH
    ContributorAuthor

    openssl 1.0.2l (as reported by conda list openssl)

  5. Lukasa commented on Jul 4, 2017

    @Lukasa
    Member

    Hrm. Can you show me some sample code that reproduces the issue?

  6. KOLANICH commented on Jul 4, 2017

    @KOLANICH
    ContributorAuthor
  7. Lukasa commented on Jul 4, 2017

    @Lukasa
    Member

    Hrm, this is not obviously problematic. Are you familiar with Wireshark? If you are, it'd be helpful to see the pcap for one of these failing transactions.

  8. KostyaEsmukov commented on Jul 31, 2017

    @KostyaEsmukov
    Contributor

    You need to specify a port along with hostname.

    --- t.original.py	2017-07-31 14:41:55.000000000 +0300
    +++ t.fixed.py	2017-07-31 14:43:29.000000000 +0300
    @@ -2,11 +2,13 @@
     from urllib.parse import urlparse
     from hyper import HTTPConnection
    
    +default_port = dict(http=80, https=443)
    +
     def makeActualReq(uri, referer=None, maxRedirects=10):
     	if maxRedirects<=0:
     		raise Exception("Redirects limit reached")
     	u=urlparse(uri)
    -	with HTTPConnection(u.hostname, secure=(u.scheme=="https")) as conn:
    +	with HTTPConnection(u.hostname, port=(u.port or default_port.get(u.scheme.lower())), secure=(u.scheme=="https")) as conn:
     		#print(u.path)
     		conn.request('GET', u.path)
     		resp=conn.get_response()
    
  9. KOLANICH commented on Jul 31, 2017

    @KOLANICH
    ContributorAuthor

    Thank you, it looks like HTTP11Connection should be modified.

  10. peterbe commented on Apr 24, 2019

    @peterbe

    Thanks for that tip @KostyaEsmukov
    It helped me here: #408 (comment)

  11. peterbe commented on Apr 24, 2019

    @peterbe

    See this comment: #407 (comment)

    I was running pytest with hyper in Python 3.7 and was getting that SSL warning. But as soon as I installed ndg-httpsclient that (same) SSL error disappeared.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions