feat: add logs
This commit is contained in:
@@ -160,6 +160,7 @@ impl CertConfigItem {
|
|||||||
let x509_certificate = opt_result!(x509::parse_x509(&format!("{}/{}", self.path, CERT_NAME), &pem), "Parse x509: {}/{}, faield: {}", self.path, CERT_NAME);
|
let x509_certificate = opt_result!(x509::parse_x509(&format!("{}/{}", self.path, CERT_NAME), &pem), "Parse x509: {}/{}, faield: {}", self.path, CERT_NAME);
|
||||||
if let Some(common_name) = &self.common_name {
|
if let Some(common_name) = &self.common_name {
|
||||||
if common_name != &x509_certificate.common_name {
|
if common_name != &x509_certificate.common_name {
|
||||||
|
warning!("Cert: {}, common name mis-match: {} vs {}", self.path, common_name, x509_certificate.common_name);
|
||||||
return Ok(None); // request for new cert
|
return Ok(None); // request for new cert
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -169,6 +170,7 @@ impl CertConfigItem {
|
|||||||
let mut cert_sorted_dns_names = x509_certificate.alt_names.clone();
|
let mut cert_sorted_dns_names = x509_certificate.alt_names.clone();
|
||||||
cert_sorted_dns_names.sort();
|
cert_sorted_dns_names.sort();
|
||||||
if sorted_dns_names != cert_sorted_dns_names {
|
if sorted_dns_names != cert_sorted_dns_names {
|
||||||
|
warning!("Cert: {}, dns names mis-match: {:?} vs {:?}", self.path, sorted_dns_names, cert_sorted_dns_names);
|
||||||
return Ok(None); // request for new cert
|
return Ok(None); // request for new cert
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user