Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Openssl | 21,868 | 208 | 9 hours ago | 34 | July 11, 2022 | 2,198 | apache-2.0 | C | ||
TLS/SSL and crypto library | ||||||||||
Forge | 4,689 | 304,614 | 1,366 | a month ago | 132 | March 30, 2022 | 398 | other | JavaScript | |
A native implementation of TLS in Javascript and tools to write crypto-based and network-heavy webapps | ||||||||||
Rustls | 4,552 | 442 | 349 | 2 days ago | 40 | May 18, 2022 | 113 | other | Rust | |
A modern TLS library in Rust | ||||||||||
S2n Tls | 4,283 | 2 | 5 hours ago | 50 | September 21, 2022 | 417 | apache-2.0 | C | ||
An implementation of the TLS/SSL protocols | ||||||||||
Mbedtls | 4,209 | 6 hours ago | 1,267 | apache-2.0 | C | |||||
An open source, portable, easy to use, readable and flexible TLS library, and reference implementation of the PSA Cryptography API. | ||||||||||
Gmssl | 3,976 | 17 days ago | 3 | January 24, 2021 | 129 | apache-2.0 | C | |||
支持国密SM2/SM3/SM4/SM9/SSL的密码工具箱 | ||||||||||
Cli | 3,016 | 78 | 7 hours ago | 265 | September 13, 2022 | 120 | apache-2.0 | Go | ||
🧰 A zero trust swiss army knife for working with X509, OAuth, JWT, OATH OTP, etc. | ||||||||||
Botan | 2,135 | a day ago | 159 | bsd-2-clause | C++ | |||||
Cryptography Toolkit | ||||||||||
Certstrap | 2,016 | 53 | 30 | 24 days ago | 14 | July 01, 2022 | 24 | apache-2.0 | Go | |
Tools to bootstrap CAs, certificate requests, and signed certificates. | ||||||||||
Wolfssl | 1,924 | 17 hours ago | 7 | January 01, 1900 | 106 | gpl-2.0 | C | |||
The wolfSSL library is a small, fast, portable implementation of TLS/SSL for embedded devices to the cloud. wolfSSL supports up to TLS 1.3! |
Rustls is a modern TLS library written in Rust. It's pronounced 'rustles'. It uses ring for cryptography and libwebpki for certificate verification.
Rustls is ready for use. There are no major breaking interface changes expected. Here's what I'm working on now.
If you'd like to help out, please see CONTRIBUTING.md.
webpki
is not likely to process the certificates
in use. Thanks to @DemiMarie-parity.ResolvesServerCert
).AlwaysResolvesClientCert::new
is now fallible,
as is ClientConfig::set_single_client_cert
.Vec<u8>
, not
a String
. This alters the type of:
ClientConfig::alpn_protocols
ClientConfig::set_protocols
ServerConfig::alpn_protocols
ServerConfig::set_protocols
Session::get_alpn_protocol
generate()
removed from StoresServerSessions
trait.take()
added to StoresServerSessions
trait.SSLKEYLOGFILE
; not enabled by default.ServerConfig::set_single_cert
and company now report errors.writev_tls
can now be used to
optimise system call usage.rustls::Stream
which owns its underlying TCP stream
and rustls session.See OLDCHANGES.md for further change history.
Lives here: https://docs.rs/rustls/
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.
The following things are broken, obsolete, badly designed, underspecified, dangerous and/or insane. Rustls does not support:
There are plenty of other libraries that provide these features should you need them.
There are two example programs which use mio to do asynchronous IO.
The client example program is named tlsclient
. The interface looks like:
Connects to the TLS server at hostname:PORT. The default PORT
is 443. By default, this reads a request from stdin (to EOF)
before making the connection. --http replaces this with a
basic HTTP GET request for /.
If --cafile is not supplied, a built-in set of CA certificates
are used from the webpki-roots crate.
Usage:
tlsclient [options] [--suite SUITE ...] [--proto PROTO ...] <hostname>
tlsclient (--version | -v)
tlsclient (--help | -h)
Options:
-p, --port PORT Connect to PORT [default: 443].
--http Send a basic HTTP GET request for /.
--cafile CAFILE Read root certificates from CAFILE.
--auth-key KEY Read client authentication key from KEY.
--auth-certs CERTS Read client authentication certificates from CERTS.
CERTS must match up with KEY.
--protover VERSION Disable default TLS version list, and use
VERSION instead. May be used multiple times.
--suite SUITE Disable default cipher suite list, and use
SUITE instead. May be used multiple times.
--proto PROTOCOL Send ALPN extension containing PROTOCOL.
May be used multiple times to offer several protocols.
--cache CACHE Save session cache to file CACHE.
--no-tickets Disable session ticket support.
--no-sni Disable server name indication support.
--insecure Disable certificate verification.
--verbose Emit log output.
--mtu MTU Limit outgoing messages to MTU bytes.
--version, -v Show tool version.
--help, -h Show this screen.
Some sample runs:
$ cargo run --example tlsclient -- --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 --example tlsclient -- --http expired.badssl.com
TLS error: WebPKIError(CertExpired)
Connection closed
The server example program is named tlsserver
. The interface looks like:
Runs a TLS server on :PORT. The default PORT is 443.
`echo' mode means the server echoes received data on each connection.
`http' mode means the server blindly sends a HTTP response on each
connection.
`forward' means the server forwards plaintext to a connection made to
localhost:fport.
`--certs' names the full certificate chain, `--key' provides the
RSA private key.
Usage:
tlsserver --certs CERTFILE --key KEYFILE [--suite SUITE ...] [--proto PROTO ...] [options] echo
tlsserver --certs CERTFILE --key KEYFILE [--suite SUITE ...] [--proto PROTO ...] [options] http
tlsserver --certs CERTFILE --key KEYFILE [--suite SUITE ...] [--proto PROTO ...] [options] forward <fport>
tlsserver (--version | -v)
tlsserver (--help | -h)
Options:
-p, --port PORT Listen on PORT [default: 443].
--certs CERTFILE Read server certificates from CERTFILE.
This should contain PEM-format certificates
in the right order (the first certificate should
certify KEYFILE, the last should be a root CA).
--key KEYFILE Read private key from KEYFILE. This should be a RSA
private key or PKCS8-encoded private key, in PEM format.
--ocsp OCSPFILE Read DER-encoded OCSP response from OCSPFILE and staple
to certificate. Optional.
--auth CERTFILE Enable client authentication, and accept certificates
signed by those roots provided in CERTFILE.
--require-auth Send a fatal alert if the client does not complete client
authentication.
--resumption Support session resumption.
--tickets Support tickets.
--protover VERSION Disable default TLS version list, and use
VERSION instead. May be used multiple times.
--suite SUITE Disable default cipher suite list, and use
SUITE instead. May be used multiple times.
--proto PROTOCOL Negotiate PROTOCOL using ALPN.
May be used multiple times.
--verbose Emit log output.
--version, -v Show tool version.
--help, -h Show this screen.
Here's a sample run; we start a TLS echo server, then connect to it with openssl and tlsclient:
$ cargo run --example tlsserver -- --certs test-ca/rsa/end.fullchain --key test-ca/rsa/end.rsa -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 --example tlsclient -- --cafile test-ca/rsa/ca.cert -p 8443 localhost
hello world
^C
Rustls is distributed under the following three licenses:
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.