diff options
author | CGantert345 <57003061+CGantert345@users.noreply.github.com> | 2022-05-02 09:52:02 +0200 |
---|---|---|
committer | CGantert345 <57003061+CGantert345@users.noreply.github.com> | 2022-05-02 09:52:02 +0200 |
commit | 12c1b4f44bb1739b8b10270c0787522df5ef1167 (patch) | |
tree | 3576d2e957233999ce6b918253dca2befc9b345b | |
parent | - improved encoding of numerical values outside the allowed range (diff) | |
download | UIC-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 '')
-rw-r--r-- | src/main/java/org/uic/barcode/utils/SecurityUtils.java | 5 |
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);
|