summaryrefslogtreecommitdiff
path: root/eaaf_core_utils/src
diff options
context:
space:
mode:
authorThomas <>2021-11-02 14:46:06 +0100
committerThomas <>2021-11-02 14:46:06 +0100
commitdd2cd283ba35d35335e118c91fd95c0a00de693f (patch)
tree8f88c04f0df4143461e43a61d5dd3061fccf6ed8 /eaaf_core_utils/src
parent9eca51b62ef6f69788d5af3a11ffd3191965cf65 (diff)
downloadEAAF-Components-dd2cd283ba35d35335e118c91fd95c0a00de693f.tar.gz
EAAF-Components-dd2cd283ba35d35335e118c91fd95c0a00de693f.tar.bz2
EAAF-Components-dd2cd283ba35d35335e118c91fd95c0a00de693f.zip
add timezone to verifiable pendingRequestId's
Diffstat (limited to 'eaaf_core_utils/src')
-rw-r--r--eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/utils/AuthenticatedEncryptionPendingRequestIdGenerationStrategy.java2
-rw-r--r--eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/utils/SecurePendingRequestIdGenerationStrategy.java2
-rw-r--r--eaaf_core_utils/src/test/java/at/gv/egiz/eaaf/core/impl/utils/test/AuthenticatedEncryptionPendingRequestIdGenerationStrategyTest.java2
3 files changed, 3 insertions, 3 deletions
diff --git a/eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/utils/AuthenticatedEncryptionPendingRequestIdGenerationStrategy.java b/eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/utils/AuthenticatedEncryptionPendingRequestIdGenerationStrategy.java
index 83ea7da0..ca1db67d 100644
--- a/eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/utils/AuthenticatedEncryptionPendingRequestIdGenerationStrategy.java
+++ b/eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/utils/AuthenticatedEncryptionPendingRequestIdGenerationStrategy.java
@@ -70,7 +70,7 @@ public class AuthenticatedEncryptionPendingRequestIdGenerationStrategy
private static final int ENCODED_TOKEN_PARTS = 2;
private static final String TOKEN_SEPARATOR = "|";
private static final DateTimeFormatter TOKEN_TEXTUAL_DATE_FORMAT =
- DateTimeFormat.forPattern("yyyy-MM-dd HH:mm:ss SSS");
+ DateTimeFormat.forPattern("yyyy-MM-dd HH:mm:ss SSS ZZ").withZoneUTC();
private int maxPendingRequestIdLifeTime = 300;
private final int maxPendingReqIdSize = 1024;
diff --git a/eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/utils/SecurePendingRequestIdGenerationStrategy.java b/eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/utils/SecurePendingRequestIdGenerationStrategy.java
index cfb4ed88..5cac4cb0 100644
--- a/eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/utils/SecurePendingRequestIdGenerationStrategy.java
+++ b/eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/utils/SecurePendingRequestIdGenerationStrategy.java
@@ -70,7 +70,7 @@ public class SecurePendingRequestIdGenerationStrategy
private static final int ENCODED_TOKEN_PARTS = 3;
private static final String TOKEN_SEPARATOR = "|";
private static final DateTimeFormatter TOKEN_TEXTUAL_DATE_FORMAT =
- DateTimeFormat.forPattern("yyyy-MM-dd HH:mm:ss SSS");
+ DateTimeFormat.forPattern("yyyy-MM-dd HH:mm:ss SSS ZZ").withZoneUTC();
private int maxPendingRequestIdLifeTime = 300;
private final int maxPendingReqIdSize = 1024;
diff --git a/eaaf_core_utils/src/test/java/at/gv/egiz/eaaf/core/impl/utils/test/AuthenticatedEncryptionPendingRequestIdGenerationStrategyTest.java b/eaaf_core_utils/src/test/java/at/gv/egiz/eaaf/core/impl/utils/test/AuthenticatedEncryptionPendingRequestIdGenerationStrategyTest.java
index 09a9543a..93ef17b9 100644
--- a/eaaf_core_utils/src/test/java/at/gv/egiz/eaaf/core/impl/utils/test/AuthenticatedEncryptionPendingRequestIdGenerationStrategyTest.java
+++ b/eaaf_core_utils/src/test/java/at/gv/egiz/eaaf/core/impl/utils/test/AuthenticatedEncryptionPendingRequestIdGenerationStrategyTest.java
@@ -191,7 +191,7 @@ public class AuthenticatedEncryptionPendingRequestIdGenerationStrategyTest {
@Test
public void wrongFormatWrongDate() throws EaafException, JoseException, UnsupportedEncodingException {
- String payLoad = "2020-01-01 12:01:55 111" + "|"
+ String payLoad = "2020-01-01 12:01:55 111 +00:00" + "|"
+ RandomStringUtils.randomAlphanumeric(25);
String extPendingId = generateEncryptedPendingId(payLoad,