agentmux_common/
system_certs.rs1pub const NO_SYSTEM_CERTS: &str = "no system certificates found: every https request the server makes (models, updates, connected accounts) would fail";
9
10pub const NO_SYSTEM_CERTS_FIX: &str = "install the ca-certificates package (Debian and Ubuntu: `apt install ca-certificates`; Fedora: `dnf install ca-certificates`; Alpine: `apk add ca-certificates`), or point SSL_CERT_FILE at a bundle, then restart AgentMux (the server reads the certificates once, when it starts)";
12
13pub fn no_system_certs_message() -> String {
15 format!("{NO_SYSTEM_CERTS}. To fix it, {NO_SYSTEM_CERTS_FIX}")
16}
17
18#[cfg(test)]
19mod tests {
20 use super::*;
21
22 #[test]
23 fn the_message_names_the_problem_and_the_package() {
24 let m = no_system_certs_message();
25 assert!(m.starts_with("no system certificates found"));
26 assert!(m.contains("ca-certificates") && m.contains("SSL_CERT_FILE"));
27 }
28}