Closed liamshanny closed 5 years ago
I was able to get past this by modifying the ssl_version value in tlsadapter.py (/Library/Python/2.7/site-packages/jss/tlsadapter.py)
old: ssl_version=ssl.PROTOCOL_TLSv1
new: ssl_version=ssl.PROTOCOL_TLSv1_2
I did test it with the JSSImporter/autopkg and didn't see any issues. Did not test any further.
@sheagcraig
@danengh saved me 5 minutes of isolating that myself, thanks. For the record, if you have custom scripts using python-jss it will be in a different place than the version used by JSSImporter. The following locations were useful for me.
/Library/Application Support/JSSImporter/jss/tlsadapter.py
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/jss/tlsadapter.py
Thanks for tracking this one down! Fix above worked for me.
In case it helps anyone else, for me, the following location was the one that fixed it:
~/Library/Python/2.7/lib/python/site-packages/jss/tlsadapter.py
This is now merged into the master branch
We just updated our JAMF server to 10.6, and since then I haven't been able to get this library to run
Making the following call:
jamf_xml = j.MobileDevice().retrieve_all(subset="general&location&mobiledevicegroups")
And I get the resulting exception:
requests.exceptions.SSLError: HTTPSConnectionPool(host='ndh-jss-01.corp.contoso.com', port=8443): Max retries exceeded with url: /JSSResource/mobiledevices (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'ssl3_read_bytes', 'sslv3 alert handshake failure')],)",),))
I have tried disabling ssl_verify in the JSS prefs, but the issue persists. Any ideas to further troubleshoot this?