Skip to content

Commit 1ba11b1

Browse files
authored
fix loading PEM encoded cert as yaml (#79)
Signed-off-by: Bob Callaway <[email protected]>
1 parent 360568d commit 1ba11b1

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/modules/components/Entry.tsx

+5-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,11 @@ const DUMP_OPTIONS: jsyaml.DumpOptions = {
3535
replacer: (key, value) => {
3636
if (Convert.isBase64(value)) {
3737
try {
38-
return load(window.atob(value));
38+
let decodedVal = window.atob(value);
39+
if (decodedVal.startsWith("-----BEGIN")) {
40+
return decodedVal;
41+
}
42+
return load(decodedVal);
3943
} catch (e) {
4044
return value;
4145
}

0 commit comments

Comments
 (0)