- 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
This commit is contained in:
Marc Mültin 2016-11-26 17:41:41 +08:00
parent 54759ee249
commit 7cd7bde429
4 changed files with 18 additions and 3 deletions

View File

@ -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);
}

View File

@ -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

View File

@ -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)

View File

@ -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