-
Notifications
You must be signed in to change notification settings - Fork 25
Open
Description
The README.md is lacking in documenting how to use TLS Support:
"If you need TLS support for the server, you'll need to compile with the ssl feature set."
I'm willing to augment the README.md with the solution but I'm unable to get it working myself 😞
I'm unable to curl the TLS endpoint (403):
curl \
--insecure \
--key privatekey.pem \
--cert certificate.pem \
--write-out '%{response_code}' \
https://${HOST}:8888And I'm unable to discover the device in the gateway.
thing-url-adapter:
Failed to connect to https://${HOST}.local:8888:
FetchError: request to https://${HOST}.local:8888/ failed, reason: self signed certificateI believe, in the example code, I should replace:
webthing = "0.13.2"with, e.g.:
[dependencies.webthing]
path = "../webthing-rust"
version = "0.13.2"
features = ["ssl"]Then:
- I generated a self-signed cert using
HOST=localhost - I generated a self-signed cert using
HOST=$(hostname).local - I referenced the
privatekey.pemandcertificate.pemfrom the WebThings Gateway's config's SSL directory
openssl req \
-x509 \
-nodes \
-days 365 \
-newkey rsa:2048 \
-keyout privatekey.pem \
-out certificate.pem \
-subj /CN=${HOST}And:
let mut server = WebThingServer::new(
ThingsType::Multiple(things, "Rusty-Device".to_owned()),
Some(8888),
None,
Some(("privatekey.pem".to_string(), "certificate.pem".to_string())),
Box::new(Generator),
None,
)Metadata
Metadata
Assignees
Labels
No labels