Skip to content

Commit be38668

Browse files
author
Zihlu Wang
authored
Merge pull request #59 from onixbyte/fix/component-missing-in-key-loader
2 parents dd62720 + 78f9d2d commit be38668

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

key-pair-loader/src/main/java/com/onixbyte/security/KeyLoader.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ public interface KeyLoader {
6969
default String getRawContent(String pemKeyText) {
7070
// remove all unnecessary parts of the pem key text
7171
return pemKeyText
72-
.replaceAll("-----BEGIN (EC )?(PRIVATE|PUBLIC) KEY-----", "")
73-
.replaceAll("-----END (EC )?(PRIVATE|PUBLIC) KEY-----", "")
72+
.replaceAll("-----BEGIN ((EC )|(RSA ))?(PRIVATE|PUBLIC) KEY-----", "")
73+
.replaceAll("-----END ((EC )|(RSA ))?(PRIVATE|PUBLIC) KEY-----", "")
7474
.replaceAll("\n", "");
7575
}
7676

0 commit comments

Comments
 (0)