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
-2
@@ -58,7 +58,7 @@
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "chasquid 1"
|
||||
.TH chasquid 1 2023-10-03 "" ""
|
||||
.TH chasquid 1 2026-09-27 "" ""
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
@@ -134,11 +134,12 @@ Certificates for this domain.
|
||||
Certificate (full chain).
|
||||
.IP \fIcerts/mx.example.com/privkey.pem\fR 8
|
||||
.IX Item "certs/mx.example.com/privkey.pem"
|
||||
Private key.
|
||||
Private key (can also be named \fIkey.pem\fR).
|
||||
.PP
|
||||
Note the \fIcerts/\fR directory layout matches the one from certbot (client for
|
||||
Let\*(Aqs Encrypt CA), so you can just symlink \fIcerts/\fR to
|
||||
\&\fI/etc/letsencrypt/live\fR.
|
||||
The layout from the NixOS ACME module (\fI/var/lib/acme\fR) is also supported.
|
||||
.PP
|
||||
Make sure the user you use to run chasquid under ("mail" in the example
|
||||
config) can access the certificates and private keys.
|
||||
|
||||
Reference in New Issue
Block a user