📦 fix up stuff and dump cert to stdout as Base64

main
_ 2021-07-18 00:33:01 +00:00
parent 1a74a792bc
commit e6e8f9edf8
4 changed files with 6 additions and 1 deletions

1
Cargo.lock generated
View File

@ -1351,6 +1351,7 @@ name = "quic_demo"
version = "0.1.0"
dependencies = [
"anyhow",
"base64",
"futures-util",
"quinn",
"rcgen",

View File

@ -8,6 +8,7 @@ edition = "2018"
[dependencies]
anyhow = "1.0.38"
base64 = "0.13.0"
futures-util = "0.3.9"
quinn = "0.7.2"
rcgen = "0.8.11"

View File

@ -12,7 +12,9 @@ pushd ../../
git archive --format=tar "$GIT_COMMIT" | sudo docker build -f prototypes/quic_demo/Dockerfile -t "$DOCKER_TAG" --build-arg "git_version=$GIT_COMMIT" -
popd
sudo docker run --rm "$DOCKER_TAG" tar -c \
sudo docker run --rm "$DOCKER_TAG" \
tar -c \
app \
quic_demo_relay_server \
| gzip > "app_packages/ptth_quic_relay_$GIT_COMMIT_SHORT.tar.gz"

View File

@ -16,6 +16,7 @@ async fn main () -> anyhow::Result <()> {
let listen_addr = opt.listen_addr.unwrap_or_else (|| String::from ("0.0.0.0:30380")).parse ()?;
let (mut incoming, server_cert) = make_server_endpoint (listen_addr)?;
println! ("Base64 cert: {}", base64::encode (&server_cert));
tokio::fs::write ("quic_server.crt", &server_cert).await?;
let relay_state = RelayState::default ();