mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-10-10 15:13:22 +02:00
Merge pull request #7678 from erikarvstedt/fix-cert-key-plaintext-detection
Restore support for `PKCS8`-encoded cert private keys
This commit is contained in:
@@ -33,11 +33,14 @@
|
|||||||
independently](https://github.com/lightningnetwork/lnd/pull/7592) on wallet
|
independently](https://github.com/lightningnetwork/lnd/pull/7592) on wallet
|
||||||
unlock or create.
|
unlock or create.
|
||||||
|
|
||||||
|
* [Restore support](https://github.com/lightningnetwork/lnd/pull/7678) for
|
||||||
|
`PKCS8`-encoded cert private keys.
|
||||||
|
|
||||||
# Contributors (Alphabetical Order)
|
# Contributors (Alphabetical Order)
|
||||||
|
|
||||||
* Carla Kirk-Cohen
|
* Carla Kirk-Cohen
|
||||||
* Daniel McNally
|
* Daniel McNally
|
||||||
* Elle Mouton
|
* Elle Mouton
|
||||||
|
* Erik Arvstedt
|
||||||
* hieblmi
|
* hieblmi
|
||||||
* Jordi Montes
|
* Jordi Montes
|
||||||
|
@@ -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