Add notification for missing or bad SSL certificates

Also add mbedtls to and document new certificate config options in README.md.
This commit is contained in:
Tamás Bálint Misius
2022-09-25 07:22:19 +02:00
parent 09c2704928
commit 0f9b1a58b1
3 changed files with 9 additions and 6 deletions

View File

@@ -49,6 +49,7 @@ Libraries and other assets used
* [LuaJIT](https://luajit.org/) * [LuaJIT](https://luajit.org/)
* [LuaSocket](http://w3.impa.br/~diego/software/luasocket/) * [LuaSocket](http://w3.impa.br/~diego/software/luasocket/)
* [Mallangche](https://github.com/JammPark/Mallangche) * [Mallangche](https://github.com/JammPark/Mallangche)
* [mbedtls](https://www.trustedfirmware.org/projects/mbed-tls/)
* [SDL](https://libsdl.org/) * [SDL](https://libsdl.org/)
* [zlib](https://www.zlib.net/) * [zlib](https://www.zlib.net/)
@@ -57,7 +58,6 @@ Instructions
Click on the elements with the mouse and draw in the field, like in MS Paint. The rest of the game is learning what happens next. Click on the elements with the mouse and draw in the field, like in MS Paint. The rest of the game is learning what happens next.
Controls Controls
=========================================================================== ===========================================================================
@@ -108,8 +108,6 @@ Controls
| Ctrl + Shift + R | Vertical mirror for selected area when pasting stamps | | Ctrl + Shift + R | Vertical mirror for selected area when pasting stamps |
| R | Rotate selected area counterclockwise when pasting stamps | | R | Rotate selected area counterclockwise when pasting stamps |
Command Line Command Line
--------------------------------------------------------------------------- ---------------------------------------------------------------------------
@@ -123,3 +121,5 @@ Command Line
| `ptsave:SAVEID` | Open online save, used by ptsave: URLs | `ptsave:2198` | | `ptsave:SAVEID` | Open online save, used by ptsave: URLs | `ptsave:2198` |
| `disable-network` | Disables internet connections | | | `disable-network` | Disables internet connections | |
| `redirect` | Redirects output to stdout.txt / stderr.txt | | | `redirect` | Redirects output to stdout.txt / stderr.txt | |
| `cafile:CAFILE` | Set certificate bundle path | `cafile:/etc/ssl/certs/ca-certificates.crt` |
| `capath:CAPATH` | Set certificate directory path | `capath:/etc/ssl/certs` |

View File

@@ -114,9 +114,7 @@ endif
lua_variant = get_option('lua') lua_variant = get_option('lua')
if lua_variant == 'auto' if lua_variant == 'auto'
lua_variant = 'luajit' lua_variant = 'luajit'
# TODO: sometimes luajit is not available
endif endif
# TODO: check UNICODE on windows
if lua_variant == 'none' if lua_variant == 'none'
lua_dep = [] lua_dep = []
elif lua_variant == 'lua5.1' or lua_variant == 'lua5.2' elif lua_variant == 'lua5.1' or lua_variant == 'lua5.2'
@@ -153,7 +151,7 @@ fftw_dep = enable_gravfft ? dependency('fftw3f', static: is_static) : []
threads_dep = dependency('threads') threads_dep = dependency('threads')
zlib_dep = dependency('zlib', static: is_static) zlib_dep = dependency('zlib', static: is_static)
sdl2_dep = dependency('sdl2', static: is_static) # TODO: check UNICODE on windows sdl2_dep = dependency('sdl2', static: is_static)
project_link_args = [] project_link_args = []
project_c_args = [] project_c_args = []

View File

@@ -263,6 +263,11 @@ bool Client::CheckUpdate(http::Request *updateRequest, bool checkSession)
int status; int status;
ByteString data = updateRequest->Finish(&status); ByteString data = updateRequest->Finish(&status);
if (checkSession && status == 618)
{
AddServerNotification({ "Failed to load SSL certificates", SCHEME "powdertoy.co.uk/FAQ.html" });
}
if (status != 200) if (status != 200)
{ {
//free(data); //free(data);