rustls-example/README.md
2024-08-05 17:01:24 +09:00

41 lines
618 B
Markdown

# TLS on Rust and PKI
## How to Build
```bash
$ cargo build
```
## Run TLS Server
```bash
$ cargo run --bin TcpExample certs/host/fullchain.pem certs/host/server.key
```
## Run TLS Client
```bash
# EXEC_TARGET=client
$ EXEC_TARGET=allow_any_cert_client
$ cargo run --bin $EXEC_TARGET certs/rootca/rootCA.crt
```
## Make rootCA Certificate
```bash
$ cd certs/rootca
# edit rootca.conf
$ ./bootstrap cert_name
```
## Make ICA Certificate
```bash
$ cd certs/ica
# edit ica.conf
$ ./bootstrap cert_name
```
## Make Server Certificate
```bash
$ cd certs/host
# edit host.conf
$ ./bootstrap cert_name
```