You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
constpassphrase="Abcd1234!"// passphrase for testdata/ca.encrypted.key
79
+
logger:=logptest.NewTestingLogger(t, "")
78
80
t.Run("no passphrase", func(t*testing.T) {
79
81
_, err:=LoadTLSConfig(mustLoad(t, `
80
82
enabled: true
81
83
certificate: testdata/ca.crt
82
84
key: testdata/ca.encrypted.key
83
-
`))
85
+
`), logger)
84
86
assert.ErrorContains(t, err, "no PEM blocks") // ReadPEMFile will generate an internal "no passphrase available" error that is logged and the no PEM blocks error is returned instead
assert.ErrorContains(t, err, "no PEM blocks") // ReadPEMFile will fail decrypting with x509.IncorrectPasswordError that will be logged and a no PEM blocks error is returned instead
assert.ErrorContains(t, err, "no PEM blocks") // ReadPEMFile will generate an internal "no passphrase available" error that is logged and the no PEM blocks error is returned instead
0 commit comments