diff options
author | CGantert345 <57003061+CGantert345@users.noreply.github.com> | 2021-12-14 17:14:28 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-14 17:14:28 +0100 |
commit | ceb8f4b90b3291008137554170693515a0670313 (patch) | |
tree | 5403dd4495019f9e3f13b2797d95430ec7701025 | |
parent | Merge pull request #40 from UnionInternationalCheminsdeFer/1.2.12 (diff) | |
parent | uodate of version number (diff) | |
download | UIC-barcode-1.2.13.tar UIC-barcode-1.2.13.tar.gz UIC-barcode-1.2.13.tar.bz2 UIC-barcode-1.2.13.tar.lz UIC-barcode-1.2.13.tar.xz UIC-barcode-1.2.13.tar.zst UIC-barcode-1.2.13.zip |
-rw-r--r-- | pom.xml | 2 | ||||
-rw-r--r-- | src/main/java/org/uic/barcode/dynamicContent/fdc1/SequenceOfExtension.java | 1 | ||||
-rw-r--r-- | src/main/java/org/uic/barcode/dynamicContent/fdc1/UicDynamicContentDataFDC1.java | 48 |
3 files changed, 30 insertions, 21 deletions
@@ -2,7 +2,7 @@ <modelVersion>4.0.0</modelVersion>
<groupId>org.uic.barcode</groupId>
<artifactId>org.uic.barcode</artifactId>
- <version>1.2.12-SNAPSHOT</version>
+ <version>1.2.13-SNAPSHOT</version>
<packaging>jar</packaging>
<name>UIC barcode</name>
<description>encoding and decoding of bar code content according to UIC IRS 90918-9</description>
diff --git a/src/main/java/org/uic/barcode/dynamicContent/fdc1/SequenceOfExtension.java b/src/main/java/org/uic/barcode/dynamicContent/fdc1/SequenceOfExtension.java index 38833df..2ca0b22 100644 --- a/src/main/java/org/uic/barcode/dynamicContent/fdc1/SequenceOfExtension.java +++ b/src/main/java/org/uic/barcode/dynamicContent/fdc1/SequenceOfExtension.java @@ -3,7 +3,6 @@ package org.uic.barcode.dynamicContent.fdc1; import java.util.Collection;
import org.uic.barcode.asn1.datatypes.Asn1SequenceOf;
-import org.uic.barcode.ticket.api.asn.omv2.TravelerType;
public class SequenceOfExtension extends Asn1SequenceOf<ExtensionData> {
public SequenceOfExtension() { super(); }
diff --git a/src/main/java/org/uic/barcode/dynamicContent/fdc1/UicDynamicContentDataFDC1.java b/src/main/java/org/uic/barcode/dynamicContent/fdc1/UicDynamicContentDataFDC1.java index c658448..e8f3695 100644 --- a/src/main/java/org/uic/barcode/dynamicContent/fdc1/UicDynamicContentDataFDC1.java +++ b/src/main/java/org/uic/barcode/dynamicContent/fdc1/UicDynamicContentDataFDC1.java @@ -51,6 +51,7 @@ public class UicDynamicContentDataFDC1 { //dynamicContentGeoCoordinate GeoCoordinateType OPTIONAL,
@FieldOrder(order = 2)
@Asn1Optional public GeoCoordinateType geoCoordinate;
+
//-- Response from the mobile to any data received from the terminal.
//-- The data received from the terminal may be a random number, or any other information.
//-- The response may be the data itself, a hashing of this data, or any other response.
@@ -60,11 +61,12 @@ public class UicDynamicContentDataFDC1 { // -- * "=" if the data included in extensionData is exactly the one that was transmitted by the terminal,
// -- * any other value (chosen by the issuer) in other cases.
/** The challenge response. */
-
@FieldOrder(order = 3)
- @Asn1Optional public SequenceOfExtension extensions;
+ @Asn1Optional public SequenceOfExtension dynamicContentResponseToChallenge;
+ @FieldOrder(order = 4)
+ @Asn1Optional public ExtensionData dynamicContentExtension;
//...
@@ -100,8 +102,8 @@ public class UicDynamicContentDataFDC1 { }
public String getChallengeString() {
- if (this.extensions != null) {
- for (ExtensionData ed : extensions) {
+ if (this.dynamicContentResponseToChallenge != null) {
+ for (ExtensionData ed : dynamicContentResponseToChallenge) {
if (ed.getExtensionId().equals("=")) {
byte[] c = ed.getExtensionData();
try {
@@ -116,8 +118,8 @@ public class UicDynamicContentDataFDC1 { }
public void setChallengeString(String challengeString) {
- if (extensions == null) {
- extensions = new SequenceOfExtension();
+ if (dynamicContentResponseToChallenge == null) {
+ dynamicContentResponseToChallenge = new SequenceOfExtension();
};
ExtensionData ed = new ExtensionData();
ed.setExtensionId("=");
@@ -126,12 +128,12 @@ public class UicDynamicContentDataFDC1 { } catch (UnsupportedEncodingException e) {
return;
}
- extensions.add(ed);
+ dynamicContentResponseToChallenge.add(ed);
}
public byte[] getPhoneIdHash() {
- if (this.extensions != null) {
- for (ExtensionData ed : extensions) {
+ if (this.dynamicContentResponseToChallenge != null) {
+ for (ExtensionData ed : dynamicContentResponseToChallenge) {
if (ed.getExtensionId().equals("phone")) {
return ed.getExtensionData();
}
@@ -141,18 +143,18 @@ public class UicDynamicContentDataFDC1 { }
public void setPhoneIdHash(byte[] phoneIdHash) {
- if (extensions == null) {
- extensions = new SequenceOfExtension();
+ if (dynamicContentResponseToChallenge == null) {
+ dynamicContentResponseToChallenge = new SequenceOfExtension();
};
ExtensionData ed = new ExtensionData();
ed.setExtensionId("phone");
ed.setExtensionData(phoneIdHash);
- extensions.add(ed);
+ dynamicContentResponseToChallenge.add(ed);
}
public byte[] getPassIdHash() {
- if (this.extensions != null) {
- for (ExtensionData ed : extensions) {
+ if (this.dynamicContentResponseToChallenge != null) {
+ for (ExtensionData ed : dynamicContentResponseToChallenge) {
if (ed.getExtensionId().equals("pass")) {
return ed.getExtensionData();
}
@@ -162,13 +164,13 @@ public class UicDynamicContentDataFDC1 { }
public void setPassIdHash(byte[] passIdHash) {
- if (extensions == null) {
- extensions = new SequenceOfExtension();
+ if (dynamicContentResponseToChallenge == null) {
+ dynamicContentResponseToChallenge = new SequenceOfExtension();
};
ExtensionData ed = new ExtensionData();
ed.setExtensionId("pass");
ed.setExtensionData(passIdHash);
- extensions.add(ed);
+ dynamicContentResponseToChallenge.add(ed);
}
public TimeStamp getTimeStamp() {
@@ -180,11 +182,11 @@ public class UicDynamicContentDataFDC1 { }
public SequenceOfExtension getExtensions() {
- return extensions;
+ return dynamicContentResponseToChallenge;
}
public void setExtensions(SequenceOfExtension extensions) {
- this.extensions = extensions;
+ this.dynamicContentResponseToChallenge = extensions;
}
public byte[] encode() {
@@ -199,6 +201,14 @@ public class UicDynamicContentDataFDC1 { this.appId = appId;
}
+ public ExtensionData getDynamicContentExtension() {
+ return dynamicContentExtension;
+ }
+
+ public void setDynamicContentExtension(ExtensionData dynamicContentExtension) {
+ this.dynamicContentExtension = dynamicContentExtension;
+ }
+
}
|