fix: missing components for RSA key pair

This commit is contained in:
siujamo
2025-05-16 10:03:32 +08:00
parent 07f697c0ca
commit 78f9d2d3a7
@@ -69,8 +69,8 @@ public interface KeyLoader {
default String getRawContent(String pemKeyText) {
// remove all unnecessary parts of the pem key text
return pemKeyText
.replaceAll("-----BEGIN (EC )?(PRIVATE|PUBLIC) KEY-----", "")
.replaceAll("-----END (EC )?(PRIVATE|PUBLIC) KEY-----", "")
.replaceAll("-----BEGIN ((EC )|(RSA ))?(PRIVATE|PUBLIC) KEY-----", "")
.replaceAll("-----END ((EC )|(RSA ))?(PRIVATE|PUBLIC) KEY-----", "")
.replaceAll("\n", "");
}