mirror of
https://github.com/rust-osdev/uefi-rs
synced 2026-08-26 18:26:05 -04:00
uefi-test-runner: skipping HTTPS test for aarch64
Since edk2-stable202511, the default OpenSSL security level has been raised from 0 to 3, which rejects older RSA-based keys. Unfortunately, the EDK2 aarch64 build forcefully disables all EC-based keys (-DEDK2_OPENSSL_NOEC=1), effectively preventing connections to most HTTPS/TLS hosts. Temporarily disable this test on aarch64 until EC-based keys are supported there.
This commit is contained in:
parent
7613eb9618
commit
786764fd9f
1 changed files with 43 additions and 26 deletions
|
|
@ -89,36 +89,53 @@ pub fn test() {
|
|||
info!("Testing HTTP");
|
||||
fetch_http(*h, "http://example.com/").expect("http request to http://example.com failed");
|
||||
|
||||
// EDK2 uses platform-specific OpenSSL configurations, which can affect
|
||||
// certificate compatibility with HTTPS hosts. Because both our test
|
||||
// hosts and their certificates may change, try multiple candidates and
|
||||
// require at least one request to succeed.
|
||||
// Since edk2-stable202511, the default OpenSSL security level has been
|
||||
// raised from 0 to 3, which rejects older RSA-based keys. Unfortunately,
|
||||
// the EDK2 aarch64 build forcefully disables all EC-based keys
|
||||
// (-DEDK2_OPENSSL_NOEC=1), effectively preventing connections to most
|
||||
// HTTPS/TLS hosts. Temporarily disable this test on aarch64 until
|
||||
// EC-based keys are supported there.
|
||||
//
|
||||
// Not all firmware builds support modern tls versions.
|
||||
// request() -> ABORTED typically is a tls handshake error.
|
||||
// check the firmware log for details.
|
||||
let https_url_candidates = [
|
||||
"https://example.com/",
|
||||
"https://raw.githubusercontent.com/rust-osdev/uefi-rs/refs/heads/main/Cargo.toml",
|
||||
"https://www.cloudflare.com/",
|
||||
"https://www.google.com/",
|
||||
];
|
||||
// See https://github.com/rust-osdev/uefi-rs/issues/1975
|
||||
#[cfg(not(target_arch = "aarch64"))]
|
||||
{
|
||||
// EDK2 uses platform-specific OpenSSL configurations, which can affect
|
||||
// certificate compatibility with HTTPS hosts. Because both our test
|
||||
// hosts and their certificates may change, try multiple candidates and
|
||||
// require at least one request to succeed.
|
||||
//
|
||||
// Not all firmware builds support modern tls versions.
|
||||
// request() -> ABORTED typically is a tls handshake error.
|
||||
// check the firmware log for details.
|
||||
let https_url_candidates = [
|
||||
"https://example.com/",
|
||||
"https://raw.githubusercontent.com/rust-osdev/uefi-rs/refs/heads/main/Cargo.toml",
|
||||
"https://www.cloudflare.com/",
|
||||
"https://www.google.com/",
|
||||
];
|
||||
|
||||
info!("Testing HTTPS");
|
||||
let https_results = https_url_candidates
|
||||
.iter()
|
||||
.map(|url| (url, fetch_http(*h, url)))
|
||||
.collect::<Vec<_>>();
|
||||
for (url, res) in &https_results {
|
||||
debug!(
|
||||
"HTTPS request to: {url}: {}",
|
||||
if res.is_some() { "OK" } else { "FAILED" }
|
||||
info!("Testing HTTPS");
|
||||
let https_results = https_url_candidates
|
||||
.iter()
|
||||
.map(|url| (url, fetch_http(*h, url)))
|
||||
.collect::<Vec<_>>();
|
||||
for (url, res) in &https_results {
|
||||
debug!(
|
||||
"HTTPS request to: {url}: {}",
|
||||
if res.is_some() { "OK" } else { "FAILED" }
|
||||
);
|
||||
}
|
||||
assert!(
|
||||
https_results.iter().any(|(_, res)| res.is_some()),
|
||||
"No HTTPS request succeeded"
|
||||
);
|
||||
}
|
||||
assert!(
|
||||
https_results.iter().any(|(_, res)| res.is_some()),
|
||||
"No HTTPS request succeeded"
|
||||
);
|
||||
|
||||
#[cfg(target_arch = "aarch64")]
|
||||
{
|
||||
// See https://github.com/rust-osdev/uefi-rs/issues/1975
|
||||
warn!("Skipping HTTPS test on aarch64 (see #1975)");
|
||||
}
|
||||
|
||||
info!("PASSED");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue