Skip to content

Commit 2f8a4d7

Browse files
committed
SIGA-399 add subjectDistinguishedName for asic containers
1 parent 5c63d94 commit 2f8a4d7

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

siga-test/src/test/java/ee/openeid/siga/test/asic/ValidateAsicContainerT.java

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ void validateAsicContainer() throws JSONException, NoSuchAlgorithmException, Inv
5252
assertThat(response.getBody().path("validationConclusion.policy.policyName"), equalTo("POLv4"));
5353
assertThat(response.getBody().path(REPORT_SIGNATURES + "[0].signedBy"), equalTo("ŽÕRINÜWŠKY,MÄRÜ-LÖÖZ,11404176865"));
5454
assertThat(response.getBody().path(REPORT_SIGNATURES + "[0].info.bestSignatureTime"), equalTo("2014-11-17T14:11:46Z"));
55+
56+
assertThat(response.getBody().path(REPORT_SIGNATURES + "[0].subjectDistinguishedName.commonName"), equalTo("ŽÕRINÜWŠKY,MÄRÜ-LÖÖZ,11404176865"));
57+
assertThat(response.getBody().path(REPORT_SIGNATURES + "[0].subjectDistinguishedName.serialNumber"), equalTo("11404176865"));
5558
}
5659

5760
@Test
@@ -61,6 +64,9 @@ void validateDDOCContainer() throws JSONException, NoSuchAlgorithmException, Inv
6164
assertThat(response.statusCode(), equalTo(200));
6265
assertThat(response.getBody().path(REPORT_VALID_SIGNATURES_COUNT), equalTo(1));
6366
assertThat(response.getBody().path(REPORT_SIGNATURES_COUNT), equalTo(1));
67+
68+
assertThat(response.getBody().path(REPORT_SIGNATURES + "[0].subjectDistinguishedName.commonName"), equalTo("ŽÕRINÜWŠKY,MÄRÜ-LÖÖZ,11404176865"));
69+
assertThat(response.getBody().path(REPORT_SIGNATURES + "[0].subjectDistinguishedName.serialNumber"), equalTo("11404176865"));
6470
}
6571

6672
@Test
@@ -92,6 +98,13 @@ void uploadAsicContainerAndValidateInSession() throws JSONException, NoSuchAlgor
9298
assertThat(validationResponse.getBody().path(REPORT_SIGNATURES_COUNT), equalTo(3));
9399
assertThat(validationResponse.getBody().path(REPORT_SIGNATURES + "[0].signedBy"), equalTo("ŽÕRINÜWŠKY,MÄRÜ-LÖÖZ,11404176865"));
94100
assertThat(validationResponse.getBody().path(REPORT_SIGNATURES + "[0].info.bestSignatureTime"), equalTo("2014-11-17T14:11:46Z"));
101+
102+
assertThat(validationResponse.getBody().path(REPORT_SIGNATURES + "[0].subjectDistinguishedName.commonName"), equalTo("ŽÕRINÜWŠKY,MÄRÜ-LÖÖZ,11404176865"));
103+
assertThat(validationResponse.getBody().path(REPORT_SIGNATURES + "[0].subjectDistinguishedName.serialNumber"), equalTo("11404176865"));
104+
assertThat(validationResponse.getBody().path(REPORT_SIGNATURES + "[1].subjectDistinguishedName.commonName"), equalTo("JÕEORG,JAAK-KRISTJAN,38001085718"));
105+
assertThat(validationResponse.getBody().path(REPORT_SIGNATURES + "[1].subjectDistinguishedName.serialNumber"), equalTo("PNOEE-38001085718"));
106+
assertThat(validationResponse.getBody().path(REPORT_SIGNATURES + "[2].subjectDistinguishedName.commonName"), equalTo("JÕEORG,JAAK-KRISTJAN,38001085718"));
107+
assertThat(validationResponse.getBody().path(REPORT_SIGNATURES + "[2].subjectDistinguishedName.serialNumber"), equalTo("PNOEE-38001085718"));
95108
}
96109

97110
@Test
@@ -103,6 +116,9 @@ void createAsicContainerSignRemotelyAndValidate() throws JSONException, NoSuchAl
103116
Response validationResponse = getValidationReportForContainerInSession(flow);
104117
assertThat(validationResponse.statusCode(), equalTo(200));
105118
assertThat(validationResponse.getBody().path(REPORT_VALID_SIGNATURES_COUNT), equalTo(1));
119+
120+
assertThat(validationResponse.getBody().path(REPORT_SIGNATURES + "[0].subjectDistinguishedName.commonName"), equalTo("JÕEORG,JAAK-KRISTJAN,38001085718"));
121+
assertThat(validationResponse.getBody().path(REPORT_SIGNATURES + "[0].subjectDistinguishedName.serialNumber"), equalTo("PNOEE-38001085718"));
106122
}
107123

108124
@Test

siga-test/src/test/java/ee/openeid/siga/test/hashcode/ValidateHashcodeContainerT.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,6 @@ void validateDDOCHashcodeContainer() throws JSONException, NoSuchAlgorithmExcept
5959
assertThat(response.getBody().path(REPORT_SIGNATURE_FORM), equalTo("DIGIDOC_XML_1.3_hashcode"));
6060
assertThat(response.getBody().path(REPORT_SIGNATURES + "[0].signatureFormat"), equalTo("DIGIDOC_XML_1.3"));
6161
assertThat(response.getBody().path(REPORT_SIGNATURES + "[0].info.bestSignatureTime"), equalTo("2012-10-03T07:46:51Z"));
62-
63-
assertThat(response.getBody().path(REPORT_SIGNATURES + "[0].subjectDistinguishedName.commonName"), equalTo("LUKIN,LIISA,47710110274"));
64-
assertThat(response.getBody().path(REPORT_SIGNATURES + "[0].subjectDistinguishedName.serialNumber"), equalTo("47710110274"));
6562
}
6663

6764
@Test

0 commit comments

Comments
 (0)