MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / build_server_sans

Function build_server_sans

crates/openshell-bootstrap/src/pki.rs:131–142  ·  view source on GitHub ↗

Build the SAN list for the server certificate from defaults + extras.

(extra_sans: &[String])

Source from the content-addressed store, hash-verified

129
130/// Build the SAN list for the server certificate from defaults + extras.
131fn build_server_sans(extra_sans: &[String]) -> Vec<SanType> {
132 let mut sans = Vec::new();
133
134 for s in DEFAULT_SERVER_SANS {
135 add_san(&mut sans, s);
136 }
137 for s in extra_sans {
138 add_san(&mut sans, s);
139 }
140
141 sans
142}
143
144/// Add a SAN, automatically choosing `IpAddress` or `DnsName` based on the value.
145fn add_san(sans: &mut Vec<SanType>, value: &str) {

Callers 2

generate_pkiFunction · 0.85

Calls 1

add_sanFunction · 0.85