<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: [Python] Outdated version of OpenSSL on Mac ? in Fusion API and Scripts Forum</title>
    <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/python-outdated-version-of-openssl-on-mac/m-p/7950601#M16608</link>
    <description>&lt;P&gt;I found a workaround to download files via Python on Mac.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The solution is to use the subprocess module to call curl as an external command (&lt;A href="https://curl.haxx.se/mail/lib-2012-11/0013.html" target="_blank"&gt;Is every Mac has cURL pre-installed?&lt;/A&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the idea:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;import adsk.core, traceback
import subprocess
import os

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui  = app.userInterface

        master_zip = 'https://github.com/caseycrogers/Dogbone/archive/master.zip'
        local_zip = '/'.join([os.getenv('HOME'), 'Desktop', 'master.zip'])

        try:

        	# Check if the URL is reachable
        	out = subprocess.check_output(['curl', '-I', master_zip])
        	if out.decode().find('Status: 302 Found') &amp;gt; 0:
        		# Download the master zip file in the temporary folder
        		subprocess.call(['curl', '-o', local_zip, '-L', master_zip])
        	else:
        		ui.messageBox('Fail to reach a server.\n\n{}'.format(out.decode()))

        except subprocess.CalledProcessError as e:
        	ui.messageBox('Subprocess failed:\nReturncode: {}\n\nOutput:{}'.format(e.returncode, e.output))

    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 22 Apr 2018 12:04:33 GMT</pubDate>
    <dc:creator>JeromeBriot</dc:creator>
    <dc:date>2018-04-22T12:04:33Z</dc:date>
    <item>
      <title>[Python] Outdated version of OpenSSL on Mac ?</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/python-outdated-version-of-openssl-on-mac/m-p/7827232#M16603</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;I was working on my contribution &lt;A href="https://forums.autodesk.com/t5/fusion-360-api-and-scripts/githubtofusion360-install-script-or-add-in-from-github-repo/td-p/7730948" target="_blank"&gt;Github2Fusion360&lt;/A&gt; and I faced a problem to access Github server on Mac :&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;Fail to reach a server
[SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:720)&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;I tried to use &lt;A href="https://docs.python.org/3/library/ssl.html#ssl.PROTOCOL_TLSv1_1" target="_blank"&gt;PROTOCOL_TLSv1_1&lt;/A&gt; but it didn't work. This protocol is only available with OpenSSL version 1.0.1+ and Fusion 360 works with OpenSSL 0.9.8 on Mac&lt;BR /&gt;&lt;BR /&gt;On Windows :&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;&amp;gt;&amp;gt;&amp;gt; import ssl
&amp;gt;&amp;gt;&amp;gt; ssl.OPENSSL_VERSION
OpenSSL 1.0.2j  26 Sep 2016&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;On Mac :&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;&amp;gt;&amp;gt;&amp;gt; import ssl
&amp;gt;&amp;gt;&amp;gt; ssl.OPENSSL_VERSION
OpenSSL 0.9.8zh 14 Jan 2016&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;It seems to be a mistake during compilation because Fusion 360 is distributed with the same file "ssl.py" on Windows and on Mac&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 05 Mar 2018 11:37:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/python-outdated-version-of-openssl-on-mac/m-p/7827232#M16603</guid>
      <dc:creator>JeromeBriot</dc:creator>
      <dc:date>2018-03-05T11:37:13Z</dc:date>
    </item>
    <item>
      <title>Re: [Python] Outdated version of OpenSSL on Mac ?</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/python-outdated-version-of-openssl-on-mac/m-p/7827769#M16604</link>
      <description>&lt;P&gt;Here is a small code to reproduce the error on Mac :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;import traceback
import urllib

def run(context):

    try:

        url = 'https://github.com/caseycrogers/Dogbone/blob/master/Dogbone.manifest'

        request = urllib.request.Request(url)

        # Check if the URL is reachable
        try:

            urllib.request.urlopen(request)

        except urllib.error.HTTPError as e:
            print('The server couldn\'t fulfill the request.\n{}'.format(e))
            return

        except urllib.error.URLError as e:
            print('Fail to reach a server.\n{}'.format(e.reason))
            return

        print("Succeed")

    except:
        print('Failed:\n{}'.format(traceback.format_exc()))&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Mar 2018 14:48:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/python-outdated-version-of-openssl-on-mac/m-p/7827769#M16604</guid>
      <dc:creator>JeromeBriot</dc:creator>
      <dc:date>2018-03-05T14:48:38Z</dc:date>
    </item>
    <item>
      <title>Re: [Python] Outdated version of OpenSSL on Mac ?</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/python-outdated-version-of-openssl-on-mac/m-p/7830442#M16605</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I can reproduce the issue you mentioned. Unfortunately it seemed that we have to upgrade the version of Python(3.5.3) which Fusion 360 is using to solve the issue according to the thread as below.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://stackoverflow.com/questions/44316292/ssl-sslerror-tlsv1-alert-protocol-version?rq=1" target="_blank"&gt;https://stackoverflow.com/questions/44316292/ssl-sslerror-tlsv1-alert-protocol-version?rq=1&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I will create&amp;nbsp;UP-38248 to track the issue in our internal system.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Marshal&lt;/P&gt;</description>
      <pubDate>Tue, 06 Mar 2018 09:53:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/python-outdated-version-of-openssl-on-mac/m-p/7830442#M16605</guid>
      <dc:creator>marshaltu</dc:creator>
      <dc:date>2018-03-06T09:53:13Z</dc:date>
    </item>
    <item>
      <title>Re: [Python] Outdated version of OpenSSL on Mac ?</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/python-outdated-version-of-openssl-on-mac/m-p/7839379#M16606</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I digged into the &lt;A href="https://www.python.org/downloads/release/python-353/" target="_blank"&gt;source of Python 3.5.3&lt;/A&gt; and found a file "build-installer.py" ("Mac\BuildScript" folder) where we can read:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;        # The OpenSSL libs shipped with OS X 10.5 and earlier are
        # hopelessly out-of-date and do not include Apple's tie-in to
        # the root certificates in the user and system keychains via TEA
        # that was introduced in OS X 10.6.  Note that this applies to
        # programs built and linked with a 10.5 SDK even when run on
        # newer versions of OS X.
        #
        # Dealing with CAs is messy.  For now, just supply a
        # local libssl and libcrypto for the older installer variants
        # (e.g. the python.org 10.5+ 32-bit-only installer) that use the
        # same default ssl certfile location as the system libs do:
        #   /System/Library/OpenSSL/cert.pem
        # Then at least TLS connections can be negotiated with sites that
        # use sha-256 certs like python.org, assuming the proper CA certs
        # have been supplied.  The default CA cert management issues for
        # 10.5 and earlier builds are the same as before, other than it is
        # now more obvious with cert checking enabled by default in the
        # standard library.
        #
        # For builds with 10.6 through 10.9 SDKs,
        # continue to use the deprecated but
        # less out-of-date Apple 0.9.8 libs for now.  While they are less
        # secure than using an up-to-date 1.0.1 version, doing so
        # avoids the big problems of forcing users to have to manage
        # default CAs themselves, thanks to the Apple libs using private TEA
        # APIs for cert validation from keychains if validation using the
        # standard OpenSSL locations (/System/Library/OpenSSL, normally empty)
        # fails.
        #
        # Since Apple removed the header files for the deprecated system
        # OpenSSL as of the Xcode 7 release (for OS X 10.10+), we do not
        # have much choice but to build our own copy here, too.

        result.extend([
          dict(
              name="OpenSSL 1.0.2j",
              url="https://www.openssl.org/source/openssl-1.0.2j.tar.gz",
              checksum='96322138f0b69e61b7212bc53d5e912b',
              patches=[
                  "openssl_sdk_makedepend.patch",
                   ],
              buildrecipe=build_universal_openssl,
              configure=None,
              install=None,
          ),
        ])&lt;/PRE&gt;&lt;P&gt;So it should be possible to patch the installation with the file "openssl_sdk_makedepend.patch". Maybe someone at Autodesk could tell us more about that ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Note that people had the same problem with the Blender software: &lt;A href="https://developer.blender.org/T52507" target="_blank"&gt;Python uses old openssl version on OSX&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Mar 2018 20:50:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/python-outdated-version-of-openssl-on-mac/m-p/7839379#M16606</guid>
      <dc:creator>JeromeBriot</dc:creator>
      <dc:date>2018-03-08T20:50:27Z</dc:date>
    </item>
    <item>
      <title>Re: [Python] Outdated version of OpenSSL on Mac ?</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/python-outdated-version-of-openssl-on-mac/m-p/7840031#M16607</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I added your notes to the bug item tracked in our internal system.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Marshal&lt;/P&gt;</description>
      <pubDate>Fri, 09 Mar 2018 02:19:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/python-outdated-version-of-openssl-on-mac/m-p/7840031#M16607</guid>
      <dc:creator>marshaltu</dc:creator>
      <dc:date>2018-03-09T02:19:30Z</dc:date>
    </item>
    <item>
      <title>Re: [Python] Outdated version of OpenSSL on Mac ?</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/python-outdated-version-of-openssl-on-mac/m-p/7950601#M16608</link>
      <description>&lt;P&gt;I found a workaround to download files via Python on Mac.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The solution is to use the subprocess module to call curl as an external command (&lt;A href="https://curl.haxx.se/mail/lib-2012-11/0013.html" target="_blank"&gt;Is every Mac has cURL pre-installed?&lt;/A&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the idea:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;import adsk.core, traceback
import subprocess
import os

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui  = app.userInterface

        master_zip = 'https://github.com/caseycrogers/Dogbone/archive/master.zip'
        local_zip = '/'.join([os.getenv('HOME'), 'Desktop', 'master.zip'])

        try:

        	# Check if the URL is reachable
        	out = subprocess.check_output(['curl', '-I', master_zip])
        	if out.decode().find('Status: 302 Found') &amp;gt; 0:
        		# Download the master zip file in the temporary folder
        		subprocess.call(['curl', '-o', local_zip, '-L', master_zip])
        	else:
        		ui.messageBox('Fail to reach a server.\n\n{}'.format(out.decode()))

        except subprocess.CalledProcessError as e:
        	ui.messageBox('Subprocess failed:\nReturncode: {}\n\nOutput:{}'.format(e.returncode, e.output))

    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 22 Apr 2018 12:04:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/python-outdated-version-of-openssl-on-mac/m-p/7950601#M16608</guid>
      <dc:creator>JeromeBriot</dc:creator>
      <dc:date>2018-04-22T12:04:33Z</dc:date>
    </item>
    <item>
      <title>Re: [Python] Outdated version of OpenSSL on Mac ?</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/python-outdated-version-of-openssl-on-mac/m-p/8610958#M16609</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/561768"&gt;@marshaltu&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am running in the same issue with my Add In on MacOS.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Are there any news on the Support Ticket/ Bug&amp;nbsp;&lt;SPAN&gt;UP-38248. it has been already more than half a year and nothing has changed?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Greets Fabi&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Feb 2019 11:04:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/python-outdated-version-of-openssl-on-mac/m-p/8610958#M16609</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-02-21T11:04:26Z</dc:date>
    </item>
    <item>
      <title>Re: [Python] Outdated version of OpenSSL on Mac ?</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/python-outdated-version-of-openssl-on-mac/m-p/8619230#M16610</link>
      <description>&lt;P&gt;Because it seems like nobody cares here. I created a new topic under support for this issue.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://forums.autodesk.com/t5/fusion-360-support/update-web-browser-coming-with-fusion-360/td-p/8619224" target="_blank" rel="noopener"&gt;https://forums.autodesk.com/t5/fusion-360-support/update-web-browser-coming-with-fusion-360/td-p/8619224&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Feb 2019 15:16:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/python-outdated-version-of-openssl-on-mac/m-p/8619230#M16610</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-02-25T15:16:56Z</dc:date>
    </item>
  </channel>
</rss>

