mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-03 17:02:56 +00:00
LibTLS: Streamline certificate loading
Some refactoring of our root ca loading process: - Remove duplicate code - Remove duplicate calls to `parse_root_ca` - Load user imported certificates in Browser/RequestServer
This commit is contained in:
parent
e4481baef9
commit
93232d4e6d
Notes:
sideshowbarker
2024-07-17 06:46:15 +09:00
Author: https://github.com/fdellwing
Commit: 93232d4e6d
Pull-request: https://github.com/SerenityOS/serenity/pull/18203
Reviewed-by: https://github.com/gmta
5 changed files with 28 additions and 33 deletions
|
@ -42,7 +42,7 @@ ErrorOr<Vector<Certificate>> load_certificates()
|
|||
{
|
||||
auto cacert_file = TRY(Core::File::open(locate_ca_certs_file(), Core::File::OpenMode::Read));
|
||||
auto data = TRY(cacert_file->read_until_eof());
|
||||
return TRY(DefaultRootCACertificates::the().reload_certificates(data));
|
||||
return TRY(DefaultRootCACertificates::parse_pem_root_certificate_authorities(data));
|
||||
}
|
||||
|
||||
TEST_CASE(test_TLS_hello_handshake)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue