vtls/rustls: support strong CSRNG data

Now that the curl rustls vtls backend is using rustls 0.14 we can
address the weak random situation by using
`rustls_default_crypto_provider_random()` to provide a `Curl_ssl`
`random` callback that fills the provided buffer with cryptographically
secure random data.

The mentions in `docs/` about weak RNG when using rustls are removed as
they are no longer applicable.

Closes #14889
This commit is contained in:
Daniel McCarney 2024-09-12 12:38:51 -04:00 committed by Daniel Stenberg
parent 6d9b40d6a4
commit 8972845123
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
5 changed files with 27 additions and 38 deletions

View file

@ -56,7 +56,6 @@ Graduation requirements:
Graduation requirements:
- a reasonable expectation of a stable API going forward.
- a sufficient approach to avoid using weak random numbers
### WebSocket

View file

@ -34,18 +34,3 @@ See the [rustls-ffi README] for more information on cryptography providers and
their build/platform requirements.
[rustls-ffi README]: https://github.com/rustls/rustls-ffi/blob/main/README.md#cryptography-provide
## Randomness
Every TLS libcurl curl supports - *except* Rustls - provides a function for
curl to extract cryptographically safe random numbers with.
When you build curl with Rustls, curl uses its own internal attempts to get a
decent random value:
1. Windows specific APIs
2. arc4random
If neither of those are present, then curl using Rustls falls back to **weak
pseudo-random values**, and thus weakening several curl authentication
implementations.