KEYCLOAK-5176 Strip headers from PEM when uploading to client

This commit is contained in:
stianst authored and Stian Thorgersen committed 2017-12-04 19:54:15 +01:00
1 parent 19cfbbf7ff
commit 4541acc628
4 files changed
+22 -6

No files matched your search

@@ -149,7 +149,7 @@ public final class PemUtils {
return Base64.decode(pem);
}
private static String removeBeginEnd(String pem) {
public static String removeBeginEnd(String pem) {
pem = pem.replaceAll("-----BEGIN (.*)-----", "");
pem = pem.replaceAll("-----END (.*)----", "");
pem = pem.replaceAll("\r\n", "");