MCPcopy Index your code
hub / github.com/RustPython/RustPython / normalize_wildcard_hostname

Function normalize_wildcard_hostname

crates/stdlib/src/ssl/cert.rs:221–223  ·  view source on GitHub ↗

Normalize wildcard hostname by stripping "*." prefix Returns the normalized hostname without the wildcard prefix. Used for wildcard certificate matching.

(hostname: &str)

Source from the content-addressed store, hash-verified

219/// Returns the normalized hostname without the wildcard prefix.
220/// Used for wildcard certificate matching.
221fn normalize_wildcard_hostname(hostname: &str) -> &str {
222 hostname.strip_prefix("*.").unwrap_or(hostname)
223}
224
225/// Process Subject Alternative Name (SAN) general names into Python tuples
226///

Callers 1

extract_first_dns_nameFunction · 0.85

Calls 1

strip_prefixMethod · 0.80

Tested by

no test coverage detected