|
|
|
|
@ -25,7 +25,6 @@ import java.nio.file.Path;
@@ -25,7 +25,6 @@ import java.nio.file.Path;
|
|
|
|
|
import java.nio.file.StandardOpenOption; |
|
|
|
|
import java.security.PrivateKey; |
|
|
|
|
import java.security.cert.X509Certificate; |
|
|
|
|
import java.util.Arrays; |
|
|
|
|
import java.util.List; |
|
|
|
|
import java.util.Objects; |
|
|
|
|
import java.util.regex.Pattern; |
|
|
|
|
@ -35,7 +34,6 @@ import org.springframework.boot.io.ApplicationResourceLoader;
@@ -35,7 +34,6 @@ import org.springframework.boot.io.ApplicationResourceLoader;
|
|
|
|
|
import org.springframework.core.io.Resource; |
|
|
|
|
import org.springframework.util.Assert; |
|
|
|
|
import org.springframework.util.StreamUtils; |
|
|
|
|
import org.springframework.util.StringUtils; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* PEM encoded content that can provide {@link X509Certificate certificates} and |
|
|
|
|
@ -54,9 +52,7 @@ public final class PemContent {
@@ -54,9 +52,7 @@ public final class PemContent {
|
|
|
|
|
private final String text; |
|
|
|
|
|
|
|
|
|
private PemContent(String text) { |
|
|
|
|
this.text = Arrays.stream(StringUtils.delimitedListToStringArray(text, "\n")) |
|
|
|
|
.map(String::trim) |
|
|
|
|
.collect(Collectors.joining("\n")); |
|
|
|
|
this.text = text.lines().map(String::trim).collect(Collectors.joining("\n")); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|