Merge pull request #59 from onixbyte/fix/component-missing-in-key-loader

This commit is contained in:
Zihlu Wang
2025-05-16 14:48:31 +08:00
committed by GitHub
@@ -69,8 +69,8 @@ public interface KeyLoader {
default String getRawContent(String pemKeyText) { default String getRawContent(String pemKeyText) {
// remove all unnecessary parts of the pem key text // remove all unnecessary parts of the pem key text
return pemKeyText return pemKeyText
.replaceAll("-----BEGIN (EC )?(PRIVATE|PUBLIC) KEY-----", "") .replaceAll("-----BEGIN ((EC )|(RSA ))?(PRIVATE|PUBLIC) KEY-----", "")
.replaceAll("-----END (EC )?(PRIVATE|PUBLIC) KEY-----", "") .replaceAll("-----END ((EC )|(RSA ))?(PRIVATE|PUBLIC) KEY-----", "")
.replaceAll("\n", ""); .replaceAll("\n", "");
} }