Skip to content

Commit 6d33c00

Browse files
committed
chore(stack): merge isolated TLS and Docker test fixes
Signed-off-by: Drew Newberry <anewberry@nvidia.com>
2 parents 3962a66 + e9cdc2f commit 6d33c00

4 files changed

Lines changed: 11 additions & 1 deletion

File tree

‎crates/openshell-driver-docker/src/tests.rs‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2100,7 +2100,14 @@ fn build_container_create_body_replaces_inherited_cmd_with_boundary_mode() {
21002100
Some(&vec!["apparmor=unconfined".to_string()])
21012101
);
21022102
assert_eq!(host_config.network_mode.as_deref(), Some("none"));
2103-
assert!(host_config.extra_hosts.is_none());
2103+
assert_eq!(
2104+
host_config.extra_hosts,
2105+
Some(vec![
2106+
"host.openshell.internal:host-gateway".to_string(),
2107+
"host.docker.internal:host-gateway".to_string(),
2108+
]),
2109+
"networkless workloads still receive stable host aliases"
2110+
);
21042111
assert!(create_body.networking_config.is_none());
21052112
}
21062113

‎crates/openshell-isolation-interface/src/remote.rs‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@ fn validate_tcp_address(address: std::net::SocketAddr) -> Result<(), BackendErro
177177
}
178178

179179
fn tls_client_config(ca_certificate_pem: &str) -> Result<rustls::ClientConfig, BackendError> {
180+
let _ = rustls::crypto::ring::default_provider().install_default();
180181
let certificates = rustls_pemfile::certs(&mut ca_certificate_pem.as_bytes())
181182
.collect::<Result<Vec<_>, _>>()
182183
.map_err(|error| {

‎crates/openshell-sandbox/src/boundary_server.rs‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1674,6 +1674,7 @@ mod linux {
16741674
certificate_chain_path: &Path,
16751675
private_key_path: &Path,
16761676
) -> io::Result<rustls::ServerConfig> {
1677+
let _ = rustls::crypto::ring::default_provider().install_default();
16771678
let certificate_bytes = std::fs::read(certificate_chain_path)?;
16781679
let certificates = rustls_pemfile::certs(&mut certificate_bytes.as_slice())
16791680
.collect::<Result<Vec<_>, _>>()?;

‎crates/openshell-supervisor-network/src/l7/tls.rs‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ impl SandboxCa {
100100
/// Load a durable CA while preserving the exact certificate bytes supplied
101101
/// by the provisioner for boundary launch replay.
102102
pub fn from_pem(certificate_pem: &str, private_key_pem: &str) -> Result<Self> {
103+
let _ = rustls::crypto::ring::default_provider().install_default();
103104
let ca_key = KeyPair::from_pem(private_key_pem)
104105
.into_diagnostic()
105106
.wrap_err("parse proxy CA private key")?;

0 commit comments

Comments
 (0)