Base: codex-main originale (prima del fork aKode)

This commit is contained in:
Andrea
2026-11-09 10:37:42 +01:00
commit 7874033c81
10166 changed files with 2728937 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
use codex_utils_rustls_provider::ensure_rustls_crypto_provider;
const EMPTY_ALGORITHMS: rustls::crypto::WebPkiSupportedAlgorithms =
rustls::crypto::WebPkiSupportedAlgorithms {
all: &[],
mapping: &[],
};
#[test]
fn ensure_provider_preserves_preinstalled_provider() {
let mut provider = rustls::crypto::aws_lc_rs::default_provider();
provider.signature_verification_algorithms = EMPTY_ALGORITHMS;
assert!(provider.install_default().is_ok());
ensure_rustls_crypto_provider();
let Some(provider) = rustls::crypto::CryptoProvider::get_default() else {
panic!("preinstalled rustls provider should still be installed");
};
assert!(
!provider
.signature_verification_algorithms
.supported_schemes()
.contains(&rustls::SignatureScheme::ECDSA_NISTP521_SHA512)
);
}