Skip to content

Commit c20b02e

Browse files
committed
syncing commit, should be reset and recomitted ci skip
1 parent 32e9e15 commit c20b02e

File tree

6 files changed

+99
-10
lines changed

6 files changed

+99
-10
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
state-fuzzer-client
2+
3+
# SUT config
4+
-port
5+
${sul.port}
6+
-startWait
7+
2000
8+
-responseWait
9+
200
10+
-protocol
11+
DTLS12
12+
-cmd
13+
${fuzzer.dir}/modules/jdk-${jsse.version}/bin/java -jar ${suts.dir}/jsse-${jsse.version}-dtls-clientserver.jar -client -port ${sul.port} -hostname localhost -keyLocation ${keystore}/rsa2048.jks -keyPassword password -trustLocation ${keystore}/rsa2048.jks -trustPassword password -threadStarterIpPort localhost:${fuzzer.port} -operation FULL
14+
-adapterPort
15+
${fuzzer.port}
16+
-processTrigger
17+
START
18+
19+
# learning config
20+
##### LearnerConfig #####
21+
-learningAlgorithm
22+
RaLambda
23+
-equivalenceAlgorithms
24+
IO_RANDOM_WALK
25+
-logQueries
26+
-alphabet
27+
${alphabets.clients}/jsse_ecdhe_cert.xml
28+
-maxDepthRA
29+
10
30+
-probNewDataValue
31+
0.5
32+
-seed
33+
7
34+
-randLength
35+
10
36+
-equivalenceQueryBound
37+
20000
38+
-output
39+
output/jsse-${jsse.version}_client_ecdhe_cert
40+
-ceReruns
41+
3
42+
-skipNonDetTests
43+
-timeLimit
44+
P2D

src/main/java/se/uu/it/dtlsfuzzer/MainRA.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public class MainRA {
1010

1111
public static void main(String args[]) throws IOException, XMLStreamException {
1212
Security.addProvider(new BouncyCastleProvider());
13-
MultiBuilder mb = new MultiBuilder();
13+
MultiBuilderRA mb = new MultiBuilderRA();
1414
// String[] parentLoggers = {Main.class.getPackageName()};
1515

1616
CommandLineParser<?> commandLineParser = new CommandLineParser<>(mb, mb, mb, mb);

src/main/java/se/uu/it/dtlsfuzzer/MultiBuilderRA.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import com.github.protocolfuzzing.protocolstatefuzzer.components.learner.alphabet.AlphabetBuilder;
44
import com.github.protocolfuzzing.protocolstatefuzzer.components.learner.alphabet.AlphabetBuilderStandard;
55
import com.github.protocolfuzzing.protocolstatefuzzer.components.learner.alphabet.xml.AlphabetSerializerXml;
6-
import com.github.protocolfuzzing.protocolstatefuzzer.components.learner.config.LearnerConfigStandard;
6+
import com.github.protocolfuzzing.protocolstatefuzzer.components.learner.config.LearnerConfigRA;
77
import com.github.protocolfuzzing.protocolstatefuzzer.components.learner.statistics.RegisterAutomatonWrapper;
88
import com.github.protocolfuzzing.protocolstatefuzzer.components.sul.core.SulBuilder;
99
import com.github.protocolfuzzing.protocolstatefuzzer.components.sul.core.SulWrapper;
@@ -90,13 +90,13 @@ public StateFuzzerRA<ParameterizedSymbol, TlsExecutionContextRA> build(
9090

9191
@Override
9292
public StateFuzzerClientConfig buildClientConfig() {
93-
return new StateFuzzerClientConfigStandard(new LearnerConfigStandard(), new TlsSulClientConfig(),
93+
return new StateFuzzerClientConfigStandard(new LearnerConfigRA(), new TlsSulClientConfig(),
9494
new TestRunnerConfigStandard(), new TimingProbeConfigStandard());
9595
}
9696

9797
@Override
9898
public StateFuzzerServerConfig buildServerConfig() {
99-
return new StateFuzzerServerConfigStandard(new LearnerConfigStandard(), new TlsSulServerConfig(),
99+
return new StateFuzzerServerConfigStandard(new LearnerConfigRA(), new TlsSulServerConfig(),
100100
new TestRunnerConfigStandard(), new TimingProbeConfigStandard());
101101
}
102102

src/main/java/se/uu/it/dtlsfuzzer/components/sul/core/TlsSulRA.java

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
import com.github.protocolfuzzing.protocolstatefuzzer.components.sul.mapper.Mapper;
1313
import com.github.protocolfuzzing.protocolstatefuzzer.components.sul.mapper.config.MapperConfig;
1414
import com.github.protocolfuzzing.protocolstatefuzzer.utils.CleanupTasks;
15-
import de.learnlib.ralib.data.DataValue;
1615
import de.learnlib.ralib.words.OutputSymbol;
1716
import de.learnlib.ralib.words.PSymbolInstance;
1817
import de.rub.nds.tlsattacker.core.config.Config;
@@ -34,6 +33,7 @@
3433
import se.uu.it.dtlsfuzzer.components.sul.core.config.TlsSulClientConfig;
3534
import se.uu.it.dtlsfuzzer.components.sul.core.config.TlsSulConfig;
3635
import se.uu.it.dtlsfuzzer.components.sul.mapper.DtlsMapperComposer;
36+
import se.uu.it.dtlsfuzzer.components.sul.mapper.OutputBuilderWrapper;
3737
import se.uu.it.dtlsfuzzer.components.sul.mapper.TlsExecutionContext;
3838
import se.uu.it.dtlsfuzzer.components.sul.mapper.TlsExecutionContextRA;
3939
import se.uu.it.dtlsfuzzer.components.sul.mapper.TlsInputTransformer;
@@ -290,8 +290,9 @@ private PSymbolInstance executeInput(PSymbolInstance input) {
290290
// power.
291291
DtlsInput convertedInput = (DtlsInput) inputTransformer.fromTransformedInput(input.getBaseSymbol());
292292

293-
DataValue<?> value = input.getParameterValues()[0];
294-
convertedInput.setEpoch((Integer) value.getId());
293+
// FIXME: enable parameters when no parameter learning is "working".
294+
//DataValue<?> value = input.getParameterValues()[0];
295+
//convertedInput.setEpoch((Integer) value.getId());
295296

296297
// There seems to be no DtlsOutput with an epoch field so for now outputs have
297298
// no parameters.
@@ -316,7 +317,7 @@ private TlsOutput executeInput(TlsInput in) {
316317
}
317318

318319
TlsExecutionContext mealyContext = new TlsExecutionContext(sulConfig, context.getState());
319-
320+
LOGGER.debug("mealycontext: {}", mealyContext);
320321
TlsOutput output = mapperComposer.execute(in, mealyContext);
321322

322323
context = new TlsExecutionContextRA(sulConfig, mealyContext.getState());
@@ -380,7 +381,9 @@ public void setDynamicPortProvider(DynamicPortProvider dynamicPortProvider) {
380381

381382
@Override
382383
public Mapper<PSymbolInstance, PSymbolInstance, TlsExecutionContextRA> getMapper() {
383-
throw new RuntimeException("The mapper is of the wrong type, let's hope no one asks for it.");
384+
// Make a new wrapper instanace for now, depending on how heavily it is used it
385+
// might be worth to make this a class variable.
386+
return new OutputBuilderWrapper(outputBuilder);
384387
}
385388

386389
@Override
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
package se.uu.it.dtlsfuzzer.components.sul.mapper;
2+
3+
import com.github.protocolfuzzing.protocolstatefuzzer.components.sul.mapper.Mapper;
4+
import com.github.protocolfuzzing.protocolstatefuzzer.components.sul.mapper.abstractsymbols.OutputBuilder;
5+
import com.github.protocolfuzzing.protocolstatefuzzer.components.sul.mapper.abstractsymbols.OutputChecker;
6+
import com.github.protocolfuzzing.protocolstatefuzzer.components.sul.mapper.config.MapperConfig;
7+
import de.learnlib.ralib.words.PSymbolInstance;
8+
import se.uu.it.dtlsfuzzer.components.sul.mapper.symbols.outputs.TlsOutputBuilderRA;
9+
10+
public class OutputBuilderWrapper implements Mapper<PSymbolInstance, PSymbolInstance, TlsExecutionContextRA> {
11+
12+
TlsOutputBuilderRA outputBuilder;
13+
14+
public OutputBuilderWrapper(TlsOutputBuilderRA outputBuilder) {
15+
this.outputBuilder = outputBuilder;
16+
}
17+
18+
@Override
19+
public PSymbolInstance execute(PSymbolInstance input, TlsExecutionContextRA context) {
20+
// TODO Auto-generated method stub
21+
throw new UnsupportedOperationException("Unimplemented method 'execute'");
22+
}
23+
24+
@Override
25+
public MapperConfig getMapperConfig() {
26+
// TODO Auto-generated method stub
27+
throw new UnsupportedOperationException("Unimplemented method 'getMapperConfig'");
28+
}
29+
30+
@Override
31+
public OutputBuilder<PSymbolInstance> getOutputBuilder() {
32+
// TODO Auto-generated method stub
33+
return outputBuilder;
34+
}
35+
36+
@Override
37+
public OutputChecker<PSymbolInstance> getOutputChecker() {
38+
// TODO Auto-generated method stub
39+
throw new UnsupportedOperationException("Unimplemented method 'getOutputChecker'");
40+
}
41+
42+
}

src/main/resources/log4j2.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<Logger name="com.github.protocolfuzzing.protocolstatefuzzer" level="info" additivity="false">
1414
<AppenderRef ref="ConsoleAppender" />
1515
</Logger>
16-
<Root level="info">
16+
<Root level="debug">
1717
<AppenderRef ref="ConsoleAppender" />
1818
</Root>
1919
</Loggers>

0 commit comments

Comments
 (0)