Commit Graph

76 Commits

Author SHA1 Message Date
Marc Mültin babd2ee114 Changelog 13.10.17:
- Changed package name from org.v2gclarity.risev2g to com.v2gclarity.risev2g
- Changed pom.xml and bin.xml files for creating deployable .jar files with Maven
- Added RISE-V2G-Parent project folder for Maven to facilitate an easy build process that has now be reworked in this version
2017-10-13 12:30:15 +02:00
Marc Mültin 374e06e843 Changelog:
- Removed some unused imports
- Bugfix in MessageHandler's getJaxbElement when creating the JAXBElement for SalesTariff. Corrected the namespace to create the QName object from MsgBody to MsgDataTypes
- Removed the libs folder in RISE-V2G-SHARED as it is not needed with Maven
2017-09-26 12:26:50 +02:00
Marc Mültin d8c9fc7bcd Changelog commit 15.9.17
- Added copyNewCertsAndKeys.bat and generateCertificates.bat to RISE-V2G-Certificates in order to port the already existing Unix shell scripts to Windows systems
- Corrected an error in V2GCommunicationSessionHandlerEVCC.java which ensures that the SDP procedure continues to work correctly even if there is a false SDP response coming from the SECC
- Changed the signature of the method generateDigest() (in SecurityUtils.java) to have more logging information about the ID of the element for which the digest is generated
- Made sure that the PreCharge timeout and CableCheck timeout are triggered exactly (there was a possible delay of 2s)
- Changed logging level of TCP server and client from debug to info
- Added debugging logging functionality with new EVCC and SECC property HexAndBase64RepresentationOfMessages which will log the hexadecimal and Base64 encoding of each message being sent
- Small change in log4j2.xml files enabling highlighting of logging level (you need to have ANSI Console installed in Eclipse IDE for this change to take effect)
- Shifted the process of reading the MO Sub-CA 2 private key from the keystore from the method getMOSubCA2PrivateKey to the constructor of DummyBackendInterface.java in order to avoid timeouts when processing the ChargeParameterDiscoveryReq on embedded devices
- Updated the EXIficient_V2G_CI_MsgDef.java (serialized version of the XSD grammar) as there was an bug before that caused an incomplete deserialization of an EXI byte stream to an XML message
- Updated log4j from 2.1 to 2.9
2017-09-15 16:15:25 +02:00
Marc Mültin 75cb9ed392 Update README.md 2017-09-07 12:08:33 +02:00
Marc Mültin e216d7d072 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. 2017-09-07 12:06:37 +02:00
Marc Mültin 084320d6d6 Loading EXIficient is now much faster than before. XSD schema files have been converted to EXI grammar Java files. Also, JAXB context is now only set once at startup of SECC and EVCC respectively as setting the JAXB context is a very time consuming task. 2017-08-31 17:11:16 +02:00
Marc Mültin 47028b4bbd Merge pull request #10 from Sevenstax/win_network_interface_fix
Find the network interface by index on windows operating systems.
2017-08-30 19:18:15 +02:00
Marc Mültin 7cd067c118 Added property "EXICodec" in EVCCConfig.properties and SECCConfig.properties to set the EXI codec. Changed the handling in the constructor of the MessageHandler.java accordingly. 2017-08-30 18:32:09 +02:00
Jan Pohlmann 222530cfb7 Find the network interface by index on windows operating systems. 2017-08-30 16:15:35 +02:00
Marc Mültin ee5756c592 Minor changes in transport layer classes and main method 2017-08-29 17:34:52 +02:00
Marc Mültin d75e57457b Added two complete CertificateInstallationRes.xml according to the test data provided: one with the MsgBody namespace, one with the empty namespace 2017-08-28 09:47:17 +02:00
Marc Mültin d912967e15 Update README.md
Corrected typos
2017-08-27 13:22:26 +02:00
Marc Mültin a54db336c6 Rename README.txt to README.md 2017-08-27 13:20:05 +02:00
Marc Mültin d2287e7355 Added test data for CertificateInstallationRes to verify one's own implementation of creating and verifying XML-based signatures 2017-08-27 13:18:40 +02:00
Marc Mültin 1cda643223 Avoid NullPointerException in WaitForSupportedAppProtocolRes.java 2017-08-23 11:29:07 +02:00
Marc Mültin 0cac87ea24 Ongoing timer settings in V2GCommunicationSessionEVCC.java 2017-08-23 11:28:14 +02:00
Marc Mültin af1f3480e0 Added PreCharge Timer, CableCheck Timer to TimeRestrictions.java and added handling for those timers in EVCC package.
Minor bugfixing with regards to genChallenge in AuthorizationReq
2017-08-23 11:26:34 +02:00
Marc Mültin d933ba39ad Added functionality in IEVController and DummyEVController which enables a predefined number of loops for ChargingStatusReq/-Res and CurrentDemandReq/-Res message pairs 2017-08-22 00:12:33 +02:00
Marc Mültin 777a2934ba Some minor bugfixing after a successful test session with Verisco. SECC part is now fully tested with good and error test cases and has now very high probability to being fully conform to the ISO 15118-2 standard. 2017-08-21 22:13:09 +02:00
Marc Mültin f301e82367 Forgot to add PKI.java to last commit 2017-08-20 23:26:56 +02:00
Marc Mültin 788280cd68 - Replaced System.currentTimeMillis() by System.nanoTime() for timing tasks.
- Changed the way how JAXBElements are created due to particularities with the creation of the XML Reference elements for the CertificateInstallationRes and CertificateUpdateRes messages. The JAXBContext is now set exactly for the message or field that is to be marshaled into XML. As a result, the JAXBContext is no more set in the EXI codec, but in the MessageHandler
- SecurityUtils.java has been partly rewritten with regards to the verification of certificate chains. See also verifyCertificateChain(…) method.
- Requirement [V2G2-812] is not implemented.
- When the EVCC sends a message out of the correct order which would induce a FAILED_SequenceError message, the SECC now sends the response message corresponding to the request message sent by the EVCC instead of the response message corresponding to the message the SECC would expect. As a result, ServerState.java has partly been rewritten and all SECC states have been adapted to it.
- Charge parameter provided by ChargeParameterDisoveryReq message are now thoroughly checked by the SECC. See also verifyChargeParameter(…) method.
- Charging profile provided by PowerDeliveryReq message is now thoroughly checked by SECC. See also isChargingProfileValid(…) method.
- New enum class PKI is added to shared.enumerations package. Needed for certificate chain checks in SecurityUtils.java.
- Some bugfixes in V2GTPMessage so that headers are not checked correctly.
2017-08-20 23:26:22 +02:00
Marc Mültin d829d9d47c Merge pull request #8 from I2SE/fix-pkcs8-assembly
Make sure moSubCA2.pkcs8.der is added to SECC archives
2017-08-07 11:03:38 +02:00
Stefan Wahren 49a350173f Make sure MO Sub-CA 2 PKCS#8 file is added to package, because it's
required by SECC dummy backend

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
2017-08-04 11:11:48 +02:00
Marc Mültin 0bf8aee4f3 keyAgreement bit was set in the configuration file for the SECC leaf certificate (seccCert.cnf in the RISE-V2G-Certificates > configs folder) 2017-08-04 09:16:35 +02:00
Marc Mültin c5afa07241 Update README.md 2017-07-24 10:02:47 +02:00
Marc Mültin 2267ad741d Changed absolute path of openssl to relative path in generateCertificates.sh. Be aware to use an openssl version of 1.0.2 or above when you run openssl. You might need to use Homebrew to install a newer version if you use MacOS X. An absolute path to your openssl installation of Homebrew might then be needed in generateCertificates.sh. 2017-07-24 09:53:40 +02:00
Marc Mültin d61fde3264 Changed package structure from org.eclipse.risev2g to org.v2gclarity.risev2g 2017-07-22 19:20:04 +02:00
Marc Mültin 21f9e74e2b Update README.md 2017-07-20 23:53:56 +02:00
Marc Mültin 04ff623d05 Delete about.html 2017-07-20 21:18:11 +02:00
Marc Mültin ed524bb9d5 Update README.md 2017-07-20 21:13:04 +02:00
Marc Mültin 9fc23006ea Create LICENSE 2017-07-20 21:11:57 +02:00
Marc Mültin b0c4b6d657 Changed license from EPL to MIT and updated README.md 2017-07-20 21:06:26 +02:00
Marc Mültin cc79a41428 Renamed config files for certificate creation (for consistency reasons) 2017-07-20 15:54:33 +02:00
Marc Mültin 6b366610bc Commit-Nachricht für RISE V2G
- Signature creation and verification has been fixed and works now properly. Has been tested against various industry OEMs and suppliers.
SecurityUtils.java class was substantially revised as part of fixing the signature creation and verification process and extended signature logging

- Introduced a new abstract method setMandatoryFieldsForFailedRes() in ServerState which makes sure that for each response the mandatory fields are set properly according to the standard in case a FAILED response code is sent

- Introduced a fix in WaitForAuthorizationReq which makes sure that a possible challenge is only checked for if the chosen payment option is „Contract“ (and TLS is used)

- Saves now the payment option selected by the EVCC (in state WaitForPaymentServiceSelectionReq) in the SECCs communication session for later reference

- To avoid possible race conditions, the transport layer threads needed to be started AFTER the SECC session handler has been initialized. Otherwise the situation might occur that the UDPServer is receiving a UDP client packet and tries to access the MessageHandler object before this object has been created by the SECC session handler.

- generateCertificates.sh Shell-Script now includes variables to ease the setting of certificates’ validity periods. Renaming of some certificates (e.g. provLeaf.cert -> cpsLeaf.cert) and keys. All certificates are now also generated in DER encoded form. MOSubCA2 private key is now also created as a PKCS#8 DER encoded file as RISE V2G needs this format to read the private key from file and sign SalesTariffs.

- EVCCConfig.properties and SECCConfig.properties have additional property „SignatureVerificationLog“ which enables extended logging information to debug signature creation and verification processes

- Catched a (theoretically) possible ClassCastException in WaitForChargeParameterDiscoveryRes in case the EVCC signalizes an EnergyTransferMode (AC or DC) which does not fit to the EVSEChargeParameter sent by the SECC later on

- Made sure that by default the sum of the individual time intervals described in the PMaxSchedule and SalesTariff provided in the ChargeParameterDiscoveryRes message are equal to 24 hours as demanded by a requirement.

- Renaming of some methods in IBackendInterface for clarity and consistency

- Provided a correctly formatted EVSE-ID in DummyACEVSEController and DummyDCEVSEController

- Corrected the service name of CertificateUpdate service and CertificateInstallation service to „Service“ according to the standard

- Edited GlobalValues so that the string value returned for each global value only needs to be edited once in this file (less error prone)
2017-07-20 15:50:43 +02:00
Marc Mültin 4838729761 Update README.md
Corrected the URL pointing to the ISO 15118 Manual
2017-05-01 14:30:53 -05:00
Marc Mültin 435d739d79 Update README.md
Added reference to the ISO 15118 manual for an in-depth guide to the ISO 15118 standard
2017-05-01 14:29:01 -05:00
Marc Mültin bb40200deb Updated generateCertificates.sh shell script to make sure the necessary folders ‚certs‘, ‚csrs‘, ‚keystores‘, and ‚privateKeys‘ exist or are created if they don’t exist before executing the rest of the script 2017-05-01 14:08:36 -05:00
Marc Mültin 0047027eea minor changes 2016-11-29 18:49:05 +08:00
Marc Mültin fd20302604 - added signature creation when sending MeteringReceiptReq during DC charging
- added a fix that prevents a NullPointerException in case MeterInfo element is not present when checked on SECC while processing MeteringReceiptReq
2016-11-29 18:46:42 +08:00
Marc Mültin 7cd7bde429 - made sure that no ServiceDetailReq is sent for the ChargeService (for which no ServiceParameterList is available)
- added error logger message in case FAILED_No_NEGOTIATION is sent as response code in supportedAppProtocolRes
2016-11-26 17:41:41 +08:00
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 8cf20ba88a Update README.md
Added video reference for getting up and running
2016-11-11 11:30:20 +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