From 517d95eeb4999b4c4bcee746df4d2cd26885cc17 Mon Sep 17 00:00:00 2001 From: Till Neunast Date: Thu, 12 Sep 2024 13:26:09 +1200 Subject: [PATCH 01/11] Fix CVN18 ARQC padding method --- .../main/java/org/jpos/emv/cryptogram/CVN18DataBuilder.java | 2 +- .../java/org/jpos/emv/cryptogram/CVN18DataBuilderTest.java | 2 +- .../java/org/jpos/emv/cryptogram/CVN22DataBuilderTest.java | 5 +++++ .../java/org/jpos/emv/cryptogram/CVNMCDataBuilderTest.java | 4 ++++ 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/jpos/src/main/java/org/jpos/emv/cryptogram/CVN18DataBuilder.java b/jpos/src/main/java/org/jpos/emv/cryptogram/CVN18DataBuilder.java index a7afa712c9..3415e4ce1e 100644 --- a/jpos/src/main/java/org/jpos/emv/cryptogram/CVN18DataBuilder.java +++ b/jpos/src/main/java/org/jpos/emv/cryptogram/CVN18DataBuilder.java @@ -50,6 +50,6 @@ public String buildARQCRequest(TLVList data, IssuerApplicationData iad) { @Override public PaddingMethod getPaddingMethod() { - return PaddingMethod.ISO9797Method1; + return PaddingMethod.ISO9797Method2; } } diff --git a/jpos/src/test/java/org/jpos/emv/cryptogram/CVN18DataBuilderTest.java b/jpos/src/test/java/org/jpos/emv/cryptogram/CVN18DataBuilderTest.java index 10a4e19def..9d4131a753 100644 --- a/jpos/src/test/java/org/jpos/emv/cryptogram/CVN18DataBuilderTest.java +++ b/jpos/src/test/java/org/jpos/emv/cryptogram/CVN18DataBuilderTest.java @@ -57,7 +57,7 @@ void testBuildARQCRequest() { ); assertEquals( - "00000000010000000000000008400000000000084018123101ABCDEF101800000106011203000000", + "00000000010000000000000008400000000000084018123101ABCDEF1018000001060112030000008000000000000000", builder.buildARQCRequest_padded(data, iad) ); diff --git a/jpos/src/test/java/org/jpos/emv/cryptogram/CVN22DataBuilderTest.java b/jpos/src/test/java/org/jpos/emv/cryptogram/CVN22DataBuilderTest.java index 3266b91824..cc8d512de1 100644 --- a/jpos/src/test/java/org/jpos/emv/cryptogram/CVN22DataBuilderTest.java +++ b/jpos/src/test/java/org/jpos/emv/cryptogram/CVN22DataBuilderTest.java @@ -55,5 +55,10 @@ void testBuildARQCRequest() { "00000000010000000000000008400000000000084018123101ABCDEF10180000011F22010300000000000000000000000000000000000000000000000000000000", builder.buildARQCRequest(data, iad) ); + + assertEquals( + "00000000010000000000000008400000000000084018123101ABCDEF10180000011F2201030000000000000000000000000000000000000000000000000000000080000000000000", + builder.buildARQCRequest_padded(data, iad) + ); } } diff --git a/jpos/src/test/java/org/jpos/emv/cryptogram/CVNMCDataBuilderTest.java b/jpos/src/test/java/org/jpos/emv/cryptogram/CVNMCDataBuilderTest.java index 427ce5a943..f26d98e6ac 100644 --- a/jpos/src/test/java/org/jpos/emv/cryptogram/CVNMCDataBuilderTest.java +++ b/jpos/src/test/java/org/jpos/emv/cryptogram/CVNMCDataBuilderTest.java @@ -53,6 +53,10 @@ void buildARPCRequest() { "000000010000000000001000084000000010800840980704001111111158003456608003220000", builder.buildARQCRequest(data, iad) ); + assertEquals( + "00000001000000000000100008400000001080084098070400111111115800345660800322000080", + builder.buildARQCRequest_padded(data, iad) + ); } From a7f3a2a1e2d3e34791ca9ceaad56ae0591246014 Mon Sep 17 00:00:00 2001 From: Till Neunast Date: Sat, 14 Sep 2024 08:03:13 +1200 Subject: [PATCH 02/11] Dummy change to trigger rebuild --- .../test/java/org/jpos/emv/cryptogram/CVN22DataBuilderTest.java | 1 - 1 file changed, 1 deletion(-) diff --git a/jpos/src/test/java/org/jpos/emv/cryptogram/CVN22DataBuilderTest.java b/jpos/src/test/java/org/jpos/emv/cryptogram/CVN22DataBuilderTest.java index cc8d512de1..38b2e77dab 100644 --- a/jpos/src/test/java/org/jpos/emv/cryptogram/CVN22DataBuilderTest.java +++ b/jpos/src/test/java/org/jpos/emv/cryptogram/CVN22DataBuilderTest.java @@ -55,7 +55,6 @@ void testBuildARQCRequest() { "00000000010000000000000008400000000000084018123101ABCDEF10180000011F22010300000000000000000000000000000000000000000000000000000000", builder.buildARQCRequest(data, iad) ); - assertEquals( "00000000010000000000000008400000000000084018123101ABCDEF10180000011F2201030000000000000000000000000000000000000000000000000000000080000000000000", builder.buildARQCRequest_padded(data, iad) From 68863f0c498e24fc5b9bbc97a92b7b82e44f09c3 Mon Sep 17 00:00:00 2001 From: Till Neunast Date: Sat, 14 Sep 2024 08:10:00 +1200 Subject: [PATCH 03/11] Dummy change to trigger rebuild --- .../test/java/org/jpos/emv/cryptogram/CVN18DataBuilderTest.java | 1 - 1 file changed, 1 deletion(-) diff --git a/jpos/src/test/java/org/jpos/emv/cryptogram/CVN18DataBuilderTest.java b/jpos/src/test/java/org/jpos/emv/cryptogram/CVN18DataBuilderTest.java index 9d4131a753..d5605474be 100644 --- a/jpos/src/test/java/org/jpos/emv/cryptogram/CVN18DataBuilderTest.java +++ b/jpos/src/test/java/org/jpos/emv/cryptogram/CVN18DataBuilderTest.java @@ -55,7 +55,6 @@ void testBuildARQCRequest() { "00000000010000000000000008400000000000084018123101ABCDEF101800000106011203000000", builder.buildARQCRequest(data, iad) ); - assertEquals( "00000000010000000000000008400000000000084018123101ABCDEF1018000001060112030000008000000000000000", builder.buildARQCRequest_padded(data, iad) From 32b9a90911665f8fa0d9b7567b54225398df21a3 Mon Sep 17 00:00:00 2001 From: Till Neunast Date: Sat, 14 Sep 2024 08:15:06 +1200 Subject: [PATCH 04/11] Dummy change to trigger rebuild --- .../test/java/org/jpos/emv/cryptogram/CVN18DataBuilderTest.java | 1 - 1 file changed, 1 deletion(-) diff --git a/jpos/src/test/java/org/jpos/emv/cryptogram/CVN18DataBuilderTest.java b/jpos/src/test/java/org/jpos/emv/cryptogram/CVN18DataBuilderTest.java index d5605474be..c4444727e3 100644 --- a/jpos/src/test/java/org/jpos/emv/cryptogram/CVN18DataBuilderTest.java +++ b/jpos/src/test/java/org/jpos/emv/cryptogram/CVN18DataBuilderTest.java @@ -60,6 +60,5 @@ void testBuildARQCRequest() { builder.buildARQCRequest_padded(data, iad) ); - } } From 59e81a1bd0dc8fc92562ade4b97183ee6db2e4cb Mon Sep 17 00:00:00 2001 From: Till Neunast Date: Sat, 14 Sep 2024 08:22:34 +1200 Subject: [PATCH 05/11] Dummy change to trigger rebuild --- .../test/java/org/jpos/emv/cryptogram/CVN18DataBuilderTest.java | 1 - 1 file changed, 1 deletion(-) diff --git a/jpos/src/test/java/org/jpos/emv/cryptogram/CVN18DataBuilderTest.java b/jpos/src/test/java/org/jpos/emv/cryptogram/CVN18DataBuilderTest.java index c4444727e3..7e81b9bc47 100644 --- a/jpos/src/test/java/org/jpos/emv/cryptogram/CVN18DataBuilderTest.java +++ b/jpos/src/test/java/org/jpos/emv/cryptogram/CVN18DataBuilderTest.java @@ -59,6 +59,5 @@ void testBuildARQCRequest() { "00000000010000000000000008400000000000084018123101ABCDEF1018000001060112030000008000000000000000", builder.buildARQCRequest_padded(data, iad) ); - } } From fca194bfcce0e7cc7418161b5cf4188b925df91f Mon Sep 17 00:00:00 2001 From: Till Neunast Date: Sat, 14 Sep 2024 08:28:43 +1200 Subject: [PATCH 06/11] Dummy change to trigger rebuild --- .../test/java/org/jpos/emv/cryptogram/CVNCPADataBuilderTest.java | 1 - 1 file changed, 1 deletion(-) diff --git a/jpos/src/test/java/org/jpos/emv/cryptogram/CVNCPADataBuilderTest.java b/jpos/src/test/java/org/jpos/emv/cryptogram/CVNCPADataBuilderTest.java index 5314e0f6bc..622332da45 100644 --- a/jpos/src/test/java/org/jpos/emv/cryptogram/CVNCPADataBuilderTest.java +++ b/jpos/src/test/java/org/jpos/emv/cryptogram/CVNCPADataBuilderTest.java @@ -34,7 +34,6 @@ void testBuildARQCRequest() { "0000000100000000000010000840000000108008409807040011111111580034560FA500A03800000000000000000000000F010000000000000000000000000000", builder.buildARQCRequest(data, iad) ); - assertEquals( "0000000100000000000010000840000000108008409807040011111111580034560FA500A03800000000000000000000000F01000000000000000000000000000080000000000000", builder.buildARQCRequest_padded(data, iad) From 2fb7ae39793b657e40bf5d8f4f339734bd4bb7cc Mon Sep 17 00:00:00 2001 From: Till Neunast Date: Sat, 14 Sep 2024 08:33:57 +1200 Subject: [PATCH 07/11] Dummy change to trigger rebuild --- .../test/java/org/jpos/emv/cryptogram/CVN10DataBuilderTest.java | 1 - 1 file changed, 1 deletion(-) diff --git a/jpos/src/test/java/org/jpos/emv/cryptogram/CVN10DataBuilderTest.java b/jpos/src/test/java/org/jpos/emv/cryptogram/CVN10DataBuilderTest.java index 495931b1c1..5a2fa0a120 100644 --- a/jpos/src/test/java/org/jpos/emv/cryptogram/CVN10DataBuilderTest.java +++ b/jpos/src/test/java/org/jpos/emv/cryptogram/CVN10DataBuilderTest.java @@ -55,7 +55,6 @@ void testBuildARQCRequest() { "00000000010000000000000008400000000000084018123101ABCDEF101800000203000000", builder.buildARQCRequest(data, iad) ); - assertEquals( "00000000010000000000000008400000000000084018123101ABCDEF101800000203000000000000", builder.buildARQCRequest_padded(data, iad) From 19434d76d0ddf4846e297fd508c261a5a35a1b31 Mon Sep 17 00:00:00 2001 From: Till Neunast Date: Sat, 14 Sep 2024 08:40:47 +1200 Subject: [PATCH 08/11] Dummy change to trigger rebuild --- .../test/java/org/jpos/emv/cryptogram/CVN10DataBuilderTest.java | 1 - 1 file changed, 1 deletion(-) diff --git a/jpos/src/test/java/org/jpos/emv/cryptogram/CVN10DataBuilderTest.java b/jpos/src/test/java/org/jpos/emv/cryptogram/CVN10DataBuilderTest.java index 5a2fa0a120..0c3724aa00 100644 --- a/jpos/src/test/java/org/jpos/emv/cryptogram/CVN10DataBuilderTest.java +++ b/jpos/src/test/java/org/jpos/emv/cryptogram/CVN10DataBuilderTest.java @@ -60,6 +60,5 @@ void testBuildARQCRequest() { builder.buildARQCRequest_padded(data, iad) ); - } } From ab4cf78ee810886d8132baa5622b36b8a475e2ee Mon Sep 17 00:00:00 2001 From: Till Neunast Date: Sat, 14 Sep 2024 08:46:23 +1200 Subject: [PATCH 09/11] Dummy change to trigger rebuild --- .../test/java/org/jpos/emv/cryptogram/CVN10DataBuilderTest.java | 1 - 1 file changed, 1 deletion(-) diff --git a/jpos/src/test/java/org/jpos/emv/cryptogram/CVN10DataBuilderTest.java b/jpos/src/test/java/org/jpos/emv/cryptogram/CVN10DataBuilderTest.java index 0c3724aa00..45df5bac57 100644 --- a/jpos/src/test/java/org/jpos/emv/cryptogram/CVN10DataBuilderTest.java +++ b/jpos/src/test/java/org/jpos/emv/cryptogram/CVN10DataBuilderTest.java @@ -59,6 +59,5 @@ void testBuildARQCRequest() { "00000000010000000000000008400000000000084018123101ABCDEF101800000203000000000000", builder.buildARQCRequest_padded(data, iad) ); - } } From ef417c13d2d680a9a253b7e80861e649f53159bf Mon Sep 17 00:00:00 2001 From: Till Neunast Date: Sat, 14 Sep 2024 08:51:51 +1200 Subject: [PATCH 10/11] Dummy change to trigger rebuild --- .../test/java/org/jpos/emv/cryptogram/CVNMCDataBuilderTest.java | 1 - 1 file changed, 1 deletion(-) diff --git a/jpos/src/test/java/org/jpos/emv/cryptogram/CVNMCDataBuilderTest.java b/jpos/src/test/java/org/jpos/emv/cryptogram/CVNMCDataBuilderTest.java index f26d98e6ac..4dacd77496 100644 --- a/jpos/src/test/java/org/jpos/emv/cryptogram/CVNMCDataBuilderTest.java +++ b/jpos/src/test/java/org/jpos/emv/cryptogram/CVNMCDataBuilderTest.java @@ -57,7 +57,6 @@ void buildARPCRequest() { "00000001000000000000100008400000001080084098070400111111115800345660800322000080", builder.buildARQCRequest_padded(data, iad) ); - } From 5f2fee93e054217cbb058e67323bab5aab3dbbfc Mon Sep 17 00:00:00 2001 From: Till Neunast Date: Sat, 14 Sep 2024 08:56:55 +1200 Subject: [PATCH 11/11] Dummy change to trigger rebuild --- .../test/java/org/jpos/emv/cryptogram/CVNMCDataBuilderTest.java | 1 - 1 file changed, 1 deletion(-) diff --git a/jpos/src/test/java/org/jpos/emv/cryptogram/CVNMCDataBuilderTest.java b/jpos/src/test/java/org/jpos/emv/cryptogram/CVNMCDataBuilderTest.java index 4dacd77496..03ff660056 100644 --- a/jpos/src/test/java/org/jpos/emv/cryptogram/CVNMCDataBuilderTest.java +++ b/jpos/src/test/java/org/jpos/emv/cryptogram/CVNMCDataBuilderTest.java @@ -59,5 +59,4 @@ void buildARPCRequest() { ); } - }