diff options
author | CGantert345 <57003061+CGantert345@users.noreply.github.com> | 2021-11-25 16:39:28 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-25 16:39:28 +0100 |
commit | c9f27f2de9b3fa713d10cb2f8014aad4e8af3070 (patch) | |
tree | ca00d8bae19bfcb5d7d55b388b568136ea62b57d /src/main/java/org/uic/barcode/dynamicFrame | |
parent | Merge pull request #34 from UnionInternationalCheminsdeFer/1.2.7 (diff) | |
parent | test and bug fix on countermark and viaStation (diff) | |
download | UIC-barcode-c9f27f2de9b3fa713d10cb2f8014aad4e8af3070.tar UIC-barcode-c9f27f2de9b3fa713d10cb2f8014aad4e8af3070.tar.gz UIC-barcode-c9f27f2de9b3fa713d10cb2f8014aad4e8af3070.tar.bz2 UIC-barcode-c9f27f2de9b3fa713d10cb2f8014aad4e8af3070.tar.lz UIC-barcode-c9f27f2de9b3fa713d10cb2f8014aad4e8af3070.tar.xz UIC-barcode-c9f27f2de9b3fa713d10cb2f8014aad4e8af3070.tar.zst UIC-barcode-c9f27f2de9b3fa713d10cb2f8014aad4e8af3070.zip |
Diffstat (limited to 'src/main/java/org/uic/barcode/dynamicFrame')
4 files changed, 5 insertions, 6 deletions
diff --git a/src/main/java/org/uic/barcode/dynamicFrame/Constants.java b/src/main/java/org/uic/barcode/dynamicFrame/Constants.java index 774475a..8f47986 100644 --- a/src/main/java/org/uic/barcode/dynamicFrame/Constants.java +++ b/src/main/java/org/uic/barcode/dynamicFrame/Constants.java @@ -16,6 +16,7 @@ public class Constants { public static String DATA_TYPE_FCB_VERSION_1 = "FCB1";
public static String DATA_TYPE_FCB_VERSION_2 = "FCB2";
+ public static String DATA_TYPE_FCB_VERSION_3 = "FCB3";
public static String DYNAMIC_BARCODE_FORMAT_DEFAULT = "U1";
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;
|