Python uses old openssl version on OSX #52507

Closed
opened 2017-08-23 15:20:17 +02:00 by Rob Haarsma · 17 comments

System Information
macOS Sierra 10.12.5

Blender Version
Works: Blender 2.79 RC2 WIN 10
Fails: Blender 2.79 RC2 OSX

Short description of error
The user script Blender-Navcam-Importer loads external data from the NASA PDS website. This website recently switched from http to https. Running the script on Windows works OK while the OSX version fails with error message: <urlopen error [SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure>.

This answer on StackOverflow suggests that the culprit is an outdated OpenSSL version. I tested this with both os's and found indeed that the Windows version of Blender uses OpenSSL 1.0.2h while the OSX version uses OpenSSL 0.9.8zh.

Exact steps for others to reproduce the error
Run 'import ssl' and 'print(ssl.OPENSSL_VERSION)' in Blender console. I believe that the failing script will work again on OSX once the OpenSSL version is updated.
Thank you!

**System Information** macOS Sierra 10.12.5 **Blender Version** Works: Blender 2.79 RC2 WIN 10 Fails: Blender 2.79 RC2 OSX **Short description of error** The user script [Blender-Navcam-Importer ](https://github.com/phaseIV/Blender-Navcam-Importer) loads external data from the NASA PDS website. This website recently switched from http to https. Running the script on Windows works OK while the OSX version fails with error message: <urlopen error [SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure>. This answer on [StackOverflow ](https://stackoverflow.com/questions/40257593/python-sslerror-sslv3-alert-handshake-failure-for-wallhaven-cc) suggests that the culprit is an outdated OpenSSL version. I tested this with both os's and found indeed that the Windows version of Blender uses OpenSSL 1.0.2h while the OSX version uses OpenSSL 0.9.8zh. **Exact steps for others to reproduce the error** Run 'import ssl' and 'print(ssl.OPENSSL_VERSION)' in Blender console. I believe that the failing script will work again on OSX once the OpenSSL version is updated. Thank you!
Author

Changed status to: 'Open'

Changed status to: 'Open'
Author

Added subscriber: @phaseIV-3

Added subscriber: @phaseIV-3

Added subscribers: @brecht, @ArtoKitula

Added subscribers: @brecht, @ArtoKitula

MacOS has indeed OpenSSL 0.9.8 @brecht what if we just add homebrew ssl to that 10.6 build? (and you do it or me?)

MacOS has indeed OpenSSL 0.9.8 @brecht what if we just add homebrew ssl to that 10.6 build? (and you do it or me?)

@ArtoKitula I'm not going to update 10.6 libraries anymore, but if you want to do it go ahead.

I'm not sure that a homebrew library will be compatible with 10.6 though, unless there's some homebrew option for deployment targets? I guess we need to build our own static OpenSSL library for Python to link to.

@ArtoKitula I'm not going to update 10.6 libraries anymore, but if you want to do it go ahead. I'm not sure that a homebrew library will be compatible with 10.6 though, unless there's some homebrew option for deployment targets? I guess we need to build our own static OpenSSL library for Python to link to.

@phaseIV-3 Seems that script isn't updated for a while on github, so I didn't try it. But you could try my build that has OpenSSL 1.0.2l, if it works.

@phaseIV-3 Seems that script isn't updated for a while on github, so I didn't try it. But you could try [my build ](https://www.dropbox.com/s/gif8gcgnr68wfr4/blender-master-170823-macOS-10.9.zip?dl=0) that has OpenSSL 1.0.2l, if it works.
Author

Wow, thank you Arto! The script works perfectly with your build, no more handshake issues. Seems the Stackoverflow poster was right about the SSL versioning. Thanks for your efforts!

Wow, thank you Arto! The script works perfectly with your build, no more handshake issues. Seems the Stackoverflow poster was right about the SSL versioning. Thanks for your efforts!

@phaseIV-3 make note that that is build from today and might have some unexpected behavior. For official version you'll need to wait until 2.79 release.

@phaseIV-3 make note that that is build from today and might have some unexpected behavior. For official version you'll need to wait until 2.79 release.
Author

No worries, I understand. The bug is solved and OpenSSL 1.0.2l is hopefully included in the upcoming OSX release, so the script will continue to work properly and that's the most important thing.
Thanks again!

No worries, I understand. The bug is solved and OpenSSL 1.0.2l is hopefully included in the upcoming OSX release, so the script will continue to work properly and that's the most important thing. Thanks again!
Author

So the update to version OpenSSL 1.0.2l for Mac/OSX didn't make it in 2.79. That's too bad...
Hope this gets fixed in the next version of Blender.
Thank you.

So the update to version OpenSSL 1.0.2l for Mac/OSX didn't make it in 2.79. That's too bad... Hope this gets fixed in the next version of Blender. Thank you.
Arto Kitula self-assigned this 2017-09-26 13:54:05 +02:00
Author

I found that the release candidate version of Blender (2.79a) is still using OpenSSL 0.9.8zh for Mac/OSX.
Maybe now it is the time to update OpenSSL to a newer version?
Thank you.

I found that the release candidate version of Blender (2.79a) is still using OpenSSL 0.9.8zh for Mac/OSX. Maybe now it is the time to update OpenSSL to a newer version? Thank you.

Added subscriber: @Sergey

Added subscriber: @Sergey

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'

We do not perform any libraries updates for corrective releases (such as 'a'). This is far too dangerous and often breaks compatibility with some platforms.

Those libraries are at their EOL, next major release will use 10.9 libraries. Buildbot is already moved to new libraries.

We do not perform any libraries updates for corrective releases (such as 'a'). This is far too dangerous and often breaks compatibility with some platforms. Those libraries are at their EOL, next major release will use 10.9 libraries. Buildbot is already moved to new libraries.
Author

This comment was removed by @phaseIV-3

*This comment was removed by @phaseIV-3*
Author

Removed subscriber: @phaseIV-3

Removed subscriber: @phaseIV-3
Author

For future reference, if any, there is a workaround for downloading files through python on Blender 2.79/OSX.
See this forumpost for details.

For future reference, if any, there is a workaround for downloading files through python on Blender 2.79/OSX. See [this forumpost ](https://forums.autodesk.com/t5/fusion-360-api-and-scripts/python-outdated-version-of-openssl-on-mac/td-p/7827232) for details.
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#52507
No description provided.