Skip to content

Commit db28313

Browse files
committed
fix self signed certificate compatibility
Closes #17 Default keySize is 1024 and algorithm which is not enough nowadays. Default algorithm is sha1 which is deprecated. https://security.googleblog.com/2014/09/gradually-sunsetting-sha-1.html See https://github.com/jfromaniello/selfsigned/blob/c5ac42bdb5949bce47679221284331cab71a1e1e/README.md#options
1 parent a56489f commit db28313

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

Diff for: README.md

+10
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,16 @@ To override a value, simply add it to `~/.chalet/conf.json` and run `chalet stop
215215

216216
## FAQ
217217

218+
#### Problem with self signed certificates
219+
220+
You will want to delete your existing certificates and restart chalet:
221+
222+
```sh
223+
chalet stop
224+
rm ~/.chalet/cert.pem ~/.chalet/key.pem
225+
chalet start
226+
```
227+
218228
#### Setting a fixed port
219229

220230
```sh

Diff for: src/daemon/pem.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ function generate() {
2020
const pems = selfsigned.generate(
2121
[{ name: "commonName", value: "chalet" }],
2222
{
23-
days: 365
23+
keySize: 2048,
24+
days: 365,
25+
algorithm: "sha256"
2426
}
2527
);
2628
fs.writeFileSync(KEY_FILE, pems.private, "utf-8");

0 commit comments

Comments
 (0)