mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-20 11:36:10 +00:00
LibTLS: Move DefaultRootCACertificates
to correct header file
The declaration of `DefaultRootCACertificates` was in `Certificate.h` and its implementation in `TLSv12.cpp`. It has been moved over to `TLSv12.h` for consistency. This is in preparation of the next commits to split the changes.
This commit is contained in:
parent
07ced0cb34
commit
e42410a7a7
Notes:
github-actions[bot]
2024-11-25 13:12:30 +00:00
Author: https://github.com/devgianlu Commit: https://github.com/LadybirdBrowser/ladybird/commit/e42410a7a7e Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2563 Reviewed-by: https://github.com/alimpfard ✅
3 changed files with 20 additions and 18 deletions
|
@ -300,24 +300,6 @@ private:
|
|||
Optional<bool> m_is_self_signed;
|
||||
};
|
||||
|
||||
class DefaultRootCACertificates {
|
||||
public:
|
||||
DefaultRootCACertificates();
|
||||
|
||||
Vector<Certificate> const& certificates() const { return m_ca_certificates; }
|
||||
|
||||
static ErrorOr<Vector<Certificate>> parse_pem_root_certificate_authorities(ByteBuffer&);
|
||||
static ErrorOr<Vector<Certificate>> load_certificates(Span<ByteString> custom_cert_paths = {});
|
||||
|
||||
static DefaultRootCACertificates& the();
|
||||
|
||||
static void set_default_certificate_paths(Span<ByteString> paths);
|
||||
|
||||
private:
|
||||
Vector<Certificate> m_ca_certificates;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
using TLS::Certificate;
|
||||
using TLS::DefaultRootCACertificates;
|
||||
|
|
|
@ -549,4 +549,23 @@ private:
|
|||
RefPtr<Core::Timer> m_handshake_timeout_timer;
|
||||
};
|
||||
|
||||
class DefaultRootCACertificates {
|
||||
public:
|
||||
DefaultRootCACertificates();
|
||||
|
||||
Vector<Certificate> const& certificates() const { return m_ca_certificates; }
|
||||
|
||||
static ErrorOr<Vector<Certificate>> parse_pem_root_certificate_authorities(ByteBuffer&);
|
||||
static ErrorOr<Vector<Certificate>> load_certificates(Span<ByteString> custom_cert_paths = {});
|
||||
|
||||
static DefaultRootCACertificates& the();
|
||||
|
||||
static void set_default_certificate_paths(Span<ByteString> paths);
|
||||
|
||||
private:
|
||||
Vector<Certificate> m_ca_certificates;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
using TLS::DefaultRootCACertificates;
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
#include <LibIPC/SingleServer.h>
|
||||
#include <LibMain/Main.h>
|
||||
#include <LibTLS/Certificate.h>
|
||||
#include <LibTLS/TLSv12.h>
|
||||
#include <RequestServer/ConnectionFromClient.h>
|
||||
|
||||
#if defined(AK_OS_MACOS)
|
||||
|
|
Loading…
Add table
Reference in a new issue