Expand description
Message digests used for certificate thumbprints.
Windows uses the native CNG hash providers (BCrypt). Elsewhere rustls uses standalone RustCrypto hash implementations
(independent of its TLS crypto provider); OpenSSL-only builds use OpenSSL.
| Target | Backend |
|---|---|
| rustls, non-Windows | sha1 / sha2 |
| OpenSSL only, non-Windows | OpenSSL (tls_openssl::sha) |
| windows | CNG (BCryptHashData) |
SHA-1 is provided only because the public API accepts 40 hex character
thumbprints (allowedThumbprints) which are SHA-1 digests of the DER
certificate. The public sha1() function is meant for identification only.
Supporting SHA-1 thumbprints does not enable SHA-1 certificate signatures; their
acceptance follows the trust backend’s policy (see crate::x509::trust).
Enums§
- Algorithm
- Digest algorithm used for certificate thumbprints.
Constants§
- SHA1_
LEN - Size of a SHA-1 digest in bytes.
- SHA256_
LEN - Size of a SHA-256 digest in bytes.