rustls / rustls-ffi

Use Rustls from any language
Other
124 stars 31 forks source link

Support IP addresses in server names #302

Closed jsha closed 1 year ago

jsha commented 1 year ago

This actually involved basically no changes in functionality. It updates documentation to be clear that IP addresses are allowed, and updates some field and parameter names from dns_name or sni_name to server_name.

Note: there's one fix still needed after this. InvalidDnsNameError => write!(f, "hostname was either malformed or an IP address (rustls does not support certificates for IP addresses)"), should become "InvalidDnsNameError => write!(f, "server name was malformed (not a valid hostname or IP address)". But that was likely to cause conflicts with @cpu's in-progress fix for #297 so I'm omitting it for now.

Fixes #292