mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-05-31 17:22:13 +00:00
Assert Error-Messages already includes dashes
When the cert-content is not valid, the assert output message is not correct. Because it outputs too many dashes .The const X509- and PKCS8-PEM_HEADER already includes the dashes. I took the output message via copy and paste, but it was still not valid ;-( Only the output is affected, the checks itself is correct.
This commit is contained in:
parent
3b64cdfc03
commit
658aff501c
@ -83,8 +83,8 @@ public final class RsaKeyConverters {
|
||||
return (source) -> {
|
||||
List<String> lines = readAllLines(source);
|
||||
Assert.isTrue(!lines.isEmpty() && lines.get(0).startsWith(PKCS8_PEM_HEADER),
|
||||
"Key is not in PEM-encoded PKCS#8 format, please check that the header begins with -----"
|
||||
+ PKCS8_PEM_HEADER + "-----");
|
||||
"Key is not in PEM-encoded PKCS#8 format, please check that the header begins with "
|
||||
+ PKCS8_PEM_HEADER);
|
||||
StringBuilder base64Encoded = new StringBuilder();
|
||||
for (String line : lines) {
|
||||
if (RsaKeyConverters.isNotPkcs8Wrapper(line)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user