This update is due to new findings regarding XML namespace settings for creating the XML reference elements of the parameters of CertificateInstallationRes and CertificateUpdateRes. The namespace "urn:iso:15118:2:2013:MsgBody" shall be used, whereas the empty namespace is not conform to the standard.

This commit is contained in:
Marc Mültin 2017-09-07 12:06:37 +02:00
parent 084320d6d6
commit e216d7d072
2 changed files with 6 additions and 17 deletions

View File

@ -57,7 +57,7 @@ The signature is built over the four parameters mentioned above. The Certificate
## XML REFERENCE ELEMENT GENERATION WITH XML NAMESPACE "urn:iso:15118:2:2013:MsgBody"
## XML REFERENCE ELEMENT GENERATION WITH CORRECT XML NAMESPACE "urn:iso:15118:2:2013:MsgBody"
The following values are created using the XML namespace "urn:iso:15118:2:2013:MsgBody".
@ -114,7 +114,7 @@ k5r1TxQ5bsDYJ/dTyJasB2KuHgCsq1fhmvEAJDzdWms=
## SIGNATURE GENERATION WITH XML NAMESPACE "urn:iso:15118:2:2013:MsgBody"
## SIGNATURE GENERATION WITH CORRECT XML NAMESPACE "urn:iso:15118:2:2013:MsgBody"
EXI:
808112B43A3A381D1797BBBBBB973B999737B93397AA2917B1B0B737B734B1B0B616B2BC3497A1AB43A3A381D1797BBBBBB973B999737B933979918181897981A17BC36B63239B4B396B6B7B93291B2B1B239B096B9B430991A9B220623696432025687474703A2F2F7777772E77332E6F72672F54522F63616E6F6E6963616C2D6578692F4852D0E8E8E0745E5EEEEEEE5CEE665CDEE4CE5E646060625E60685EF0DAD8CADCC646E6D0C2646A6C841B82DD95E8402618A634B61857B9E62A07DAFB095DD608F5E30E1D8913236740008188DA590C4095A1D1D1C0E8BCBDDDDDDCB9DCCCB9BDC99CBD5148BD8D85B9BDB9A58D85B0B595E1A4BD214B43A3A381D1797BBBBBB973B999737B933979918181897981A17BC36B632B73191B9B430991A9B21054C9F5187582E3FE07DCB5796C7F842CE8091C04C9EB1EEC199CAEA54E998D42020623696434025687474703A2F2F7777772E77332E6F72672F54522F63616E6F6E6963616C2D6578692F4852D0E8E8E0745E5EEEEEEE5CEE665CDEE4CE5E646060625E60685EF0DAD8CADCC646E6D0C2646A6C8412735EA9E2872DD81B04FEEA7912D580EC55C3C015956AFC335E2004879BAB4D608188DA590CC095A1D1D1C0E8BCBDDDDDDCB9DCCCB9BDC99CBD5148BD8D85B9BDB9A58D85B0B595E1A4BD214B43A3A381D1797BBBBBB973B999737B933979918181897981A17BC36B632B73191B9B430991A9B210640FE5E8B07F2530B16EAAD6F6A8D148EFE7775068E5297E2608776578F2FA9B0DC
@ -124,9 +124,10 @@ HINT: Do not make the mistake to hash the EXI binary stream before you run ECDSA
## XML REFERENCE ELEMENT GENERATION WITH XML NAMESPACE ""
## XML REFERENCE ELEMENT GENERATION WITH INCORRECT XML NAMESPACE ""
The following values are created using the empty XML namespace "".
There was a discussion going on whether the XML elements for a CertificateInstallationRes/CertificateUpdateRes need to be created using the namespace "urn:iso:15118:2:2013:MsgBody" or if using no namespace (the same as using the empty namespace "") is also a possible solution. The [ISO 15118 User Group issue #72] (http://extmgmt.kn.e-technik.tu-dortmund.de/issues/172) further elaborates on that and makes clear that the namespace "urn:iso:15118:2:2013:MsgBody" shall be used. Using the empty namespace would NOT conform to the standard's requirements.
However, just to show the difference in the EXI encoding result as well as the difference in message size, the following values are created using the empty XML namespace "". As you can see, those EXI encoding results are bigger in size. This is due to a so-called schema deviation encoding for those message elements.
### ContractSignatureCertChain
@ -178,7 +179,7 @@ Rc2B3/0aVrtfSnlrgEynFyGvQ0WH4O2AOgnq6627hHk=
## SIGNATURE GENERATION WITH XML NAMESPACE ""
## SIGNATURE GENERATION WITH INCORRECT XML NAMESPACE ""
EXI:
808112B43A3A381D1797BBBBBB973B999737B93397AA2917B1B0B737B734B1B0B616B2BC3497A1AB43A3A381D1797BBBBBB973B999737B933979918181897981A17BC36B63239B4B396B6B7B93291B2B1B239B096B9B430991A9B220623696432025687474703A2F2F7777772E77332E6F72672F54522F63616E6F6E6963616C2D6578692F4852D0E8E8E0745E5EEEEEEE5CEE665CDEE4CE5E646060625E60685EF0DAD8CADCC646E6D0C2646A6C840FE3A48BE026CE50992825A3D78E29EC9E4AE0ED278519895F5CB09CBC06ABABC08188DA590C4095A1D1D1C0E8BCBDDDDDDCB9DCCCB9BDC99CBD5148BD8D85B9BDB9A58D85B0B595E1A4BD214B43A3A381D1797BBBBBB973B999737B933979918181897981A17BC36B632B73191B9B430991A9B2100A4F464B9528847651CF05B5D497CD9FF6479335E099BFEAF15A34D391EAFF03020623696434025687474703A2F2F7777772E77332E6F72672F54522F63616E6F6E6963616C2D6578692F4852D0E8E8E0745E5EEEEEEE5CEE665CDEE4CE5E646060625E60685EF0DAD8CADCC646E6D0C2646A6C8408B9B03BFFA34AD76BE94F2D700994E2E435E868B0FC1DB007413D5D75B7708F208188DA590CC095A1D1D1C0E8BCBDDDDDDCB9DCCCB9BDC99CBD5148BD8D85B9BDB9A58D85B0B595E1A4BD214B43A3A381D1797BBBBBB973B999737B933979918181897981A17BC36B632B73191B9B430991A9B210082D3F02F2EF27D81F8287109D80A2BEB1A61F8C36625146D32019A494352FAC8DC

View File

@ -256,31 +256,19 @@ public class MessageHandler {
* We need to set the localPart of the QName object for the CertificateInstallationRes/CertificateUpdateRes parameters
* correctly. The messageOrField object's class name cannot be taken directly as it differs from what should be the
* XML element name.
*
* In principle, there are two ways of setting the namespace for the XML elements of the parameters of a
* CertificateInstallationRes/CertificateUpdatenRes. Annex J of ISO 15118-2 is not clear about that. Standard rules of
* XSD would require to always set a so-called target namespace, in this case GlobalValues.V2G_CI_MSG_BODY_NAMESPACE.
* But you could also use the empty namespace "" and would still be conform to the standard.
* The choice of the namespace heavily influences interoperability as the resulting digest values will be different.
*
* I recommend using the namespace GlobalValues.V2G_CI_MSG_BODY_NAMESPACE as this seems to be adopted by the industry.
*/
switch (messageName) {
case "CertificateChain":
messageName = "ContractSignatureCertChain";
// namespace = "";
break;
case "DiffieHellmanPublickey":
messageName = "DHpublickey";
// namespace = "";
break;
case "EMAID":
messageName = "eMAID";
// namespace = "";
break;
case "ContractSignatureEncryptedPrivateKey":
messageName = "ContractSignatureEncryptedPrivateKey";
// namespace = "";
break;
default:
break;