Skip to content
Snippets Groups Projects
Commit ff84c162 authored by Yann Garcia's avatar Yann Garcia
Browse files

Enhance TLS support

parent 2cdfdb43
No related branches found
No related tags found
No related merge requests found
...@@ -5284,7 +5284,7 @@ module OneM2M_Functions { ...@@ -5284,7 +5284,7 @@ module OneM2M_Functions {
log(">>> f_getLocalPoA: ", p_portDesc); log(">>> f_getLocalPoA: ", p_portDesc);
if (ischosen(p_portDesc.binding.httpBindingDesc)) { if (ischosen(p_portDesc.binding.httpBindingDesc)) {
if (ispresent(p_portDesc.binding.httpBindingDesc.bindingDesc.useTls) and (p_portDesc.binding.httpBindingDesc.bindingDesc.useTls == true)) { if (ispresent(p_portDesc.security)) {
v_poa := "https://" & p_portDesc.binding.httpBindingDesc.bindingDesc.tsAddress; v_poa := "https://" & p_portDesc.binding.httpBindingDesc.bindingDesc.tsAddress;
} else { } else {
v_poa := "http://" & p_portDesc.binding.httpBindingDesc.bindingDesc.tsAddress; v_poa := "http://" & p_portDesc.binding.httpBindingDesc.bindingDesc.tsAddress;
...@@ -5293,7 +5293,11 @@ module OneM2M_Functions { ...@@ -5293,7 +5293,11 @@ module OneM2M_Functions {
v_poa := v_poa & ":" & int2str(p_portDesc.binding.httpBindingDesc.bindingDesc.localPort); v_poa := v_poa & ":" & int2str(p_portDesc.binding.httpBindingDesc.bindingDesc.localPort);
} }
} else if (ischosen(p_portDesc.binding.coapBindingDesc)) { } else if (ischosen(p_portDesc.binding.coapBindingDesc)) {
v_poa := "coap://" & p_portDesc.binding.coapBindingDesc.bindingDesc.tsAddress; if (ispresent(p_portDesc.security)) {
v_poa := "coaps://" & p_portDesc.binding.coapBindingDesc.bindingDesc.tsAddress;
} else {
v_poa := "coap://" & p_portDesc.binding.coapBindingDesc.bindingDesc.tsAddress;
}
if (ispresent(p_portDesc.binding.coapBindingDesc.bindingDesc.localPort)) { if (ispresent(p_portDesc.binding.coapBindingDesc.bindingDesc.localPort)) {
v_poa := v_poa & ":" & int2str(p_portDesc.binding.coapBindingDesc.bindingDesc.localPort); v_poa := v_poa & ":" & int2str(p_portDesc.binding.coapBindingDesc.bindingDesc.localPort);
} }
...@@ -5908,7 +5912,7 @@ module OneM2M_Functions { ...@@ -5908,7 +5912,7 @@ module OneM2M_Functions {
p_targetIutAddress := p_sendingPort.binding.wsBindingDesc.bindingDesc.sutAddress & ":" & int2str(p_sendingPort.binding.wsBindingDesc.bindingDesc.remotePort); p_targetIutAddress := p_sendingPort.binding.wsBindingDesc.bindingDesc.sutAddress & ":" & int2str(p_sendingPort.binding.wsBindingDesc.bindingDesc.remotePort);
} }
if (ischosen(p_receivingPort.binding.httpBindingDesc)) { if (ischosen(p_receivingPort.binding.httpBindingDesc)) {
p_protocolBindingIn := "HTTP"; p_protocolBindingIn := "HTTP";
} else if (ischosen(p_receivingPort.binding.coapBindingDesc)) { } else if (ischosen(p_receivingPort.binding.coapBindingDesc)) {
p_protocolBindingIn := "COAP"; p_protocolBindingIn := "COAP";
...@@ -6942,7 +6946,7 @@ module OneM2M_Functions { ...@@ -6942,7 +6946,7 @@ module OneM2M_Functions {
in InterfaceIds p_interfaceIds, in InterfaceIds p_interfaceIds,
in template MsgOut p_msgOut in template MsgOut p_msgOut
) runs on Tester { ) runs on Tester {
log(">>> f_send: ", p_interfaceIds); log(">>> f_send: ", p_interfaceIds, " - ", p_msgOut);
p_msgOut.host := vc_myInterfaces[enum2int(p_interfaceIds)].myHost; p_msgOut.host := vc_myInterfaces[enum2int(p_interfaceIds)].myHost;
p_msgOut.protocolBinding := vc_myInterfaces[enum2int(p_interfaceIds)].myProtocolBinding; p_msgOut.protocolBinding := vc_myInterfaces[enum2int(p_interfaceIds)].myProtocolBinding;
......
...@@ -173,11 +173,11 @@ module OneM2M_Pixits { ...@@ -173,11 +173,11 @@ module OneM2M_Pixits {
tsAddress := "127.0.0.1", tsAddress := "127.0.0.1",
remotePort := 8080, // SUT CoAP/HTTP port remotePort := 8080, // SUT CoAP/HTTP port
localPort := 3031, // Test Adapter client port (for debug purpose only) localPort := 3031, // Test Adapter client port (for debug purpose only)
sutAddress := "127.0.0.1", sutAddress := "127.0.0.1"
useTls := omit
} }
} }
}, },
security := omit,
serialization := "xml" serialization := "xml"
}, },
mcaPortIn := { mcaPortIn := {
...@@ -188,11 +188,11 @@ module OneM2M_Pixits { ...@@ -188,11 +188,11 @@ module OneM2M_Pixits {
tsAddress := "127.0.0.1", tsAddress := "127.0.0.1",
remotePort := omit, remotePort := omit,
localPort := 3041, // Test Adapter listener port (AeSimu acts as server) localPort := 3041, // Test Adapter listener port (AeSimu acts as server)
sutAddress := "127.0.0.1", sutAddress := "127.0.0.1"
useTls := omit
} }
} }
}, },
security := omit,
serialization := "xml" serialization := "xml"
} }
}; };
...@@ -207,11 +207,11 @@ module OneM2M_Pixits { ...@@ -207,11 +207,11 @@ module OneM2M_Pixits {
tsAddress := "127.0.0.1", tsAddress := "127.0.0.1",
remotePort := 8080, // SUT CoAP/HTTP port remotePort := 8080, // SUT CoAP/HTTP port
localPort := 3032, // Test Adapter client port (for debug purpose only) localPort := 3032, // Test Adapter client port (for debug purpose only)
sutAddress := "127.0.0.1", sutAddress := "127.0.0.1"
useTls := omit
} }
} }
}, },
security := omit,
serialization := "xml" serialization := "xml"
}, },
mcaPortIn := { mcaPortIn := {
...@@ -222,11 +222,11 @@ module OneM2M_Pixits { ...@@ -222,11 +222,11 @@ module OneM2M_Pixits {
tsAddress := "127.0.0.1", tsAddress := "127.0.0.1",
remotePort := omit, remotePort := omit,
localPort := 3042, // Test Adapter listener port (AeSimu acts as server) localPort := 3042, // Test Adapter listener port (AeSimu acts as server)
sutAddress := "127.0.0.1", sutAddress := "127.0.0.1"
useTls := omit
} }
} }
}, },
security := omit,
serialization := "xml" serialization := "xml"
} }
}; };
...@@ -244,11 +244,11 @@ module OneM2M_Pixits { ...@@ -244,11 +244,11 @@ module OneM2M_Pixits {
tsAddress := "127.0.0.1", tsAddress := "127.0.0.1",
remotePort:= 8080, remotePort:= 8080,
localPort := 3131, localPort := 3131,
sutAddress := "127.0.0.1", sutAddress := "127.0.0.1"
useTls := omit
} }
} }
}, },
security := omit,
serialization := "xml" serialization := "xml"
}, },
mcaPortIn := { mcaPortIn := {
...@@ -259,11 +259,11 @@ module OneM2M_Pixits { ...@@ -259,11 +259,11 @@ module OneM2M_Pixits {
tsAddress := "127.0.0.1", tsAddress := "127.0.0.1",
remotePort:= omit, remotePort:= omit,
localPort := 3141, localPort := 3141,
sutAddress := "127.0.0.1", sutAddress := "127.0.0.1"
useTls := omit
} }
} }
}, },
security := omit,
serialization := "xml" serialization := "xml"
}, },
mccPort := { mccPort := {
...@@ -274,11 +274,11 @@ module OneM2M_Pixits { ...@@ -274,11 +274,11 @@ module OneM2M_Pixits {
tsAddress := "127.0.0.1", tsAddress := "127.0.0.1",
remotePort:= 8080, remotePort:= 8080,
localPort := 4131, localPort := 4131,
sutAddress := "127.0.0.1", sutAddress := "127.0.0.1"
useTls := omit
} }
} }
}, },
security := omit,
serialization := "xml" serialization := "xml"
}, },
mccPortIn := { mccPortIn := {
...@@ -289,11 +289,11 @@ module OneM2M_Pixits { ...@@ -289,11 +289,11 @@ module OneM2M_Pixits {
tsAddress := "127.0.0.1", tsAddress := "127.0.0.1",
remotePort:= omit, remotePort:= omit,
localPort := 4141, localPort := 4141,
sutAddress := "127.0.0.1", sutAddress := "127.0.0.1"
useTls := omit
} }
} }
}, },
security := omit,
serialization := "xml" serialization := "xml"
} }
}; };
...@@ -311,11 +311,11 @@ module OneM2M_Pixits { ...@@ -311,11 +311,11 @@ module OneM2M_Pixits {
tsAddress := "127.0.0.1", tsAddress := "127.0.0.1",
remotePort:= 8080, remotePort:= 8080,
localPort := 3132, localPort := 3132,
sutAddress := "127.0.0.1", sutAddress := "127.0.0.1"
useTls := omit
} }
} }
}, },
security := omit,
serialization := "json" serialization := "json"
}, },
mcaPortIn := { mcaPortIn := {
...@@ -326,11 +326,11 @@ module OneM2M_Pixits { ...@@ -326,11 +326,11 @@ module OneM2M_Pixits {
tsAddress := "127.0.0.1", tsAddress := "127.0.0.1",
remotePort:= 8080, remotePort:= 8080,
localPort := 3142, localPort := 3142,
sutAddress := "127.0.0.1", sutAddress := "127.0.0.1"
useTls := omit
} }
} }
}, },
security := omit,
serialization := "json" serialization := "json"
}, },
mccPort := { mccPort := {
...@@ -341,11 +341,11 @@ module OneM2M_Pixits { ...@@ -341,11 +341,11 @@ module OneM2M_Pixits {
tsAddress := "127.0.0.1", tsAddress := "127.0.0.1",
remotePort:= 8080, remotePort:= 8080,
localPort := 4132, localPort := 4132,
sutAddress := "127.0.0.1", sutAddress := "127.0.0.1"
useTls := omit
} }
} }
}, },
security := omit,
serialization := "json" serialization := "json"
}, },
mccPortIn := { mccPortIn := {
...@@ -356,11 +356,12 @@ module OneM2M_Pixits { ...@@ -356,11 +356,12 @@ module OneM2M_Pixits {
tsAddress := "127.0.0.1", tsAddress := "127.0.0.1",
remotePort:= 8080, remotePort:= 8080,
localPort := 4142, localPort := 4142,
sutAddress := "127.0.0.1", sutAddress := "127.0.0.1"
useTls := omit
} }
} }
}, },
security := omit,
serialization := "json" serialization := "json"
} }
}; };
...@@ -377,11 +378,11 @@ module OneM2M_Pixits { ...@@ -377,11 +378,11 @@ module OneM2M_Pixits {
tsAddress := "127.0.0.1", tsAddress := "127.0.0.1",
remotePort := 8080, // SUT CoAP/HTTP port remotePort := 8080, // SUT CoAP/HTTP port
localPort := 3033, // Test Adapter client port (for debug purpose only) localPort := 3033, // Test Adapter client port (for debug purpose only)
sutAddress := "127.0.0.1", sutAddress := "127.0.0.1"
useTls := omit
} }
} }
}, },
security := omit,
serialization := "xml" serialization := "xml"
}, },
mcaPortIn := { mcaPortIn := {
...@@ -392,11 +393,11 @@ module OneM2M_Pixits { ...@@ -392,11 +393,11 @@ module OneM2M_Pixits {
tsAddress := "127.0.0.1", tsAddress := "127.0.0.1",
remotePort := omit, remotePort := omit,
localPort := 3043, // Test Adapter listener port (AeSimu acts as server) localPort := 3043, // Test Adapter listener port (AeSimu acts as server)
sutAddress := "127.0.0.1", sutAddress := "127.0.0.1"
useTls := omit
} }
} }
}, },
security := omit,
serialization := "xml" serialization := "xml"
} }
}; };
......
...@@ -4325,15 +4325,12 @@ group OtherTypes { ...@@ -4325,15 +4325,12 @@ group OtherTypes {
* The local client port. In this case, the value 'omit' is interpreted as random port number by the Test Adapter * The local client port. In this case, the value 'omit' is interpreted as random port number by the Test Adapter
* @member sutAddress SUT IP address, optional. * @member sutAddress SUT IP address, optional.
* If omitted, the SUT IP address defined in SutDesc data structure will be used by the Test Adapter * If omitted, the SUT IP address defined in SutDesc data structure will be used by the Test Adapter
* @member useTls Set to true if HTTPS shall be used, optional.
* If omitted, regular HTTP is used
*/ */
type record BindingDesc { type record BindingDesc {
charstring tsAddress, charstring tsAddress,
integer remotePort optional, integer remotePort optional,
integer localPort optional, integer localPort optional,
charstring sutAddress, charstring sutAddress
boolean useTls optional
} }
/** /**
...@@ -4362,8 +4359,8 @@ group OtherTypes { ...@@ -4362,8 +4359,8 @@ group OtherTypes {
type record MqttBindingDesc { type record MqttBindingDesc {
ProtocolBindings bindingProtocol (e_mqtt), ProtocolBindings bindingProtocol (e_mqtt),
BindingDesc bindingDesc, BindingDesc bindingDesc,
XSD.ID originator, XSD.ID originator,
XSD.ID receiver XSD.ID receiver
} }
/** /**
...@@ -4389,8 +4386,32 @@ group OtherTypes { ...@@ -4389,8 +4386,32 @@ group OtherTypes {
*/ */
type record PortDesc { type record PortDesc {
BindingProtocolsSelect binding, BindingProtocolsSelect binding,
TransportSecurity security optional,
SerializationRepresentations serialization SerializationRepresentations serialization
} }
/**
* @desc Transport Layer security description
* Apply for both TSL and DTLS
* @member rootCert Test System root ca or internmediate root CA
* @member trustedCerts IUT cerver certificate, including IUT root ca or internmediate root CA
* @member serverSign Signature Test System certificate for the server side
* @member serverEnc Encryption Test System certificate for the server side
* @member clientSign Signature Test System certificate for the client side
* @member clientEnc Encryption Test System certificate for the client side
* @member psk_identity TLS-PSK identity
* @member psk_key TLS-PSK shared secret
*/
type record TransportSecurity {
charstring rootCert,
charstring trustedCerts,
charstring serverSign,
charstring serverEnc,
charstring clientSign,
charstring clientEnc,
octetstring psk_identity optional,
octetstring psk_key optional
}
/** /**
* @desc UpperTester component settings * @desc UpperTester component settings
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment