We're seeing more of our deps move to this MSRV or higher (e.g.
`webpki`, `rustls-platform-verifier`) and it's shipped in Debian stable.
Time to move our MSRV to 1.63.
This works around quality-of-implementation issues in OpenSSL and
Apple SecureTransport: they send `server_name` extensions containing
IP addresses. RFC6066 specifically disallows that.
It is a similar work-around to that adopted by LibreSSL: ignore
SNI contents if they can be parsed as an IP address.
We've addressed this lint's findings in `main`. For the 0.21.x release
stream, allow the finding and leave the code unchanged for minimal
semver impact.
if for some reason the recorded session ticket is invalid or decoded
incorrectly by the server, we can get into a case where the resumption
handshake happens, and right after the ChangeCipherSpec message, the
server sends an encrypted handhsake message using the invalid ticket,
and the client rejects it with the BadRecordMAC alert.
Unfortunately, if the calling code retries the connection, if it will
try again with the same ticket and obtain the same result.
This commit makes sure that if we fail to decrypt the first message, we
will remove the session ticket for this server, to start from cratch on
the next connection.
The `Tls12CipherSuite::hash_algorithm` and
`Tls13CipherSuite::hash_algorithm` functions were meant to be crate
internal, since their return type leaks the `ring::digest::Algorithm`
type. As written today these fns make updates to `*ring*` a breaking
change for the Rustls API.
This commit switches the visibility of both functions to be
crate-internal. Strictly speaking this is a breaking change, but we
don't expect there to be consumers of these functions and it unblocks
a *ring* update that would otherwise be breaking on its own.
The actually expensive part is mostly the gathering of certificates
from the platform trust root store, and it would be better to document
that in the relevant API (that is, in rustls-native-certs). Apart
from that, I believe that the use of `Arc`-wrapped types is also an
effective signal that the wrapped types should be reused where possible.
The `RootCertStore` type is used for both client and server trust
anchors. This commit deprecates the inappropriately named
`add_server_trust_anchors` fn and adds a new `add_trust_anchors` fn to
use in its place.