rustls/rustls-platform-verifier

Support IP Address verification on Android

complexspaces opened this issue · 0 comments

After the webpki upgrade inside of #14, we now have the ability to verify IP address subject names on Android (Linux and WASM got this for free), once we upgraded.

The relevant ares are:

let server = match server_name {
rustls::ServerName::DnsName(name) => name.as_ref(),
_ => return Err(unsupported_server_name()),
};

// If everything else was OK, check the hostname.
let cert = webpki::EndEntityCert::try_from(end_entity.as_ref())
.map_err(pki_name_error)?;
let name = webpki::SubjectNameRef::DnsName(
// This unwrap can't fail since it was already validated before.
webpki::DnsNameRef::try_from_ascii_str(server_name).unwrap(),
);

We should also make sure to enable the IP address portion of the mock test suite for Android at the same time to confirm the system supports the behavior.