Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check if we can default to TLS 1.2 #52

Closed
razzeee opened this issue Jan 10, 2017 · 6 comments
Closed

Check if we can default to TLS 1.2 #52

razzeee opened this issue Jan 10, 2017 · 6 comments

Comments

@razzeee
Copy link
Contributor

razzeee commented Jan 10, 2017

Had a user report this:

trakt/script.trakt#333 (comment)

Seems that's a certificate issue.
I fix it changing your 3.1.8 version file "~/.kodi/addons/script.module.trakt/lib/trakt/core/http.py"
The actual line:

        self.session.mount('https://', HTTPSAdapter(ssl_version=ssl.PROTOCOL_TLSv1, **self.adapter_kwargs))

by this one:

        self.session.mount('https://', HTTPSAdapter(ssl_version=ssl.PROTOCOL_TLSv1_2, **self.adapter_kwargs))

And works. Certificate on the autorization page acepts TLS v 1.2 and fails (at least for me) with TLS v 1.0

Feel free to double check it and add it to yor version if you like.

Regards

@fuzeman
Copy link
Owner

fuzeman commented Jan 10, 2017

The SSL version was originally set to TLSv1 due to #25, not sure if that's still an issue though...

I'm wondering if we should try change back to the default auto-negotiate mode (PROTOCOL_SSLv23 / PROTOCOL_TLS), as changing the protocol to TLSv1_2 will mean OpenSSL v1.0.1+ is now required to make any requests with the library (unless you switch back to http://)...

If there is still some users experiencing issue #25 in Kodi, maybe there should just be an option to pick a specific SSL version? (could define a property for you to change it)


I would also try get the requests library updated to the latest version, currently Kodi is using v2.9.1 which is 3 minor releases behind the latest version (v2.12.4).

@razzeee
Copy link
Contributor Author

razzeee commented Jan 11, 2017

I think we should go for auto-negotiation.
If it's still an issue, it will pop up again and then we can look at a property.

I'll try to ping the maintainer of the requests module, if he doesn't respond, I'll take it over.

fuzeman added a commit that referenced this issue Jan 11, 2017
…(instead of defaulting to TLS v1.0), specific version can now be set with the `Trakt.http.ssl_version` property

#52
@fuzeman
Copy link
Owner

fuzeman commented Jan 11, 2017

I've switched back to automatic negotiation on the develop branch, will be publishing a new release after some more testing later today.


I've also made the changes described in this post on the develop branch, so you might want to check your lookup and search calls are still working correctly.

@razzeee
Copy link
Contributor Author

razzeee commented Jan 11, 2017 via email

@razzeee
Copy link
Contributor Author

razzeee commented Jan 11, 2017 via email

@fuzeman
Copy link
Owner

fuzeman commented Jan 11, 2017

Released changes in v2.12.0

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

No branches or pull requests

2 participants