Skip to content

Commit 3d9396d

Browse files
MarkAtwoodclaude
andcommitted
docs(wolfcrypt-tls): add README.md
Adds a README with quick-start examples for TLS client and server, feature flag table, and FIPS notice. Wires it into Cargo.toml so crates.io displays it. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 99a52dc commit 3d9396d

2 files changed

Lines changed: 50 additions & 0 deletions

File tree

wolfcrypt-tls/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ license = "MIT"
77
keywords = ["wolfcrypt", "wolfssl", "tls", "fips", "cryptography"]
88
categories = ["cryptography"]
99
description = "Safe Rust TLS API backed by wolfSSL"
10+
readme = "README.md"
1011
homepage = "http://wolfssl.com"
1112
repository = "https://github.com/wolfSSL/wolfssl-rs"
1213

wolfcrypt-tls/README.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# wolfcrypt-tls
2+
3+
Safe Rust TLS client and server backed by [wolfSSL](https://wolfssl.com). Exported as the `wolfssl` crate.
4+
5+
## Usage
6+
7+
```toml
8+
[dependencies]
9+
wolfcrypt-tls = "0.1"
10+
```
11+
12+
```rust
13+
use wolfssl::{TlsClientConfig, TlsClient, RootCertStore};
14+
use std::io::{Read, Write};
15+
use std::net::TcpStream;
16+
17+
let mut roots = RootCertStore::new();
18+
roots.add_pem(include_bytes!("ca.pem"));
19+
20+
let config = TlsClientConfig::builder()
21+
.with_root_certificates(roots)
22+
.with_no_client_auth()
23+
.build()?;
24+
25+
let stream = TcpStream::connect("example.com:443")?;
26+
let mut tls = TlsClient::new(config, "example.com", stream)?;
27+
tls.write_all(b"GET / HTTP/1.1\r\nHost: example.com\r\n\r\n")?;
28+
```
29+
30+
Server-side uses `TlsServerConfig` and `TlsServer` symmetrically.
31+
32+
## Features
33+
34+
| Feature | Description |
35+
|---------|-------------|
36+
| `vendored` | Compile wolfSSL from source (requires `WOLFSSL_SRC` or pkg-config) |
37+
| `fips` | Enable the wolfSSL FIPS 140-3 code path |
38+
39+
FIPS 140-3 validated builds require a wolfSSL commercial license and the validated source tree. See the [workspace README](https://github.com/wolfSSL/wolfssl-rs) for details.
40+
41+
## Status
42+
43+
- TLS 1.2 and TLS 1.3
44+
- Blocking I/O (async support planned)
45+
- Unix and Windows socket support
46+
47+
## License
48+
49+
MIT

0 commit comments

Comments
 (0)