mirror of
https://github.com/1f349/orchid.git
synced 2024-12-22 08:04:10 +00:00
Fix test using rsa bytes without pem encoding
This commit is contained in:
parent
43905a3dc3
commit
cebad8224c
@ -124,14 +124,14 @@ func setupPebbleTest(t *testing.T, serverTls *certgen.CertGen) *Service {
|
|||||||
service, err := NewService(wg, db, acmeProv, LetsEncryptConfig{
|
service, err := NewService(wg, db, acmeProv, LetsEncryptConfig{
|
||||||
Account: LetsEncryptAccount{
|
Account: LetsEncryptAccount{
|
||||||
Email: "webmaster@example.test",
|
Email: "webmaster@example.test",
|
||||||
PrivateKey: string(x509.MarshalPKCS1PrivateKey(lePrivKey)),
|
PrivateKey: string(pem.EncodeToMemory(&pem.Block{Type: "RSA PRIVATE KEY", Bytes: x509.MarshalPKCS1PrivateKey(lePrivKey)})),
|
||||||
},
|
},
|
||||||
Directory: "https://localhost:14000/dir",
|
Directory: "https://localhost:14000/dir",
|
||||||
Certificate: string(certRaw),
|
Certificate: string(certRaw),
|
||||||
insecure: true,
|
insecure: true,
|
||||||
}, certDir, keyDir)
|
}, certDir, keyDir)
|
||||||
service.transport = acmeProv
|
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
|
service.transport = acmeProv
|
||||||
|
|
||||||
privKey, err := rsa.GenerateKey(rand.Reader, 2048)
|
privKey, err := rsa.GenerateKey(rand.Reader, 2048)
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
|
Loading…
Reference in New Issue
Block a user