Yggmail fork of rustls.
  • Rust 98.3%
  • HTML 0.9%
  • Python 0.3%
  • Shell 0.3%
  • CSS 0.1%
  • Other 0.1%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
JB-SelfCompany 939062fbea docs: point the fork note at the canonical Yggmail-ng repository
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 15:02:24 +03:00
.cargo cargo: add --all to the fmt-unstable alias 2024-03-04 09:27:43 +00:00
.github bogo: remove PostQuantum setup 2026-09-07 09:03:51 +00:00
admin Move tests/common/mod.rs to rustls-test crate 2025-05-21 09:28:41 +00:00
audit Audit report with editorial changes 2020-06-15 22:15:23 +01:00
bogo ech: hold the server to its hello retry request decision 2026-10-13 09:44:43 +00:00
ci-bench ci-bench: allow clippy::double_must_use for async-trait expansions 2026-08-13 11:27:22 +00:00
connect-tests connect-tests: delete ech.rs 2026-06-22 13:16:59 +00:00
examples Upgrade to hickory-resolver 0.26 2026-06-22 13:16:59 +00:00
fuzz Bump version to 0.23.46 2026-10-13 09:44:43 +00:00
openssl-tests Address new std_instead_of_core in nightly 2026-07-10 11:15:53 +00:00
provider-example Upgrade to rcgen 0.14 2025-07-04 08:46:18 +00:00
rustls fix(server): tolerate an unparseable SNI instead of aborting the handshake 2026-11-17 15:00:36 +03:00
rustls-bench rustls-bench: short circuit single threaded tests 2025-07-29 17:57:30 +00:00
rustls-fuzzing-provider fuzzing-provider: support no-op ticketer 2025-06-12 13:44:32 +00:00
rustls-post-quantum Add ML-KEM-1024 key encapsulation mechanism 2026-02-24 16:53:42 +00:00
rustls-provider-test add crate for provider integration tests 2024-05-31 12:46:48 +00:00
rustls-test stream: continue reading while we're writing 2026-10-13 09:44:43 +00:00
test-ca Add public keys in PEM format for end entity and client 2024-08-14 12:08:35 +00:00
website Use tlswg name for draft-kwiatkowski-tls-ecdhe-mlkem 2025-04-08 12:11:22 +00:00
.gitignore Keep Cargo.lock under version control 2023-09-26 13:38:35 +00:00
.lycheeignore ci: add lychee linkchecking to docs workflow 2024-10-22 13:36:26 +00:00
.rustfmt.toml rustfmt: synchronise unstable and stable configs 2025-05-21 14:04:53 +00:00
.rustfmt.unstable.toml rustfmt: synchronise unstable and stable configs 2025-05-21 14:04:53 +00:00
.taplo.toml chore: enforce taplo toml formatting 2025-01-22 13:48:04 +00:00
BENCHMARKING.md Adopt benchmarking docs to new rustls-bench crate 2024-12-12 22:14:24 +00:00
Cargo.lock Bump version to 0.23.46 2026-10-13 09:44:43 +00:00
Cargo.toml aws-lc-rs: add support for ML-DSA signatures 2026-09-07 09:03:51 +00:00
CHANGELOG.md doc: make it easier to find changelog 2023-12-01 08:40:16 +00:00
CODE_OF_CONDUCT.md Adopt the Rust CoC; use mailing list for vuln reports 2021-08-08 11:13:45 +01:00
CONTRIBUTING.md docs: fix CONTRIBUTING.md broken link 2024-12-15 14:56:18 +00:00
deny.toml Accept that libcrux deps are vulnerable 2026-07-29 16:03:56 +00:00
LICENSE Add license info 2016-06-19 17:42:57 +01:00
LICENSE-APACHE Add license info 2016-06-19 17:42:57 +01:00
LICENSE-ISC Add license info 2016-06-19 17:42:57 +01:00
LICENSE-MIT Add license info 2016-06-19 17:42:57 +01:00
README.md docs: point the fork note at the canonical Yggmail-ng repository 2026-11-17 15:02:24 +03:00
RELEASING.md Update RELEASING.md with instructions about fuzz/Cargo.lock 2025-01-09 21:45:45 +00:00
ROADMAP.md roadmap: reflect 0.23.11 2024-07-08 16:01:14 +00:00
SECURITY.md SECURITY.md: temporal updates 2025-05-09 16:15:04 +00:00

Important

This is a fork of rustls/rustls for Yggmail. Use upstream rustls unless you need exactly this change.

Branches are named yggmail/<upstream version> and contain the upstream tag v/<version> plus one commit: the server ignores an unparseable SNI (ServerNamePayload::Invalid) the same way it ignores an IP literal, instead of aborting the handshake with a fatal IllegalParameter alert. yggmail-go sends ServerName = hex(pubkey), which is a single 64-character label and exceeds the DNS limit of 63. Yggmail does not use SNI: peers are authenticated by the Ed25519 key in their certificate.

Updating: git rebase --onto v/<new> v/<old> yggmail/<old>, then create a branch named yggmail/<new>.

Rustls is a modern TLS library written in Rust.

Status

Rustls is used in production at many organizations and projects. We aim to maintain reasonable API surface stability but the API may evolve as we make changes to accommodate new features or performance improvements.

We have a roadmap for our future plans. We also have benchmarks to prevent performance regressions and to let you evaluate rustls on your target hardware.

If you'd like to help out, please see CONTRIBUTING.md.

Build Status Coverage Status (codecov.io) Documentation Chat OpenSSF Best Practices

Changelog

The detailed list of changes in each release can be found at https://github.com/rustls/rustls/releases.

Documentation

https://docs.rs/rustls/

Approach

Rustls is a TLS library that aims to provide a good level of cryptographic security, requires no configuration to achieve that security, and provides no unsafe features or obsolete cryptography by default.

Rustls implements TLS1.2 and TLS1.3 for both clients and servers. See the full list of protocol features.

Platform support

While Rustls itself is platform independent, by default it uses aws-lc-rs for implementing the cryptography in TLS. See the aws-lc-rs FAQ for more details of the platform/architecture support constraints in aws-lc-rs.

ring is also available via the ring crate feature: see the supported ring target platforms.

By providing a custom instance of the crypto::CryptoProvider struct, you can replace all cryptography dependencies of rustls. This is a route to being portable to a wider set of architectures and environments, or compliance requirements. See the crypto::CryptoProvider documentation for more details.

Specifying default-features = false when depending on rustls will remove the implicit dependency on aws-lc-rs.

Rustls requires Rust 1.71 or later. It has an optional dependency on zlib-rs which requires 1.75 or later.

Cryptography providers

Since Rustls 0.22 it has been possible to choose the provider of the cryptographic primitives that Rustls uses. This may be appealing if you have specific platform, compliance or feature requirements that aren't met by the default provider, aws-lc-rs.

Users that wish to customize the provider in use can do so when constructing ClientConfig and ServerConfig instances using the with_crypto_provider method on the respective config builder types. See the crypto::CryptoProvider documentation for more details.

Built-in providers

Rustls ships with two built-in providers controlled by associated crate features:

  • aws-lc-rs - enabled by default, available with the aws_lc_rs crate feature enabled.
  • ring - available with the ring crate feature enabled.

See the documentation for crypto::CryptoProvider for details on how providers are selected.

Third-party providers

The community has also started developing third-party providers for Rustls:

Custom provider

We also provide a simple example of writing your own provider in the custom provider example. This example implements a minimal provider using parts of the RustCrypto ecosystem.

See the Making a custom CryptoProvider section of the documentation for more information on this topic.

Example code

Our examples directory contains demos that show how to handle I/O using the stream::Stream helper, as well as more complex asynchronous I/O using mio. If you're already using Tokio for an async runtime you may prefer to use tokio-rustls instead of interacting with rustls directly.

The mio based examples are the most complete, and discussed below. Users new to Rustls may prefer to look at the simple client/server examples before diving in to the more complex MIO examples.

Client example program

The MIO client example program is named tlsclient-mio.

Some sample runs:

$ cargo run --bin tlsclient-mio -- --http mozilla-modern.badssl.com
HTTP/1.1 200 OK
Server: nginx/1.6.2 (Ubuntu)
Date: Wed, 01 Jun 2016 18:44:00 GMT
Content-Type: text/html
Content-Length: 644
(...)

or

$ cargo run --bin tlsclient-mio -- --http expired.badssl.com
TLS error: InvalidCertificate(Expired)
Connection closed

Run cargo run --bin tlsclient-mio -- --help for more options.

Server example program

The MIO server example program is named tlsserver-mio.

Here's a sample run; we start a TLS echo server, then connect to it with openssl and tlsclient-mio:

$ cargo run --bin tlsserver-mio -- --certs test-ca/rsa-2048/end.fullchain --key test-ca/rsa-2048/end.key -p 8443 echo &
$ echo hello world | openssl s_client -ign_eof -quiet -connect localhost:8443
depth=2 CN = ponytown RSA CA
verify error:num=19:self signed certificate in certificate chain
hello world
^C
$ echo hello world | cargo run --bin tlsclient-mio -- --cafile test-ca/rsa-2048/ca.cert --port 8443 localhost
hello world
^C

Run cargo run --bin tlsserver-mio -- --help for more options.

License

Rustls is distributed under the following three licenses:

  • Apache License version 2.0.
  • MIT license.
  • ISC license.

These are included as LICENSE-APACHE, LICENSE-MIT and LICENSE-ISC respectively. You may use this software under the terms of any of these licenses, at your option.

Project Membership

  • Joe Birr-Pixton (@ctz, Project Founder - full-time funded by Prossimo)
  • Dirkjan Ochtman (@djc, Co-maintainer)
  • Daniel McCarney (@cpu, Co-maintainer)
  • Josh Aas (@bdaehlie, Project Management)

Code of conduct

This project adopts the Rust Code of Conduct. Please email rustls-mod@googlegroups.com to report any instance of misconduct, or if you have any comments or questions on the Code of Conduct.