summaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
authorCGantert345 <57003061+CGantert345@users.noreply.github.com>2022-05-02 09:52:02 +0200
committerCGantert345 <57003061+CGantert345@users.noreply.github.com>2022-05-02 09:52:02 +0200
commit12c1b4f44bb1739b8b10270c0787522df5ef1167 (patch)
tree3576d2e957233999ce6b918253dca2befc9b345b /src/main
parent- improved encoding of numerical values outside the allowed range (diff)
downloadUIC-barcode-12c1b4f44bb1739b8b10270c0787522df5ef1167.tar
UIC-barcode-12c1b4f44bb1739b8b10270c0787522df5ef1167.tar.gz
UIC-barcode-12c1b4f44bb1739b8b10270c0787522df5ef1167.tar.bz2
UIC-barcode-12c1b4f44bb1739b8b10270c0787522df5ef1167.tar.lz
UIC-barcode-12c1b4f44bb1739b8b10270c0787522df5ef1167.tar.xz
UIC-barcode-12c1b4f44bb1739b8b10270c0787522df5ef1167.tar.zst
UIC-barcode-12c1b4f44bb1739b8b10270c0787522df5ef1167.zip
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/org/uic/barcode/utils/SecurityUtils.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main/java/org/uic/barcode/utils/SecurityUtils.java b/src/main/java/org/uic/barcode/utils/SecurityUtils.java
index 1fcc18a..fc6a135 100644
--- a/src/main/java/org/uic/barcode/utils/SecurityUtils.java
+++ b/src/main/java/org/uic/barcode/utils/SecurityUtils.java
@@ -68,7 +68,10 @@ public class SecurityUtils {
String name = key.getAlgorithm();
byte[] keyBytes = key.getEncoded();
-
+
+ if (keyBytes == null || keyBytes.length == 0) {
+ return null;
+ }
PKCS8EncodedKeySpec keySpec = new PKCS8EncodedKeySpec(keyBytes);