20260707 支持本地HTTP root证书

This commit is contained in:
2026-07-07 23:04:44 +08:00
parent b0f76738e5
commit 63ac3ee254
3 changed files with 89 additions and 20 deletions

View File

@@ -289,6 +289,29 @@ fn parse_accepts_host_rsync_scope_policy() {
assert_eq!(args.rsync_scope_policy, RsyncScopePolicy::Host);
}
#[test]
fn parse_accepts_repeatable_http_root_cert_paths() {
let argv = vec![
"rpki".to_string(),
"--db".to_string(),
"db".to_string(),
"--tal-url".to_string(),
"https://example.test/x.tal".to_string(),
"--http-root-cert".to_string(),
"local-ca-1.pem".to_string(),
"--http-root-cert".to_string(),
"local-ca-2.pem".to_string(),
];
let args = parse_args(&argv).expect("parse args");
assert_eq!(
args.http_root_cert_paths,
vec![
PathBuf::from("local-ca-1.pem"),
PathBuf::from("local-ca-2.pem")
]
);
}
#[test]
fn parse_rejects_invalid_rsync_scope_policy() {
let argv = vec![