(credentials_json: &str, expected_url: &str)
| 496 | } |
| 497 | |
| 498 | fn acme_url_matches(credentials_json: &str, expected_url: &str) -> bool { |
| 499 | #[derive(serde::Deserialize)] |
| 500 | struct Creds { |
| 501 | #[serde(default)] |
| 502 | acme_url: String, |
| 503 | } |
| 504 | serde_json::from_str::<Creds>(credentials_json) |
| 505 | .map(|c| c.acme_url == expected_url) |
| 506 | .unwrap_or(false) |
| 507 | } |
| 508 | |
| 509 | /// Extract account_id (URI) from ACME credentials JSON |
| 510 | fn extract_account_uri(credentials_json: &str) -> Option<String> { |
no outgoing calls
no test coverage detected