Skip to content

Commit

Permalink
Merge pull request #114 from fibonacci1729/feat-33
Browse files Browse the repository at this point in the history
feat: TLS support for Spin.
  • Loading branch information
fibonacci1729 committed Mar 2, 2022
2 parents 6651c2c + 077022d commit 0daf976
Show file tree
Hide file tree
Showing 11 changed files with 361 additions and 62 deletions.
44 changes: 43 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
LOG_LEVEL ?= spin=trace
CERT_NAME ?= local

.PHONY: build
build:
Expand All @@ -9,3 +10,10 @@ test:
RUST_LOG=$(LOG_LEVEL) cargo test --all -- --nocapture
cargo clippy --all-targets --all-features -- -D warnings
cargo fmt --all -- --check

# simple convenience for developing with TLS
.PHONY: tls
tls: ${CERT_NAME}.crt.pem

$(CERT_NAME).crt.pem:
openssl req -newkey rsa:2048 -nodes -keyout $(CERT_NAME).key.pem -x509 -days 365 -out $(CERT_NAME).crt.pem
5 changes: 5 additions & 0 deletions crates/http/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,18 @@ async-trait = "0.1"
bytes = "1.1"
ctrlc = "3.2.1"
futures = "0.3"
futures-util = "0.3.8"
http = "0.2"
hyper = { version = "0.14", features = [ "full" ] }
hyper-rustls = { version = "0.23.0" }
indexmap = "1.6"
serde = { version = "1.0", features = [ "derive" ] }
spin-config = { path = "../config" }
spin-engine = { path = "../engine" }
tls-listener = { version = "0.4.0", features = ["rustls", "hyper-h1", "hyper-h2"] }
tokio = { version = "1.10", features = [ "full" ] }
tokio-rustls = { version = "0.23.2" }
rustls-pemfile = "0.3.0"
tracing = { version = "0.1", features = [ "log" ] }
tracing-futures = "0.2"
tracing-subscriber = { version = "0.3.7", features = [ "env-filter" ] }
Expand Down
Loading

0 comments on commit 0daf976

Please sign in to comment.