Skip to content

Commit

Permalink
Changelog 13.10.17:
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
Marc Mültin committed Oct 13, 2017
1 parent 374e06e commit babd2ee
Show file tree
Hide file tree
Showing 261 changed files with 1,602 additions and 1,376 deletions.
File renamed without changes.
14 changes: 7 additions & 7 deletions RISE-V2G-Certificates/copyNewCertsAndKeys.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# This is a useful small shell script to automatically copy the Java Keystores (.jks files), .p12 containers and the DER encoded Mobility Operator Sub-CA private key to the places in the RISE V2G project where they belong. Execute this script after you executed the generateCertificates.sh script.

cp keystores/evccKeystore.jks ../RISE-V2G-EVCC
cp keystores/evccTruststore.jks ../RISE-V2G-EVCC
cp keystores/seccKeystore.jks ../RISE-V2G-SECC
cp keystores/seccTruststore.jks ../RISE-V2G-SECC
cp keystores/evccKeystore.jks ../RISE-V2G-EVCC/
cp keystores/evccTruststore.jks ../RISE-V2G-EVCC/
cp keystores/seccKeystore.jks ../RISE-V2G-SECC/
cp keystores/seccTruststore.jks ../RISE-V2G-SECC/

cp certs/cpsCertChain.p12 ../RISE-V2G-SECC
cp certs/moCertChain.p12 ../RISE-V2G-SECC
cp certs/cpsCertChain.p12 ../RISE-V2G-SECC/
cp certs/moCertChain.p12 ../RISE-V2G-SECC/

cp privateKeys/moSubCA2.pkcs8.der ../RISE-V2G-SECC
cp privateKeys/moSubCA2.pkcs8.der ../RISE-V2G-SECC/
14 changes: 9 additions & 5 deletions RISE-V2G-Certificates/generateCertificates.bat
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
REM *******************************************************************************
REM The MIT License (MIT)
REM
REM Copyright (c) 2015-207 V2G Clarity (Dr.-Ing. Marc Mültin)
REM Copyright (c) 2015-2017 V2G Clarity (Dr. Marc Mültin)
REM
REM Permission is hereby granted, free of charge, to any person obtaining a copy
REM of this software and associated documentation files (the "Software"), to deal
Expand All @@ -23,16 +23,19 @@ REM OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
REM THE SOFTWARE.
REM *******************************************************************************

REM ===========================================================================================================
REM This shell script can be used to create all necessary certificates and keystores needed in order to
REM - successfully perform a TLS handshake between the EVCC (TLSClient) and the SECC (TLSServer) and
REM - install/update a contract certificate in the EVCC.
REM Previously created certificates should have been provided with the respective release of the RISE V2G project for testing purposes. However, certain certificates might not be valid any more in which case you need to create new certificates.
REM
REM This file shall serve you with all information needed to create your own certificate chains.
REM
REM Helpful information about using openssl is provided by Ivan Ristic's book "Bulletproof SSL and TLS".
REM Furthermore, you should have openssl 1.0.2 (or above) installed to comply with all security requirements imposed by ISO 15118. For example, openssl 0.9.8 does not come with SHA-2 for SHA-256 signature algorithms. Some MacOS X installations unfortunately still use openssl < v1.0.2. You could use Homebrew to install openssl. Be aware that you probably then need to use an absolute path for your openssl commands, such as /usr/local/Cellar/openssl/1.0.2h_1/bin/openssl (for linux based systems).
REM Furthermore, you should have openssl 1.0.2 (or above) installed to comply with all security requirements
REM imposed by ISO 15118. For example, openssl 0.9.8 does not come with SHA-2 for SHA-256 signature algorithms.
REM
REM Author: Marc Mültin (marc.mueltin@v2g-clarity.com)
REM Author: Dr. Marc Mültin (marc.mueltin@v2g-clarity.com)
REM ===========================================================================================================


REM Some variables to create different outcomes of the PKI for testing purposes. Change the validity periods (given in number of days) to test
Expand All @@ -56,7 +59,8 @@ SET validity_oem_root_cert=3650
SET validity_mo_root_cert=3650


REM 0) Create directories if not yet existing
REM 0) Create directories if not yet existing. The keystores in the keystores folder (if existing) need to be deleted at first, so delete the complete folder.
if exist keystores rd /s /q keystores
if not exist certs mkdir certs
if not exist csrs mkdir csrs
if not exist keystores mkdir keystores
Expand Down
16 changes: 12 additions & 4 deletions RISE-V2G-Certificates/generateCertificates.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#*******************************************************************************
# The MIT License (MIT)
#
# Copyright (c) 2015-207 V2G Clarity (Dr.-Ing. Marc Mültin)
# Copyright (c) 2015-207 V2G Clarity (Dr. Marc Mültin)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
Expand All @@ -21,16 +21,23 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
#*******************************************************************************

# ===============================================================================================================
# This shell script can be used to create all necessary certificates and keystores needed in order to
# - successfully perform a TLS handshake between the EVCC (TLSClient) and the SECC (TLSServer) and
# - install/update a contract certificate in the EVCC.
# Previously created certificates should have been provided with the respective release of the RISE V2G project for testing purposes. However, certain certificates might not be valid any more in which case you need to create new certificates.
#
# This file shall serve you with all information needed to create your own certificate chains.
#
# Helpful information about using openssl is provided by Ivan Ristic's book "Bulletproof SSL and TLS".
# Furthermore, you should have openssl 1.0.2 (or above) installed to comply with all security requirements imposed by ISO 15118. For example, openssl 0.9.8 does not come with SHA-2 for SHA-256 signature algorithms. Some MacOS X installations unfortunately still use openssl < v1.0.2. You could use Homebrew to install openssl. Be aware that you probably then need to use an absolute path for your openssl commands, such as /usr/local/Cellar/openssl/1.0.2h_1/bin/openssl.
# Furthermore, you should have openssl 1.0.2 (or above) installed to comply with all security requirements
# imposed by ISO 15118. For example, openssl 0.9.8 does not come with SHA-2 for SHA-256 signature algorithms.
# Some MacOS X installations unfortunately still use openssl < v1.0.2. You could use Homebrew to install openssl.
# Be aware that you probably then need to use an absolute path for your openssl commands, such as
# /usr/local/Cellar/openssl/1.0.2h_1/bin/openssl.
#
# Author: Marc Mültin (marc.mueltin@v2g-clarity.com)
# Author: Dr. Marc Mültin (marc.mueltin@v2g-clarity.com)
# ===============================================================================================================


# Some variables to create different outcomes of the PKI for testing purposes. Change the validity periods (given in number of days) to test
Expand All @@ -55,6 +62,7 @@ validity_mo_root_cert=3650


# 0) Create directories if not yet existing
rm -r keystores # the keystores in the keystores folder (if existing) need to be deleted at first, so delete the complete folder
mkdir -p certs
mkdir -p csrs
mkdir -p keystores
Expand Down
20 changes: 10 additions & 10 deletions RISE-V2G-EVCC/EVCCConfig.properties
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#
# The network interface name like en3 or eth1 of the network interface on which to communicate with the SECC via a
# link-local IPv6 address
NetworkInterface = en0
network.interface = en0


# Security
Expand All @@ -41,23 +41,23 @@ NetworkInterface = en0
# - false
# If this value is set to 'false', TCP will be used on transport layer
# If no correct value is provided here, 'false' will be chosen
TLSSecurity = true
tls = false


# Contract certificate update time span
#-------------------------------------
#
# Integer value defining the time span in days which precedes the expiration of a contract certificate
# and during which an update of the contract certificate needs to be performed
ContractCertificateUpdateTimespan = 14
contract.certificate.update.timespan = 14


# SessionID
#----------
#
# If this value is unequal to zero, then it represents a previously
# paused V2G communication session
SessionID = 0
session.id = 0


# Selected payment option
Expand All @@ -67,7 +67,7 @@ SessionID = 0
# Possible values are:
# - Contract
# - ExternalPayment
RequestedPaymentOption =
authentication.mode =


# Requested energy transfer mode
Expand All @@ -81,7 +81,7 @@ RequestedPaymentOption =
# - DC_extended
# - DC_combo_core
# - DC_unique
RequestedEnergyTransferMode = AC_three_phase_core
energy.transfermode.requested = AC_three_phase_core


# XML representation of messages
Expand All @@ -92,7 +92,7 @@ RequestedEnergyTransferMode = AC_three_phase_core
# - false
# If this value is set to 'true', the EXICodec will print each message's XML representation (for debugging purposes)
# If no correct value is provided here, 'false' will be chosen
XMLRepresentationOfMessages = true
exi.messages.showxml = true


# Hexadecimal and Base64 representation of messages
Expand All @@ -103,7 +103,7 @@ XMLRepresentationOfMessages = true
# - false
# If this value is set to 'true', the EXICodec will print each message's hexadecimal and Base64 representation (for debugging purposes)
# If no correct value is provided here, 'false' will be chosen
HexAndBase64RepresentationOfMessages = true
exi.messages.showhex = true


# Extended logging of signature verification
Expand All @@ -114,7 +114,7 @@ HexAndBase64RepresentationOfMessages = true
# - false
# If this value is set to 'true', extended logging will be printed upon verification of signatures (for debugging purposes)
# If no correct value is provided here, 'false' will be chosen
SignatureVerificationLog = true
signature.verification.showlog = true


# EXI codec
Expand All @@ -125,4 +125,4 @@ SignatureVerificationLog = true
# - exificient
# - open_exi
# If no correct value is provided here, 'exificient' will be used
EXICodec = open_exi
exi.codec = open_exi
23 changes: 23 additions & 0 deletions RISE-V2G-EVCC/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/*******************************************************************************
* The MIT License (MIT)
*
* Copyright (c) 2015-2017 V2G Clarity (Dr. Marc Mültin)
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*******************************************************************************/
98 changes: 53 additions & 45 deletions RISE-V2G-EVCC/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,76 +2,84 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

<parent>
<groupId>org.v2gclarity.risev2g</groupId>
<artifactId>parent</artifactId>
<version>1.0.0-SNAPSHOT</version>
<groupId>com.v2gclarity.risev2g</groupId>
<artifactId>rise-v2g-parent</artifactId>
<version>1.1.4-SNAPSHOT</version>
<relativePath>../RISE-V2G-PARENT</relativePath>
</parent>

<modelVersion>4.0.0</modelVersion>
<packaging>jar</packaging>
<url>http://maven.apache.org</url>
<artifactId>evcc</artifactId>
<name>risev2g.evcc</name>
<artifactId>rise-v2g-evcc</artifactId>
<name>rise-v2g-evcc</name>

<dependencies>
<dependency>
<groupId>org.v2gclarity.risev2g</groupId>
<artifactId>shared</artifactId>
<version>1.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>2.1</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.1</version>
<groupId>com.v2gclarity.risev2g</groupId>
<artifactId>rise-v2g-shared</artifactId>
<version>1.1.4-SNAPSHOT</version>
</dependency>
</dependencies>


<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.version>1.1.4-SNAPSHOT</project.version>
</properties>

<build>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId> <!-- See http://maven.apache.org/plugins/maven-assembly-plugin/usage.html -->
<version>3.1.0</version>
<configuration>
<finalName>rise-v2g-evcc-${project.version}</finalName>
<appendAssemblyId>false</appendAssemblyId>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<mainClass>org.v2gclarity.risev2g.evcc.main.StartEVCC</mainClass>
<mainClass>com.v2gclarity.risev2g.evcc.main.StartEVCC</mainClass>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<appendAssemblyId>false</appendAssemblyId>
</configuration>
<executions>
<execution>
<id>make-my-jar-with-dependencies</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<appendAssemblyId>false</appendAssemblyId>
<descriptor>${project.baseUri}src/assembly/bin.xml</descriptor>
<descriptors> <!-- Same as jar-with-dependencies descriptorRef, but can be adapted if needed -->
<descriptor>src/assembly/bin.xml</descriptor>
</descriptors>
</configuration>
<executions>
<execution>
<phase>package</phase>
<id>one-jar-only</id>
<phase>package</phase> <!-- bind to the packaging phase -->
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin> <!-- For copying the keystores and private key to the target folder next to the JAR file -->
<artifactId>maven-resources-plugin</artifactId>
<version>3.0.2</version>
<executions>
<execution>
<id>copy-resources</id>
<phase>install</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${basedir}/target</outputDirectory>
<resources>
<resource>
<directory>${basedir}</directory>
<includes>
<include>*.p12</include>
<include>*.jks</include>
<include>*.properties</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

Expand Down
Loading

0 comments on commit babd2ee

Please sign in to comment.