瀏覽代碼

- 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

Marc Mültin 9 年之前
父節點
當前提交
7cd7bde429

+ 7 - 1
RISE-V2G-EVCC/src/main/java/org/eclipse/risev2g/evcc/states/WaitForServiceDiscoveryRes.java

@@ -124,7 +124,13 @@ public class WaitForServiceDiscoveryRes extends ClientState {
 		selectedService.setParameterSetID(parameterSetID);
 		
 		getCommSessionContext().getSelectedServices().getSelectedService().add(selectedService);
-		getCommSessionContext().getServiceDetailsToBeRequested().add((short) serviceID);
+		
+		/*
+		 * There are no service details (a ServiceParameterList) yet defined for a charge service, 
+		 * so don't send a ServiceDetailReq for a ChargeService
+		 */
+		if (serviceID != 1)
+			getCommSessionContext().getServiceDetailsToBeRequested().add((short) serviceID);
 	}
 	
 	

+ 4 - 1
RISE-V2G-EVCC/src/main/java/org/eclipse/risev2g/evcc/transportLayer/TLSClient.java

@@ -91,7 +91,10 @@ public class TLSClient extends StatefulTransportLayerClient {
 			 * - TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
 			 * - TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256
 			 */
-			String[] enabledCipherSuites = {"TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256", "TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256"};
+			String[] enabledCipherSuites = {
+					"TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256", 
+					"TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256"
+			};
 			getTlsSocketToServer().setEnabledCipherSuites(enabledCipherSuites);
 			
 			// Set the supported TLS protocol

+ 3 - 0
RISE-V2G-SECC/src/main/java/org/eclipse/risev2g/secc/states/WaitForSupportedAppProtocolReq.java

@@ -91,6 +91,9 @@ public class WaitForSupportedAppProtocolReq extends ServerState {
 			supportedAppProtocolRes.setResponseCode(ResponseCodeType.FAILED_NO_NEGOTIATION);
 		}
 		
+		if (supportedAppProtocolRes.getResponseCode().equals(ResponseCodeType.FAILED_NO_NEGOTIATION)) 
+			getLogger().error("Response code '" + supportedAppProtocolRes.getResponseCode() + "' will be sent");
+		
 		return getSendMessage(supportedAppProtocolRes, 
 							  (supportedAppProtocolRes.getResponseCode().toString().startsWith("OK") ? 
 							  V2GMessages.SESSION_SETUP_REQ : V2GMessages.NONE)

+ 4 - 1
RISE-V2G-SECC/src/main/java/org/eclipse/risev2g/secc/transportLayer/TLSServer.java

@@ -62,7 +62,10 @@ public final class TLSServer extends StatefulTransportLayerServer {
 			 * - TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
 			 * - TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256
 			 */
-			String[] enabledCipherSuites = {"TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256", "TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256"};
+			String[] enabledCipherSuites = {
+					"TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256", 
+					"TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256"
+			};
 			getTlsServerSocket().setEnabledCipherSuites(enabledCipherSuites);
 			
 			// Set the supported TLS protocol