lovele0107 / signatures-conformance-checker

7 stars 0 forks source link

{CheckIfMssgImpIsAsInSpec} error for XAdES-B-LTA signatures with XPATH #32

Open realmoieen opened 2 years ago

realmoieen commented 2 years ago

I've signed an xml part and created an LTA signature but the ETSI tool does not validates the file and give following error.

image

The message imprint I used in ArchiveTimeStamp token for contribution of UnsignedSignatureProperties/ArchiveTimeStamp[4]/EncapsulatedTimeStamp[1] is `

2022-05-30T17:09:11+05:00 n4PUjHWA7/1ep3mPLZ/9ETIWk42kwFoRhiwXW1zf11s= MIGMMHSkcjBwMQswCQYDVQQGEwJHQjEZMBcGA1UEChMQQXNjZXJ0aWEgTGltaXRl ZDEnMCUGA1UECxMeQXNjZXJ0aWEgU29mdHdhcmUgRGlzdHJpYnV0aW9uMR0wGwYD VQQDExRBRFNTIFNhbXBsZXMgVGVzdCBDQQIUGTIC2GmVfd3dLRLSNrVFH4TY/os= Egham Surrey 1784 England Admin text/xml text/xml http://uri.etsi.org/01903/v1.2.2#ProofOfSender #SignedDataObject_13177 sample commitment type qualifier value apples 50 10.20 bananas 30 20.10 bananas 30 20.10 ` and the ETSI XAdES CC tool computes the message imprints value on following data `2022-05-30T17:09:11+05:00n4PUjHWA7/1ep3mPLZ/9ETIWk42kwFoRhiwXW1zf11s=MIGMMHSkcjBwMQswCQYDVQQGEwJHQjEZMBcGA1UEChMQQXNjZXJ0aWEgTGltaXRl ZDEnMCUGA1UECxMeQXNjZXJ0aWEgU29mdHdhcmUgRGlzdHJpYnV0aW9uMR0wGwYD VQQDExRBRFNTIFNhbXBsZXMgVGVzdCBDQQIUGTIC2GmVfd3dLRLSNrVFH4TY/os=EghamSurrey1784EnglandAdmintext/xmltext/xmlhttp://uri.etsi.org/01903/v1.2.2#ProofOfSender#SignedDataObject_13177sample commitment type qualifier value apples 50 10.20 bananas 30 20.10 bananas 30 20.10 bananas 30 20.10 bananas 30 20.10 bananas 30 20.10 bananas 30 20.10 ` It seems XAdES CC computing message imprint on with whole document which causing the issue. signed file. [xades_b_lta_http_server.zip](https://github.com/lovele0107/signatures-conformance-checker/files/8798524/xades_b_lta_http_server.zip)