mirror of
https://git.proxmox.com/git/proxmox
synced 2025-08-11 17:31:46 +00:00
acme-api: show all certificate subject_alt_names (DNS, IP, EMAIL, URI)
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
This commit is contained in:
parent
2c2475da5e
commit
0b17987c67
@ -336,8 +336,19 @@ impl CertificateInfo {
|
|||||||
.subject_alt_names()
|
.subject_alt_names()
|
||||||
.map(|san| {
|
.map(|san| {
|
||||||
san.into_iter()
|
san.into_iter()
|
||||||
// FIXME: Support `.ipaddress()`?
|
.filter_map(|name| {
|
||||||
.filter_map(|name| name.dnsname().map(str::to_owned))
|
if let Some(name) = name.dnsname() {
|
||||||
|
Some(format!("DNS: {name}"))
|
||||||
|
} else if let Some(ip) = name.ipaddress() {
|
||||||
|
Some(format!("IP: {ip:?}"))
|
||||||
|
} else if let Some(email) = name.email() {
|
||||||
|
Some(format!("EMAIL: {email}"))
|
||||||
|
} else if let Some(uri) = name.uri() {
|
||||||
|
Some(format!("URI: {uri}"))
|
||||||
|
} else {
|
||||||
|
None
|
||||||
|
}
|
||||||
|
})
|
||||||
.collect()
|
.collect()
|
||||||
})
|
})
|
||||||
.unwrap_or_default();
|
.unwrap_or_default();
|
||||||
|
Loading…
Reference in New Issue
Block a user