summaryrefslogtreecommitdiff
path: root/internal/suites/suite_cli_test.go
diff options
context:
space:
mode:
authorJames Elliott <james-d-elliott@users.noreply.github.com>2024-05-29 22:53:57 +1000
committerGitHub <noreply@github.com>2024-05-29 22:53:57 +1000
commit2eaef3ca804fb792b5c7b065d25f4329751b5c54 (patch)
tree98705f4b6b23f9048469f37fe01b9260563f7c12 /internal/suites/suite_cli_test.go
parent3c42165764d75f094a9be935d429865680123c68 (diff)
fix(configuration): key with trailing data ignored (#7358)
When decoding private key or single certificate types, trailing data was being skipped. This addresses that issue. Signed-off-by: James Elliott <james-d-elliott@users.noreply.github.com>
Diffstat (limited to 'internal/suites/suite_cli_test.go')
-rw-r--r--internal/suites/suite_cli_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/suites/suite_cli_test.go b/internal/suites/suite_cli_test.go
index 7e22007c5..a33385909 100644
--- a/internal/suites/suite_cli_test.go
+++ b/internal/suites/suite_cli_test.go
@@ -798,11 +798,11 @@ func (s *CLISuite) TestShouldNotGenerateRSAWithBadCAFileContent() {
output, err = s.Exec("authelia-backend", []string{"authelia", "crypto", "certificate", "rsa", "generate", "--path.ca=/tmp/", "--file.ca-private-key=ca.private.bad.pem", "--directory=/tmp/"})
s.NotNil(err)
- s.Contains(output, "Error: could not parse private key from file '/tmp/ca.private.bad.pem': failed to parse PEM block containing the key\n")
+ s.Contains(output, "Error: could not parse private key from file '/tmp/ca.private.bad.pem': error occurred attempting to parse PEM block: either no PEM block was supplied or it was malformed\n")
output, err = s.Exec("authelia-backend", []string{"authelia", "crypto", "certificate", "rsa", "generate", "--path.ca=/tmp/", "--file.ca-certificate=ca.public.bad.crt", "--directory=/tmp/"})
s.NotNil(err)
- s.Contains(output, "Error: could not parse certificate from file '/tmp/ca.public.bad.crt': failed to parse PEM block containing the key\n")
+ s.Contains(output, "Error: could not parse certificate from file '/tmp/ca.public.bad.crt': error occurred attempting to parse PEM block: either no PEM block was supplied or it was malformed\n")
}
func (s *CLISuite) TestStorage00ShouldShowCorrectPreInitInformation() {