feat: add wide card verify
This commit is contained in:
@@ -188,6 +188,11 @@ async fn main() -> tide::Result<()> {
|
|||||||
}
|
}
|
||||||
let filtered_cert_config = cert_config.filter_cert_config_items(30);
|
let filtered_cert_config = cert_config.filter_cert_config_items(30);
|
||||||
for item in &filtered_cert_config.cert_items {
|
for item in &filtered_cert_config.cert_items {
|
||||||
|
if item.common_name.as_ref().map(|n| n.contains("*")).unwrap_or(false)
|
||||||
|
|| item.dns_names.as_ref().map(|dns_names| dns_names.iter().any(|n| n.contains("*"))).unwrap_or(false) {
|
||||||
|
warning!("Currently not support wide card domain name");
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if let (Some(common_name), Some(dns_names)) = (&item.common_name, &item.dns_names) {
|
if let (Some(common_name), Some(dns_names)) = (&item.common_name, &item.dns_names) {
|
||||||
information!("Domains, main: {}, alt: {:?}", common_name, dns_names);
|
information!("Domains, main: {}, alt: {:?}", common_name, dns_names);
|
||||||
let alt_names: Vec<&str> = dns_names.iter().map(|n| n.as_str()).collect();
|
let alt_names: Vec<&str> = dns_names.iter().map(|n| n.as_str()).collect();
|
||||||
|
|||||||
Reference in New Issue
Block a user