summaryrefslogtreecommitdiffstats
path: root/src/main/java/org
diff options
context:
space:
mode:
authorCGantert345 <57003061+CGantert345@users.noreply.github.com>2021-11-22 16:20:23 +0100
committerCGantert345 <57003061+CGantert345@users.noreply.github.com>2021-11-22 16:20:23 +0100
commit3439ff611093d54368826b59515659f04c5788e3 (patch)
treed929d8618cf434a7a9e390a8dd25e7487d8f77ec /src/main/java/org
parent- fix on null pointer exception for tickets created ad midnight (diff)
downloadUIC-barcode-3439ff611093d54368826b59515659f04c5788e3.tar
UIC-barcode-3439ff611093d54368826b59515659f04c5788e3.tar.gz
UIC-barcode-3439ff611093d54368826b59515659f04c5788e3.tar.bz2
UIC-barcode-3439ff611093d54368826b59515659f04c5788e3.tar.lz
UIC-barcode-3439ff611093d54368826b59515659f04c5788e3.tar.xz
UIC-barcode-3439ff611093d54368826b59515659f04c5788e3.tar.zst
UIC-barcode-3439ff611093d54368826b59515659f04c5788e3.zip
Diffstat (limited to '')
-rw-r--r--src/main/java/org/uic/barcode/dynamicFrame/DataType.java2
-rw-r--r--src/main/java/org/uic/barcode/dynamicFrame/DynamicFrame.java6
-rw-r--r--src/main/java/org/uic/barcode/dynamicFrame/Level1DataType.java2
3 files changed, 4 insertions, 6 deletions
diff --git a/src/main/java/org/uic/barcode/dynamicFrame/DataType.java b/src/main/java/org/uic/barcode/dynamicFrame/DataType.java
index 2d6d984..2ea63ca 100644
--- a/src/main/java/org/uic/barcode/dynamicFrame/DataType.java
+++ b/src/main/java/org/uic/barcode/dynamicFrame/DataType.java
@@ -1,6 +1,5 @@
package org.uic.barcode.dynamicFrame;
-import org.uic.barcode.asn1.datatypes.Asn1Default;
import org.uic.barcode.asn1.datatypes.CharacterRestriction;
import org.uic.barcode.asn1.datatypes.RestrictedString;
import org.uic.barcode.asn1.datatypes.Sequence;
@@ -20,7 +19,6 @@ public class DataType {
* -- FCB2 FCB version 2
* -- RICS company code + ...
**/
- @Asn1Default("FCB1")
@RestrictedString(CharacterRestriction.IA5String)
public String format;
diff --git a/src/main/java/org/uic/barcode/dynamicFrame/DynamicFrame.java b/src/main/java/org/uic/barcode/dynamicFrame/DynamicFrame.java
index 6cc1eaa..c74215d 100644
--- a/src/main/java/org/uic/barcode/dynamicFrame/DynamicFrame.java
+++ b/src/main/java/org/uic/barcode/dynamicFrame/DynamicFrame.java
@@ -14,7 +14,6 @@ import java.security.spec.X509EncodedKeySpec;
import org.uic.barcode.asn1.datatypes.Asn1Optional;
import org.uic.barcode.asn1.datatypes.CharacterRestriction;
import org.uic.barcode.asn1.datatypes.FieldOrder;
-import org.uic.barcode.asn1.datatypes.HasExtensionMarker;
import org.uic.barcode.asn1.datatypes.RestrictedString;
import org.uic.barcode.asn1.datatypes.Sequence;
import org.uic.barcode.asn1.datatypesimpl.OctetString;
@@ -29,7 +28,6 @@ import org.uic.barcode.utils.AlgorithmNameResolver;
* Implementation of the Draft under discussion, not final.
*/
@Sequence
-@HasExtensionMarker
public class DynamicFrame extends Object{
public DynamicFrame() {}
@@ -152,7 +150,9 @@ public class DynamicFrame extends Object{
byte[] keyBytes = this.getLevel2SignedData().getLevel1Data().level2publicKey.toByteArray();
X509EncodedKeySpec keySpec = new X509EncodedKeySpec(keyBytes);
key = KeyFactory.getInstance(keyAlgName).generatePublic(keySpec);
- } catch (InvalidKeySpecException | NoSuchAlgorithmException e1) {
+ } catch (InvalidKeySpecException e1) {
+ return Constants.LEVEL2_VALIDATION_KEY_ALG_NOT_IMPLEMENTED;
+ } catch (NoSuchAlgorithmException e1) {
return Constants.LEVEL2_VALIDATION_KEY_ALG_NOT_IMPLEMENTED;
}
diff --git a/src/main/java/org/uic/barcode/dynamicFrame/Level1DataType.java b/src/main/java/org/uic/barcode/dynamicFrame/Level1DataType.java
index aac0188..958cafc 100644
--- a/src/main/java/org/uic/barcode/dynamicFrame/Level1DataType.java
+++ b/src/main/java/org/uic/barcode/dynamicFrame/Level1DataType.java
@@ -34,7 +34,7 @@ public class Level1DataType {
/** The key id. */
@FieldOrder(order = 2)
- @IntRange(minValue=1,maxValue=99999)
+ @IntRange(minValue=0,maxValue=99999)
@Asn1Optional public Long keyId;