Fix all Android build warnings and make the CA verifier preference more flexible (#41179)

This change fixes a variety of build warnings on Android. In a related
change, the CA verifier preference allows using a list of certificate
overrides and the `rust-webpki` verifier regardless of platform. Whether
to use a list of certificate overrides and whether to use the platform
verifier are orthagonal, so this change unlinks those two and in the
process
fixes a build warning on Android.

Testing: This preference is untested (and quite hard to test honestly),
so this change
does not have tests. There should be no behavior change unless using a
combination
of forcing the webpki verifier and providing a list of CA overrides.

---------

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
Martin Robinson
2025-12-11 13:56:12 +01:00
committed by GitHub
parent 5c777abc63
commit d9cf03a4e5
9 changed files with 90 additions and 96 deletions

View File

@@ -250,8 +250,10 @@ pub struct Preferences {
pub network_http_proxy_uri: String,
pub network_local_directory_listing_enabled: bool,
pub network_mime_sniff: bool,
/// Use the webpki roots if no root store path is given.
pub network_webpki_roots: bool,
/// Force the use of `rust-webpki` verification for CA roots. If this is false (the
/// default), then `rustls-platform-verifier` will be used, except on Android where
/// `rust-webpki` is always used.
pub network_use_webpki_roots: bool,
pub session_history_max_length: i64,
/// The background color of shell's viewport. This will be used by OpenGL's `glClearColor`.
pub shell_background_color_rgba: [f64; 4],
@@ -436,7 +438,7 @@ impl Preferences {
network_http_proxy_uri: String::new(),
network_local_directory_listing_enabled: true,
network_mime_sniff: false,
network_webpki_roots: false,
network_use_webpki_roots: false,
session_history_max_length: 20,
shell_background_color_rgba: [1.0, 1.0, 1.0, 1.0],
threadpools_async_runtime_workers_max: 6,