+45

Bundle python ssl module

Will Bond il y a 13 ans mis à jour par Julien Bouquillon il y a 12 ans 10
It would be nice to be able to pull data from web servers that use SSL certs. From what I can tell, urllib2 needs the python ssl module to be able to download from https:// urls.
+1
Hmm, actually, looking at the Python zip in Sublime Text 2/lib I see an ssl.pyo file, so maybe I am just not using urllib2 correctly.
+1
Just for others who end up checking this out, it appears the ssl module is only missing on Linux builds. I ended up working around it with wrappers for command-line curl and wget programs.
+1

+1, this is actually very disturbing to be allow to "import _ssl" from anywhere but not working in ST2 :(

+3

+1 for builtin ssl module. needed in many plugins that use external APIs (eg: markdown preview)

+1

+1 for built in ssl module, or a workaround please!

If you install my SFTP package and look at the SFTP.py in the package folder, you can find some loader code to try loading three different variants of the ssl module. In the lib folder there are three different versions of the _ssl module compiled against different versions of openssl, both for 32bit and 64bit architectures.


From my experience, this seems to work with all modern linux installs.

Thanks Will for the tip; so you allow me to install the trial version and use that part of your code ?

Yes, you can use the compiled _ssl modules and the code from line 11-31 of SFTP.py for an open source package.

Very nice dude, thanks ;) and BTW thanks a TON for Sublime Package manager.