//! Run with: cargo run --example test_bambu_certs //! //! Loads printers.toml (copy printers.example.toml to get started, fill in //! your real printers) and attempts a raw TLS handshake to each Bambu //! printer's MQTTS port (8883) - no MQTT protocol involved, just "does the //! certificate verify". Prusa/Klipper entries are skipped; they don't have //! this trust question. use continuum_proxy::fleet; use continuum_proxy::printer::PrinterHandle; fn main() -> anyhow::Result<()> { let printers = fleet::load(std::path::Path::new("printers.toml"))?; for printer in &printers { if let PrinterHandle::Bambu(bambu) = printer { report(bambu.base().name.as_str(), bambu.test_tls_handshake()) } } Ok(()) } fn report(name: &str, result: anyhow::Result<()>) { match result { Ok(()) => println!("{name}: OK - certificate verified"), Err(err) => println!("{name}: FAILED - {err}"), } }