Page 1 of 1

[SOLVED] Web updater with https

Posted: Mon Aug 18, 2014 4:14 pm
by Rietr
Hi everybody,

While trying to implement a web-updater I've been stuck on a problem.
The updater is working fine when I'm testing it internally from my server over http.
However when I'm trying to grab a file externally the site uses https and the updater just gives an error about an unknown url type.

So I've done some googling and came on this issue.
When I'm trying to retrieve an url which starts with http, there is no problem. Also when I'm just using a test-script (retrieving the same updates.json file) with my own python distribution it works.

Is there anyway to get it working with a https site? I tried replacing the urllib.pyo from ren'py with my own, but unfortunately that didn't work.
Or is it just recommended to use http on the server?

Thanks for the help!

Rietr

Re: Web updater with https

Posted: Mon Aug 18, 2014 10:36 pm
by Spiky Caterpillar
Ren'Py doesn't ship with SSL included. You could try recompiling Ren'Py with
SSL linked in (this will be Somewhat Annoying, because you'll need to do it
once for each platform); it should also be possible to write (or adapt) a
Python module to use the system SSL libs.

https://docs.python.org/2/library/httplib.html indicates that it's actually
socket that you need to replace - I think urllib automatically checks for
SSL socket support, but might be wrong.

Other gotchas and alternate approaches depend on what your actual goal in
using SSL is.

Re: Web updater with https

Posted: Wed Aug 20, 2014 10:17 pm
by PyTom
Note that beyond Ren'Py, you'd also have to get zsync working with https, which would provide its own challenge.

Re: Web updater with https

Posted: Thu Aug 21, 2014 3:34 am
by Rietr
Thanks for your suggestions!

I'm indeed also stuck on zsync, which doesn't want to cooperate.
So for now I decided it would not be worth the hassle and just put up a http server, thanks anyway!