Commit f69bd6c4 authored by berge's avatar berge
Browse files

validation fixes

parent 3d41dd9c
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -2,10 +2,10 @@
<classpath>
	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
	<classpathentry kind="src" path="javasrc"/>
	<classpathentry sourcepath="/TabularCodecGenerator/javasrc" kind="lib" path="lib/TabularCodec.jar"/>
	<classpathentry sourcepath="TTTHREE_SRC" kind="var" path="TTTHREE_HOME/lib/TTorg.jar"/>
	<classpathentry sourcepath="TTTHREE_SRC" kind="var" path="TTTHREE_HOME/lib/TTthreeRuntime.jar"/>
	<classpathentry kind="var" path="TTTHREE_HOME/lib/TTorg.jar" sourcepath="TTTHREE_SRC"/>
	<classpathentry kind="var" path="TTTHREE_HOME/lib/TTthreeRuntime.jar" sourcepath="TTTHREE_SRC"/>
	<classpathentry kind="var" path="TTWB_CORE/lib/TTtools.jar"/>
	<classpathentry kind="lib" path="lib/jpcap.jar"/>
	<classpathentry kind="lib" path="lib/TabularCodec.jar"/>
	<classpathentry kind="output" path="build"/>
</classpath>
+11 −11
Original line number Diff line number Diff line
#Mon May 21 18:34:35 CEST 2007
#Tue May 29 11:33:44 CEST 2007
tcn3.debug_mode=false
ttcn3.debug_mode=false
ttcn3.mlf_jar=IPv6TestAdapter.jar
+117 −111
Original line number Diff line number Diff line
@@ -45,6 +45,8 @@ import com.testingtech.ttcn.tci.codec.tabular.TabularRecord;
import com.testingtech.ttcn.tri.IPv6TestAdapter;
import com.testingtech.ttcn.tri.enums.IEnumDefinitions;

import de.tu_berlin.cs.uebb.muttcn.runtime.InvalidAssignmentError;

public class AuthHeaderCodec implements IEnumDefinitions{
	
    /**
@@ -54,6 +56,7 @@ public class AuthHeaderCodec implements IEnumDefinitions{
     */
	public static void decodeAuthHeader(TabularDecoder dec, TabularObject to) throws TabularException {

		try {
			RecordValue rv = (RecordValue)((TabularRecord)to).tciValue;

			com.testingtech.generated.codec.LibCommon_BasicTypesAndValues.TabularUInt8 nextHeader;
@@ -163,6 +166,9 @@ public class AuthHeaderCodec implements IEnumDefinitions{
				rv.setField("icvPadding", icvPadding.toValue());
			}

		} catch (InvalidAssignmentError e) {
			throw new TabularException(e.getMessage());
		}		
	}

//	private static int getICVLen(RecordValue rv, RB rb) throws TabularException {
+176 −172
Original line number Diff line number Diff line
@@ -60,6 +60,7 @@ import com.testingtech.ttcn.tri.extFunc.ExternalFunctions_IPv6;
import com.testingtech.util.BitArrayInputStream;
import com.testingtech.util.BitArrayOutputStream;

import de.tu_berlin.cs.uebb.muttcn.runtime.InvalidAssignmentError;
import de.tu_berlin.cs.uebb.muttcn.runtime.RB;
import de.tu_berlin.cs.uebb.ttcn.runtime.OctetString;

@@ -71,7 +72,7 @@ public class EspHeaderCodec implements IEnumDefinitions{
     * @throws TabularException
     */
	public static void decodeESPHeader(TabularDecoder dec, TabularObject to) throws TabularException {
		
		try {		
			RecordValue rv = (RecordValue)((TabularRecord)to).tciValue;

			com.testingtech.generated.codec.LibCommon_BasicTypesAndValues.TabularUInt32 spi;
@@ -259,6 +260,9 @@ public class EspHeaderCodec implements IEnumDefinitions{
			}

			rv.setField("espPayload", espPayload.toValue());
		} catch (InvalidAssignmentError e) {
			throw new TabularException(e.getMessage());
		}

	}

+158 −149
Original line number Diff line number Diff line
@@ -60,6 +60,7 @@ import com.testingtech.ttcn.tri.extFunc.ExternalFunctions_IPv6;
import com.testingtech.util.BitArrayInputStream;
import com.testingtech.util.BitArrayOutputStream;

import de.tu_berlin.cs.uebb.muttcn.runtime.InvalidAssignmentError;
import de.tu_berlin.cs.uebb.muttcn.runtime.RB;
import de.tu_berlin.cs.uebb.ttcn.runtime.OctetString;

@@ -72,6 +73,7 @@ public class EncryptedPayloadCodec implements IEnumDefinitions{
     */
	public static void decodeEncryptedPayload(TabularDecoder dec, TabularObject to) throws TabularException {

		try {			
			RecordValue rv = (RecordValue)((TabularRecord)to).tciValue;

			com.testingtech.generated.codec.LibCommon_BasicTypesAndValues.TabularUInt8 nextPayload;
@@ -203,7 +205,7 @@ public class EncryptedPayloadCodec implements IEnumDefinitions{
					padding = (com.testingtech.generated.codec.LibCommon_DataStrings.TabularOct1to255) new com.testingtech.generated.codec.LibCommon_DataStrings.TabularOct1to255(rv.getField(
					"padding"));
					int paddingIdx = payload.length - padLen - padLength.tValue;
				if (paddingIdx>0) {
					if (paddingIdx>=0) {
						padding.tValue = getBytes(padLength.tValue, payload, paddingIdx);
						padding.length = padLength.getLength();
					}
@@ -230,6 +232,10 @@ public class EncryptedPayloadCodec implements IEnumDefinitions{
				payloadList.decode(decPaylaod);
			}
			rv.setField("payloadList", payloadList.toValue());
		} catch (InvalidAssignmentError e) {
			throw new TabularException(e.getMessage());
		}

	}

    /**
@@ -322,7 +328,10 @@ public class EncryptedPayloadCodec implements IEnumDefinitions{

		byte [] markedBytes = enc.getBytesFromMark();

		boolean initiator = ((markedBytes[19]&0x08)==0x08)?true:false;
		boolean initiator = false;
		if (markedBytes.length>0) {
			initiator = ((markedBytes[19]&0x08)==0x08)?true:false;
		}
		
		byte [] payload = encPayload.toByteArray();
		if (!ta.getIkeEncryptionAlgo().equals(ENCRYPTION_E_NULL)) {
Loading