wolfcrypt-tls 0.1.3

Safe Rust TLS API backed by wolfSSL
docs.rs failed to build wolfcrypt-tls-0.1.3
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.

wolfcrypt-tls

Safe Rust TLS client and server backed by wolfSSL. Exported as the wolfssl crate.

Usage

[dependencies]
wolfcrypt-tls = "0.1"
use wolfssl::{TlsClientConfig, TlsClient, RootCertStore};
use std::io::{Read, Write};
use std::net::TcpStream;

let mut roots = RootCertStore::new();
roots.add_pem(include_bytes!("ca.pem"));

let config = TlsClientConfig::builder()
    .with_root_certificates(roots)
    .with_no_client_auth()
    .build()?;

let stream = TcpStream::connect("example.com:443")?;
let mut tls = TlsClient::new(config, "example.com", stream)?;
tls.write_all(b"GET / HTTP/1.1\r\nHost: example.com\r\n\r\n")?;

Server-side uses TlsServerConfig and TlsServer symmetrically.

Features

Feature Description
vendored Compile wolfSSL from source (requires WOLFSSL_SRC or pkg-config)
fips Enable the wolfSSL FIPS 140-3 code path

FIPS 140-3 validated builds require a wolfSSL commercial license and the validated source tree. See the workspace README for details.

Status

  • TLS 1.2 and TLS 1.3
  • Blocking I/O (async support planned)
  • Unix and Windows socket support

License

MIT