Python SSL handshake failure

8 posts / 0 new
Last post
walkero
walkero's picture
Offline
Last seen: 1 week 5 days ago
Joined: 2009-05-03 16:54
Python SSL handshake failure

You might know my aiostreams package, which were released some time ago. All the scripts work great by getting data from websites and APIs with urilib2. And all the URLs I access are SSL secured.

Last weekend I worked on a script about dlive.tv website. It works just fine on other systems, like Linux, but under AmigaOS 4 I get the following error

<urlopen error (1, 'error:14094410:SSL routines:ssl3_read_bytes:sslv3 alert handshake failure')>

This seems to be an error that has to do with the false website SSL setup. People that had the same issue most of the times switched to requests module, which unfortunately is not available on our system.

Did anyone have the same issue before? If yes, how did you solve it?

Looking forward to find a good solution on that, so that this streaming network is supported on AmigaOS 4.

Thank you for your help.

broadblues
broadblues's picture
Offline
Last seen: 1 week 3 days ago
Joined: 2012-05-02 21:48
Re: Python SSL handshake failure

Silly question: have you installed http://os4depot.net/?function=showfile&file=library/misc/pythonssl.lha ?

broadblues
broadblues's picture
Offline
Last seen: 1 week 3 days ago
Joined: 2012-05-02 21:48
Re: Python SSL handshake failure

Have you tried the http2lib in the AOrganiser package? If you don't have that I can send you the modules.

Hans
Hans's picture
Offline
Last seen: 2 weeks 3 days ago
Joined: 2010-12-09 22:04
Re: Python SSL handshake failure

That error message could be an indication that the OpenSSL/AmiSSL version you're using is too old. Servers disable old versions of the SSL/TLS protocol and old ciphers that have known security loopholes.

No idea whether our Python implementation uses AmiSSL or an OpenSSL lib, but it's worth checking if you can update it.

Hans

http://hdrlab.org.nz/ - Amiga OS 4 projects, programming articles and more. Home of the RadeonHD driver for Amiga OS 4.x project. http://keasigmadelta.co.nz/ - more of my software.
walkero
walkero's picture
Offline
Last seen: 1 week 5 days ago
Joined: 2009-05-03 16:54
Re: Python SSL handshake failure

Thank you both for your replies.

@broadblues
I have pythonssl installed, but I didn't try http2lib, but I will try it. Does pythonssl use the latest versions of AmiSSL 4 automatically, or it needs updates?

@hans
You are right, but I wonder. Websites like Youtube, Mixer.co and Twitch.tv, that are huge, with huge companies behind them, they are working just fine, but not dlive.tv. I guess that if it had to do with security matters, they would not work at all. I believe that there might be a misconfiguration from their part.

broadblues
broadblues's picture
Offline
Last seen: 1 week 3 days ago
Joined: 2012-05-02 21:48
Re: Python SSL handshake failure

No idea whether our Python implementation uses AmiSSL or an OpenSSL lib, but it's worth checking if you can update it.

The basic install doersn't use SSL at all (ie not implmented) my "third party" build of the python ssl libs uses AmiSSL 4

broadblues
broadblues's picture
Offline
Last seen: 1 week 3 days ago
Joined: 2012-05-02 21:48
Re: Python SSL handshake failure

Good question, try the attached... which has been built with the latest AmiSSL SDK.

As to more common sites working they may not enforce maximum security in all cases so as to maximise their audience. PayPal for example has threatened to upgrade for ages but progress is slow as the bulk of the apps using it lag behind development wise.

File attachments: 

AttachmentSize
File pythonssl.lha109.28 KB
walkero
walkero's picture
Offline
Last seen: 1 week 5 days ago
Joined: 2009-05-03 16:54
Re: Python SSL handshake failure

@broadblues
Thank you for creating this version. Unfortunately the specific website doesn't work, giving the same error. But it is good to have a newer version. I saw that the files have different size than the previous ones, so something changed there for sure.

For now I solved that problem with a workaround, by using my own API website, which gets the data I need and returns them to the script. And it works great.

The best thing would be to have sometime at least python 2.7 in our systems and use requests2. That would be sweet.

Thank you again for your help.

Log in or register to post comments