1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-30 22:58:12 +00:00

LibProtocol+LibGemini+LibHTTP: Provide root certificates to LibTLS

Now we (almost) verify all the sites we browse.
Certificate verification failures should not be unexpected, as the
existing CA certificates are likely not complete.
This commit is contained in:
AnotherTest 2020-10-30 11:57:32 +03:30 committed by Andreas Kling
parent 37c089fb7b
commit 812e3ecedd
5 changed files with 13 additions and 2 deletions

View file

@ -27,6 +27,7 @@
#include <LibCore/EventLoop.h>
#include <LibCore/LocalServer.h>
#include <LibIPC/ClientConnection.h>
#include <LibTLS/Certificate.h>
#include <ProtocolServer/ClientConnection.h>
#include <ProtocolServer/GeminiProtocol.h>
#include <ProtocolServer/HttpProtocol.h>
@ -38,6 +39,10 @@ int main(int, char**)
perror("pledge");
return 1;
}
// Ensure the certificates are read out here.
(void)DefaultRootCACertificates::the();
Core::EventLoop event_loop;
// FIXME: Establish a connection to LookupServer and then drop "unix"?
if (pledge("stdio inet shared_buffer accept unix", nullptr) < 0) {