aboutsummaryrefslogtreecommitdiff
path: root/src/main/ui/Utils.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/ui/Utils.java')
-rw-r--r--src/main/ui/Utils.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main/ui/Utils.java b/src/main/ui/Utils.java
index f653ffa..4a9beeb 100644
--- a/src/main/ui/Utils.java
+++ b/src/main/ui/Utils.java
@@ -80,7 +80,11 @@ public final class Utils {
throw new ParseException("Not a valid PEM");
}
final String b64 = matcher.group(1).replace("\n", "");
- return byteToByte(Base64.getDecoder().decode(b64));
+ try {
+ return byteToByte(Base64.getDecoder().decode(b64));
+ } catch (IllegalArgumentException e) {
+ throw new ParseException(e.getMessage());
+ }
}
/**