Skip to content

Lightpanda: the headless browser designed for AI and automation

remove `--disable-root-certificates` flag

Halil Durakd6ce3738a51f
diff --git a/src/Config.zig b/src/Config.zig
index 4b7a08603..bafe3bf4c 100644
--- a/src/Config.zig
+++ b/src/Config.zig
@@ -147,7 +147,6 @@ const CommonOptions = .{
.{ .name = "watchdog_ms", .type = ?u32 },
.{ .name = "ca_cert", .type = [:0]const u8, .multiple = true },
.{ .name = "ca_path", .type = [:0]const u8, .multiple = true, .validator = caPathValidator },
- .{ .name = "disable_root_certificates", .type = bool },
};
fn dumpValidator(_: Allocator, args: *std.process.Args.Iterator) !?DumpFormat {
@@ -418,14 +417,6 @@ pub fn v8MaxHeapMb(self: *const Config) ?u32 {
};
}
-pub fn disableRootCertificates(self: *const Config) bool {
- return switch (self.mode) {
- inline .serve, .fetch, .mcp, .agent => |opts| opts.disable_root_certificates,
- .version => false,
- else => unreachable,
- };
-}
-
pub fn httpProxy(self: *const Config) ?[:0]const u8 {
return switch (self.mode) {
inline .serve, .fetch, .mcp, .agent => |opts| opts.http_proxy,
diff --git a/src/help.zon b/src/help.zon
index 24015fd04..c7ddc9408 100644
--- a/src/help.zon
+++ b/src/help.zon
@@ -318,10 +318,6 @@
\\ --cookie-jar <PATH>
\\ Path to a JSON file to save cookies to on exit (write-only).
\\ Defaults to no cookie saving.
- \\ --disable-root-certificates
- \\ Skip loading the system trust store; only certificates given via
- \\ --ca-cert and --ca-path are trusted.
- \\ Defaults to false.
\\ --disable-subframes
\\ Skip loading <iframe> elements. The parser still registers them in the
\\ DOM, but no child frame or Page.frameAttached events are produced.
diff --git a/src/network/Network.zig b/src/network/Network.zig
index cac4d1540..95577a45e 100644
--- a/src/network/Network.zig
+++ b/src/network/Network.zig
@@ -760,12 +760,6 @@ fn createX509Store(allocator: Allocator, config: *const Config) CreateX509StoreE
.version => {}, // Don't load custom CA for version command.
}
- // Early return if root certificates are unwanted.
- if (config.disableRootCertificates()) {
- log.warn(.app, "Root certificates are disabled", .{});
- return store;
- }
-
switch (comptime builtin.os.tag) {
.linux, .openbsd, .netbsd, .freebsd => blk: {
// Iterate over known directories.