Added TLS certificate validation that detects encrypted (password-protected) private keys and provides a clear error message with instructions on how to decrypt them using openssl. This addresses user confusion when Go's standard library fails with the cryptic 'tls: failed to parse private key' error. Changes: - Added validateTLSCertificates function to validate certs before server start - Added isEncryptedPEM helper to detect both PKCS#8 and legacy encrypted keys - Added comprehensive tests for TLS validation including encrypted key detection - Added integration test that starts server with TLS and verifies HTTPS works - Added test certificates (valid for 100 years) with SAN for localhost Signed-off-by: Deluan <deluan@navidrome.org> |
||
|---|---|---|
| .. | ||
| backgrounds | ||
| events | ||
| nativeapi | ||
| public | ||
| subsonic | ||
| testdata | ||
| auth.go | ||
| auth_test.go | ||
| initial_setup.go | ||
| initial_setup_test.go | ||
| middlewares.go | ||
| middlewares_test.go | ||
| serve_index.go | ||
| serve_index_test.go | ||
| server.go | ||
| server_suite_test.go | ||
| server_test.go | ||