lnd: Restore support for PKCS8-encoded cert private keys
c0f44a17b7, available since `v0.16.x`,
broke support for certificate private keys encoded in the widely-used
`PKCS8` format.
This commit is contained in:
1 parent
04314d3254
commit
3004deb045
1 file changed
+4
-1
+4
-1
@@ -35,7 +35,10 @@ const (
|
|||||||
|
|
||||||
var (
|
var (
|
||||||
// privateKeyPrefix is the prefix to a plaintext TLS key.
|
// privateKeyPrefix is the prefix to a plaintext TLS key.
|
||||||
privateKeyPrefix = []byte("-----BEGIN EC PRIVATE KEY-----")
|
// It should match these two key formats:
|
||||||
|
// - `-----BEGIN PRIVATE KEY-----` (PKCS8).
|
||||||
|
// - `-----BEGIN EC PRIVATE KEY-----` (SEC1/rfc5915, the legacy format).
|
||||||
|
privateKeyPrefix = []byte("-----BEGIN ")
|
||||||
|
|
||||||
// letsEncryptTimeout sets a timeout for the Lets Encrypt server.
|
// letsEncryptTimeout sets a timeout for the Lets Encrypt server.
|
||||||
letsEncryptTimeout = 5 * time.Second
|
letsEncryptTimeout = 5 * time.Second
|
||||||
|
|||||||
Reference in new issue
Block a user