mirror of
https://blitiri.com.ar/repos/chasquid
synced 2026-10-28 15:02:28 +00:00
chasquid: Return error on inaccessible private key file
In commit 3f9d0c0762, we added a new possible private file. If the file exists but there's an error reading it (common for permission issues), currently we just move on to the next file, and if it doesn't exist we may give up with that error. That can "hide" the access problems making them harder to debug. To help with those kinds of errors, this patch updates the logic to return an error if a private key exists but is inaccessible. It also adds an unit test for this function to cover the different scenarios, and updates the docs to match.
This commit is contained in:
+3
-1
@@ -81,7 +81,7 @@ structure:
|
||||
- certs/ Certificates to use, one dir per pair.
|
||||
- mx.example.com/
|
||||
- fullchain.pem Certificate (full chain).
|
||||
- privkey.pem Private key.
|
||||
- privkey.pem Private key (can also be named key.pem).
|
||||
...
|
||||
```
|
||||
|
||||
@@ -91,6 +91,8 @@ The certs/ directory layout matches the one from
|
||||
[certbot](https://certbot.eff.org/),
|
||||
[letsencrypt](https://letsencrypt.org)'s
|
||||
default client, to make it easier to integrate.
|
||||
The layout from the [NixOS ACME module](https://wiki.nixos.org/wiki/ACME)
|
||||
(`/var/lib/acme`) is also supported.
|
||||
|
||||
A convenient way to set this up is:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user