Skip to content

Commit

Permalink
fix self signed certificate compatibility (#18)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
sonnyp authored Oct 20, 2021
1 parent a56489f commit d8bfd18
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,16 @@ To override a value, simply add it to `~/.chalet/conf.json` and run `chalet stop

## FAQ

#### Problem with self signed certificates

You will want to delete your existing certificates and restart chalet:

```sh
chalet stop
rm ~/.chalet/cert.pem ~/.chalet/key.pem
chalet start
```

#### Setting a fixed port

```sh
Expand Down
4 changes: 3 additions & 1 deletion src/daemon/pem.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ function generate() {
const pems = selfsigned.generate(
[{ name: "commonName", value: "chalet" }],
{
days: 365
keySize: 2048,
days: 365,
algorithm: "sha256"
}
);
fs.writeFileSync(KEY_FILE, pems.private, "utf-8");
Expand Down

0 comments on commit d8bfd18

Please sign in to comment.