Commit dcda3be5 authored by berge's avatar berge
Browse files

Fixed TC_6186_02

parent 73b67bef
Loading
Loading
Loading
Loading
+34 −27
Original line number Diff line number Diff line
@@ -2554,6 +2554,7 @@ group ikeProtocol {
		var FncRetCode v_ret;
		var CfMessage v_cfMsg;
		var IkeAuthRequest v_ikeAuthReq;
		var UInt8 v_index;
		
		//Configuration
		f_cfCore01Up(v_cfMsg);
@@ -2582,9 +2583,9 @@ group ikeProtocol {
		);

		//"badly formatted"
		//is achieved by setting the length field in the IKE header to a too high value
		v_ikeAuthReq.ipv6Payload.ikeMsg.ikev2Header.messageLength := 
			v_ikeAuthReq.ipv6Payload.ikeMsg.ikev2Header.messageLength + 1;
		//is achieved by setting the m_tsInitiatorPL.nextPayload from c_tsResponderPL to c_noNextPL
		v_index := sizeof(v_ikeAuthReq.ipv6Payload.ikeMsg.payloadList[0].encrypted.payloadList);
		v_ikeAuthReq.ipv6Payload.ikeMsg.payloadList[0].encrypted.payloadList[v_index-2].tsInitiator.nextPayload := c_noNextPL;
		v_ret := f_sendIkeAuthReq (v_ikeAuthReq);
		if(v_ret != e_success) {f_selfOrClientSyncAndVerdict(c_tbDone, v_ret);}

@@ -2592,19 +2593,31 @@ group ikeProtocol {
		alt {

			// IKE_AUTH response with a Notify payload is received
			[]	ipPort.receive(mw_ikeAuthRsp(	v_cfMsg.paramsIut.lla,
												v_cfMsg.paramsRt01.lla,
			[]	ipPort.receive(mw_ikeAuthRsp(	v_cfMsg.paramsIut.gla,
												v_cfMsg.paramsRt01.gla,
												vc_ikeSad[0].udpIutPort,
												vc_ikeSad[0].udpTnPort,
												vc_ikeSad[0].spiInitiator,
												vc_ikeSad[0].spiResponder,
												vc_ikeSad[0].messageIdTn,
												mw_encryptedPLL(superset(mw_notifyAnyPL))))
												mw_encryptedPLL({mw_notifyAnyPL})))
				{
					tc_wait.stop;
					v_ret := e_success;
				}

			[]	ipPort.receive(mw_ikeAuthRsp(	v_cfMsg.paramsIut.gla,
												v_cfMsg.paramsRt01.gla,
												vc_ikeSad[0].udpIutPort,
												vc_ikeSad[0].udpTnPort,
												vc_ikeSad[0].spiInitiator,
												vc_ikeSad[0].spiResponder,
												vc_ikeSad[0].messageIdTn,
												mw_encryptedPLL(?)))
				{
					tc_wait.stop;
					v_ret := e_error;
					log("**** TC_SEC_6186_02: ERROR: IkeAuthRsp without Notify payload received **** ");
				}
			[]	tc_wait.timeout
				{
					v_ret :=  e_timeout;
@@ -2613,12 +2626,6 @@ group ikeProtocol {
		} // end alt

		//Postamble
		v_ret := f_delIkeSa(
			v_cfMsg.paramsHs02.gla,
			v_cfMsg.paramsIut.gla,
			v_cfMsg.paramsRt01.gla,
			v_cfMsg.paramsIut.gla,
			c_iFlagInitiator);
		f_setVerdictPostamble(v_ret);

		deactivate;