Commit Graph

19 Commits

Author SHA1 Message Date
Marc Mültin 54759ee249 - Bugfix: corrected the use of XSD schema files when applying EXI encoding for signature creation. Distinguishes now between EXI encoding for the SignedInfoElement of the header's signature (where XMLdsig schema needs to be used) and EXI encoding for the reference elements of the header's signature.
- Bugfix: corrected the use of EXI encoding option when encoding signature header: Here the schema-informed fragment grammar option needs to be used. For EXI encoding of message bodies, this option is not to be used.
2016-11-11 16:53:46 +09:00
Marc Mültin 2ec832c1d7 - Bugfix: The signature key for signing SalesTariff elements was wrong (not the provisioning service certificate private key but the MO Sub-CA 2 certificate private key needs to be used here).
- Modified DummyBackendInterface and IBackendInterface to introduce method getMOSubCA2CertificatePrivateKey()
- New function in SecurityUtils introduced to read .key private key file.
- Added warning logger message on SECC side in case the SAScheduleTupleID in PowerDeliveryReq message is null (parameter is mandatory, although setting it is actually useless when PowerDeliveryReq with ChargeProgress set to 'Stop' is set).
2016-11-10 15:08:17 +09:00
Marc Mültin c8c9fb21d6 Merge branch 'hotfix/porsche-test' 2016-11-06 19:21:00 +09:00
Marc Mültin 0fc64963f7 minor debugging and error catching changes 2016-11-06 19:19:48 +09:00
Marc Mültin b9987c2295 Fixed typo in line 832 of SecurityUtils.java which prevented the contract certificate to be saved. This typo probably remained from a negative test and should not have made its way to the public repo. Anyway, is fixed now.
Added logger message in case the private key for the contract certificate to be saved is not valid.
2016-11-06 18:59:20 +09:00
Marc Mültin 258af9b5ac Bugfix: An empty catch clause in the StatefulTransportLayerClient.java caused a weired EXI Codec error message ("ERROR: 'EXI No valid EXI document according distinguishing bits'") when a message timeout occurred (e.g. with the small timeout value of 250ms for CurrentDemandRes). This was confusing since there was no obvious reason for the EXI Codec error message. Now there is some meaningful error catch clause which makes clear that the header of the received message could not be read, which then terminates the communication session. 2016-07-28 19:13:00 +02:00
Marc Mültin e0f2d36bbc Merge branch 'master' into develop
# Conflicts:
#	RISE-V2G-EVCC/src/main/java/org/eclipse/risev2g/evcc/evController/DummyEVController.java
#	RISE-V2G-EVCC/src/main/java/org/eclipse/risev2g/evcc/session/V2GCommunicationSessionEVCC.java
#	RISE-V2G-EVCC/src/main/java/org/eclipse/risev2g/evcc/states/WaitForChargeParameterDiscoveryRes.java
#	RISE-V2G-SECC/src/main/java/org/eclipse/risev2g/secc/session/V2GCommunicationSessionSECC.java
#	RISE-V2G-Shared/src/main/java/org/eclipse/risev2g/shared/utils/SecurityUtils.java
2016-07-28 15:03:04 +02:00
Marc Mültin fe7aebdca4 - Included EXIficient library and according xml parser libraries (see shared/libs) as EXIficient's license finally changed from GPLv2 to MIT (MIT is compatible with EPL v1). Uncommented EXIficientCodec.java file. You now can quickly switch between EXIficientCodec and OpenEXI coded by (un)commenting the respective line in MessageHandler.java.
- A failed verification of received sales tariff (in ChargeParameterDiscoveryRes) does not lead any more to the termination of the communication session, but to just ignoring the sales tariff so that the charge process itself can still continue.
- Additional check if TLS is used when selecting a payment option from the offered list of payment options. If the SECC is offering a contract-based payment although no TLS is used (in this case the SECC shall not offer contract-based payment after all), the EVCC will not select 'CONTRACT' any more but 'EIM' instead.
- The received private key of the contract certificate (upon receipt of CertificateInstallationRes/CertificateUpdateRes) is first checked according to [V2G2-823] before saving the private key. If the check fails, the contract certificate and private key will not be safed (BUT: check is not complete, additional help with ECC mechanisms might be needed).
- All other files: Just the slight modification of the copyright header (which has been done in the master branch, but not the developer branch)
2016-07-28 14:28:03 +02:00
Marc Mültin bf406353f8 slight modification of copyright header
Signed-off-by: Marc Mültin <marc.mueltin@chargepartner.com>
2016-04-15 14:03:23 +02:00
Marc Mültin 6345846e7b Changes/bugfixes due to experience in 4th International Testing Symposium in San Diego, California (April 2016)
- shortend all IDs of reference signature headers to 3 characters like the example given in Annex J (because some embedded systems might restrict the length to 3 characters)
- SecurityUtils: minor additional checks in verifySignature() method
- avoided NullPointerException when incoming message does not have ISO 15118 schema (for example DINSPEC 70121 XSD schema for DC charging)
- made sure optional parameters of ServiceDiscoveryRes are not empty when sent
- added logging message which shows which payment option was chosen by EVCC
- added optional parameter EVSEIsolationStatus in DCEVSEStatus as some EVCC systems tend to need this value according to testival
- bug fix: applied correct private key for signing sales tariff (must be MOSub2CA private key)
- made sure EVCC does not choose contract based payment if SECC offers it although no TLS communication is set up
2016-04-11 14:59:47 +02:00
Marc Mültin 4a8a8024f7 - Added check that CONTRACT-based payment option is not offered in ServiceDiscoveryRes message if a communication session without TLS connection is used
- removed some unused imports here and there
2016-04-04 10:23:57 -07:00
Marc Mültin fbf547ffe7 - added SecurityUtils function getContractCertificateStatus() to check for certificate installation and update need within one function, thus reducing the cryptographic computation overhead (which is crucial on embedded systems)
- caching result of getContractCertificateStatus() in communication session object to further reduce cryptographic computation overhead
- added another property to file EVCCConfig.properties and SECCConfig.properties called 'XMLRepresentationOfMessages' to allow to easily switch between verbose debugging (showing XML representation of sent messages) and less verbose logging information
2016-04-02 17:24:52 +02:00
Marc Mültin ac7a9095f0 Enhanced TLS-related features:
- added ResponseCode 'OK_CertificateExpiresSoon' on SECC side when receiving ContractCertificate with PaymentDetailsReq
- modified TLSClient to initiate TLS handshake right when initializing TLSClient (instead of when sending first message), thus enabling the check for the correct domain component "CPO" of the SECC certificate
- validates now provisioning certificate chain and checks for correct domain component "CPS" of provisioning leaf certificate
- added SecurityUtils function to get contract certificate from EVCC keystore
- added SecurityUtils function to get validity period of contract certificate
- added SecurityUtils function to also check for correct domain component when checking validity of certificate
- implemented a correct check if certificate update or installation is needed upon receiving PaymentServiceSelectionRes on EVCC side
2016-04-01 21:17:05 +02:00
Marc Mültin 9ee2d21472 removed hardcoded namespace from function getJaxbElement() in shared.utils.MiscUtils.java and added global values in shared.enumerations.GlobalValues.java 2015-12-15 12:09:16 +01:00
Marc Mültin 72d0327a72 Addresses #3 "SignedInfo tag namespace issue":
A new check for the type SignedInfoType to get the correct namespace deals with this issue
Tested with updated keystores and certificates
2015-12-14 17:09:14 +01:00
Marc Mültin 91b153fb98 Some minor bugfixes for bugs encountered at the Third International Testival in Dortmund on the 12th of November 2015 2015-11-12 18:45:16 +01:00
Marc Mültin 27992b59c9 Fixes #1 with the topic "Getting started...". The network interface property in the SECCConfig.properties and EVCCConfig.properties should now be provided as an integer value (an index value) instead of a string value (such as 'lo0' or 'eth1') 2015-06-17 18:29:53 +02:00
Marc Mültin 0c2984d979 no message 2015-06-01 18:41:19 +02:00
Marc Mültin 505e772f08 initial commit for RISE V2G 2015-06-01 17:19:09 +02:00