Skip to content

Commit

Permalink
curl example
Browse files Browse the repository at this point in the history
  • Loading branch information
dvush committed Sep 25, 2024
1 parent 96df65e commit 69cc6dc
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

```bash
make build
``**
```

## Run

Expand All @@ -29,3 +29,23 @@ Flags for the orderflow proxy
--cert-duration value generated certificate duration (default: 8760h0m0s)
--cert-hosts value [ --cert-hosts value ] generated certificate hosts (default: "127.0.0.1", "localhost")
```


## curl TLS example

1. Run orderflow proxy

```bash
make build
./build/orderflow-proxy --listen-addr "localhost:8000"
```

2. Extract self signed certificate
```bash
# -k will tell curl to ignore the fact that cert is self signed
curl -w %{certs} -k https://localhost:8000 > cacert.pem
```
3. Make call using this certificate
```bash
curl https://localhost:8000 --cacert cacert.pem
```
Binary file removed cmd/httpserver/httpserver
Binary file not shown.

0 comments on commit 69cc6dc

Please sign in to comment.