Skip to content

Commit 860e091

Browse files
committed
Merge origin/master into tls-testsuite
Conflicts: src/main/java/de/rub/nds/modifiablevariable/util/XMLPrettyPrinter.java
2 parents 454e80d + e908817 commit 860e091

File tree

102 files changed

+1212
-1110
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

102 files changed

+1212
-1110
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,6 @@ release.properties
77
dependency-reduced-pom.xml
88
buildNumber.properties
99
.mvn/timing.properties
10-
/nbproject/
10+
/nbproject/
11+
*.idea/
12+
ModifiableVariable.iml

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Modifiable Variables
22

33
![licence](https://img.shields.io/badge/License-Apachev2-brightgreen.svg)
4-
[![travis](https://travis-ci.org/RUB-NDS/ModifiableVariable.svg?branch=master)](https://travis-ci.org/RUB-NDS/ModifiableVariable)
4+
[![jenkins](https://hydrogen.cloud.nds.rub.de/buildStatus/icon.svg?job=ModifiableVariable)](https://hydrogen.cloud.nds.rub.de/job/ModifiableVariable/)
55

66
Modifiable variable allows one to set modifications to basic types after or before their values are actually determined. When their actual values are determined and one tries to access the value via getters, the original value will be returned in a modified form accordingly.
77

@@ -41,8 +41,8 @@ If you want to use modifiable variables in your maven projects, you can include
4141
# Supported data types
4242
The following modifiable variables are provided in this package with their modifications:
4343
* ModifiableBigInteger: add, explicitValue, shiftLeft, shiftRight, subtract, xor
44-
* ModifiableBoolean: explicitValue, toogle
45-
* ModifiableByteArray: delete, duplicate, explicitValue, insert, suffle, xor
44+
* ModifiableBoolean: explicitValue, toggle
45+
* ModifiableByteArray: delete, duplicate, explicitValue, insert, shuffle, xor
4646
* ModifiableInteger: add, explicitValue, shiftLeft, shiftRight, subtract, xor
4747
* ModifiableLong: add, explicitValue, subtract, xor
4848
* ModifiableByte: add, explicitValue, subtract, xor
@@ -205,9 +205,9 @@ ModifiableLong and ModifiableBytes support the following operations: add, explic
205205
</booleanExplicitValueModification>
206206
```
207207

208-
- Toogle:
208+
- Toggle:
209209
```xml
210-
<booleanToogleModification/>
210+
<booleanToggleModification/>
211211
```
212212

213213
# String

checkstyle.xml

Lines changed: 333 additions & 167 deletions
Large diffs are not rendered by default.

maven-eclipse-codestyle.xml

Lines changed: 380 additions & 290 deletions
Large diffs are not rendered by default.

pom.xml

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,13 +97,29 @@
9797
<artifactId>versions-maven-plugin</artifactId>
9898
<version>2.8.1</version>
9999
</plugin>
100+
<plugin>
101+
<groupId>org.apache.maven.plugins</groupId>
102+
<artifactId>maven-checkstyle-plugin</artifactId>
103+
<version>3.1.1</version>
104+
<dependencies>
105+
<dependency>
106+
<groupId>com.puppycrawl.tools</groupId>
107+
<artifactId>checkstyle</artifactId>
108+
<version>8.37</version>
109+
</dependency>
110+
</dependencies>
111+
<configuration>
112+
<configLocation>checkstyle.xml</configLocation>
113+
<violationSeverity>info</violationSeverity>
114+
<failOnViolation>false</failOnViolation>
115+
</configuration>
116+
</plugin>
100117
<plugin>
101118
<groupId>net.revelc.code</groupId>
102119
<artifactId>formatter-maven-plugin</artifactId>
103120
<version>0.5.2</version>
104121
<configuration>
105122
<configFile>maven-eclipse-codestyle.xml</configFile>
106-
<lineEnding>LF</lineEnding>
107123
</configuration>
108124
<executions>
109125
<execution>
@@ -198,6 +214,7 @@
198214
<plugin>
199215
<groupId>org.apache.maven.plugins</groupId>
200216
<artifactId>maven-compiler-plugin</artifactId>
217+
<version>3.8.1</version>
201218
<configuration>
202219
<source>8</source>
203220
<target>8</target>
@@ -209,7 +226,7 @@
209226
<properties>
210227
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
211228
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
212-
<!-- We redefine the signature generation process, whic is enabled by default,
229+
<!-- We redefine the signature generation process, which is enabled by default,
213230
but cannot be performed by typical users. Enable it using -Dskip.signature=false -->
214231
<skip.signature>true</skip.signature>
215232
</properties>

src/main/java/de/rub/nds/modifiablevariable/FileConfigurationException.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
* Licensed under Apache License 2.0
77
* http://www.apache.org/licenses/LICENSE-2.0
88
*/
9+
910
package de.rub.nds.modifiablevariable;
1011

1112
public class FileConfigurationException extends RuntimeException {

src/main/java/de/rub/nds/modifiablevariable/HoldsModifiableVariable.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
* Licensed under Apache License 2.0
77
* http://www.apache.org/licenses/LICENSE-2.0
88
*/
9+
910
package de.rub.nds.modifiablevariable;
1011

1112
import java.lang.annotation.ElementType;
@@ -14,8 +15,8 @@
1415
import java.lang.annotation.Target;
1516

1617
/**
17-
* Annotation interface for modifiable variables holders. A modifiable variable
18-
* holder is for example a TLS protocol message.
18+
* Annotation interface for modifiable variables holders. A modifiable variable holder is for example a TLS protocol
19+
* message.
1920
*
2021
*/
2122
@Target(ElementType.FIELD)

src/main/java/de/rub/nds/modifiablevariable/ModifiableVariable.java

Lines changed: 36 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
* Licensed under Apache License 2.0
77
* http://www.apache.org/licenses/LICENSE-2.0
88
*/
9+
910
package de.rub.nds.modifiablevariable;
1011

1112
import de.rub.nds.modifiablevariable.biginteger.BigIntegerAddModification;
@@ -39,7 +40,7 @@
3940
import de.rub.nds.modifiablevariable.singlebyte.ByteSubtractModification;
4041
import de.rub.nds.modifiablevariable.singlebyte.ByteXorModification;
4142
import de.rub.nds.modifiablevariable.string.StringExplicitValueModification;
42-
import de.rub.nds.modifiablevariable.util.ByteArrayAdapter;
43+
import de.rub.nds.modifiablevariable.util.UnformattedByteArrayAdapter;
4344
import java.io.Serializable;
4445
import java.util.Objects;
4546
import javax.xml.bind.annotation.XmlAccessType;
@@ -51,9 +52,8 @@
5152
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
5253

5354
/**
54-
* The base abstract class for modifiable variables, including the getValue
55-
* function.The class needs to be defined transient to allow propOrder
56-
* definition in subclasses, see:
55+
* The base abstract class for modifiable variables, including the getValue function.The class needs to be defined
56+
* transient to allow propOrder definition in subclasses, see:
5757
* http://blog.bdoughan.com/2011/06/ignoring-inheritance-with-xmltransient.html
5858
*
5959
*
@@ -62,43 +62,41 @@
6262
@XmlRootElement
6363
@XmlTransient
6464
@XmlAccessorType(XmlAccessType.FIELD)
65-
@XmlJavaTypeAdapter(value = ByteArrayAdapter.class, type = byte[].class)
6665
public abstract class ModifiableVariable<E> implements Serializable {
6766

6867
protected Boolean autoformat = null;
6968

70-
@XmlElements(value = {
71-
@XmlElement(type = BigIntegerXorModification.class, name = "BigIntegerXorModification"),
72-
@XmlElement(type = BigIntegerSubtractModification.class, name = "BigIntegerSubtractModification"),
73-
@XmlElement(type = BigIntegerShiftRightModification.class, name = "BigIntegerShiftRightModification"),
74-
@XmlElement(type = BigIntegerShiftLeftModification.class, name = "BigIntegerShiftLeftModification"),
75-
@XmlElement(type = BigIntegerExplicitValueModification.class, name = "BigIntegerExplicitValueModification"),
76-
@XmlElement(type = BigIntegerAddModification.class, name = "BigIntegerAddModification"),
77-
@XmlElement(type = BigIntegerInteractiveModification.class, name = "BigIntegerInteractiveModification"),
78-
@XmlElement(type = BooleanToggleModification.class, name = "BooleanToggleModification"),
79-
@XmlElement(type = BooleanExplicitValueModification.class, name = "BooleanExplicitValueModification"),
80-
@XmlElement(type = ByteArrayXorModification.class, name = "ByteArrayXorModification"),
81-
@XmlElement(type = ByteArrayShuffleModification.class, name = "ByteArrayShuffleModification"),
82-
@XmlElement(type = ByteArrayPayloadModification.class, name = "ByteArrayPayloadModification"),
83-
@XmlElement(type = ByteArrayInsertModification.class, name = "ByteArrayInsertModification"),
84-
@XmlElement(type = ByteArrayExplicitValueModification.class, name = "ByteArrayExplicitValueModification"),
85-
@XmlElement(type = ByteArrayDuplicateModification.class, name = "ByteArrayDuplicateModification"),
86-
@XmlElement(type = ByteArrayDeleteModification.class, name = "ByteArrayDeleteModification"),
87-
@XmlElement(type = IntegerXorModification.class, name = "IntegerXorModification"),
88-
@XmlElement(type = IntegerSubtractModification.class, name = "IntegerSubtractModification"),
89-
@XmlElement(type = IntegerShiftRightModification.class, name = "IntegerShiftRightModification"),
90-
@XmlElement(type = IntegerShiftLeftModification.class, name = "IntegerShiftLeftModification"),
91-
@XmlElement(type = IntegerExplicitValueModification.class, name = "IntegerExplicitValueModification"),
92-
@XmlElement(type = IntegerAddModification.class, name = "IntegerAddModification"),
93-
@XmlElement(type = LongXorModification.class, name = "LongXorModification"),
94-
@XmlElement(type = LongSubtractModification.class, name = "LongSubtractModification"),
95-
@XmlElement(type = LongExplicitValueModification.class, name = "LongExplicitValueModification"),
96-
@XmlElement(type = LongAddModification.class, name = "LongAddModification"),
97-
@XmlElement(type = ByteXorModification.class, name = "ByteXorModification"),
98-
@XmlElement(type = ByteSubtractModification.class, name = "ByteSubtractModification"),
99-
@XmlElement(type = ByteAddModification.class, name = "ByteAddModification"),
100-
@XmlElement(type = ByteExplicitValueModification.class, name = "ByteExplicitValueModification"),
101-
@XmlElement(type = StringExplicitValueModification.class, name = "StringExplicitValueModification") })
69+
@XmlElements(value = { @XmlElement(type = BigIntegerXorModification.class, name = "BigIntegerXorModification"),
70+
@XmlElement(type = BigIntegerSubtractModification.class, name = "BigIntegerSubtractModification"),
71+
@XmlElement(type = BigIntegerShiftRightModification.class, name = "BigIntegerShiftRightModification"),
72+
@XmlElement(type = BigIntegerShiftLeftModification.class, name = "BigIntegerShiftLeftModification"),
73+
@XmlElement(type = BigIntegerExplicitValueModification.class, name = "BigIntegerExplicitValueModification"),
74+
@XmlElement(type = BigIntegerAddModification.class, name = "BigIntegerAddModification"),
75+
@XmlElement(type = BigIntegerInteractiveModification.class, name = "BigIntegerInteractiveModification"),
76+
@XmlElement(type = BooleanToggleModification.class, name = "BooleanToggleModification"),
77+
@XmlElement(type = BooleanExplicitValueModification.class, name = "BooleanExplicitValueModification"),
78+
@XmlElement(type = ByteArrayXorModification.class, name = "ByteArrayXorModification"),
79+
@XmlElement(type = ByteArrayShuffleModification.class, name = "ByteArrayShuffleModification"),
80+
@XmlElement(type = ByteArrayPayloadModification.class, name = "ByteArrayPayloadModification"),
81+
@XmlElement(type = ByteArrayInsertModification.class, name = "ByteArrayInsertModification"),
82+
@XmlElement(type = ByteArrayExplicitValueModification.class, name = "ByteArrayExplicitValueModification"),
83+
@XmlElement(type = ByteArrayDuplicateModification.class, name = "ByteArrayDuplicateModification"),
84+
@XmlElement(type = ByteArrayDeleteModification.class, name = "ByteArrayDeleteModification"),
85+
@XmlElement(type = IntegerXorModification.class, name = "IntegerXorModification"),
86+
@XmlElement(type = IntegerSubtractModification.class, name = "IntegerSubtractModification"),
87+
@XmlElement(type = IntegerShiftRightModification.class, name = "IntegerShiftRightModification"),
88+
@XmlElement(type = IntegerShiftLeftModification.class, name = "IntegerShiftLeftModification"),
89+
@XmlElement(type = IntegerExplicitValueModification.class, name = "IntegerExplicitValueModification"),
90+
@XmlElement(type = IntegerAddModification.class, name = "IntegerAddModification"),
91+
@XmlElement(type = LongXorModification.class, name = "LongXorModification"),
92+
@XmlElement(type = LongSubtractModification.class, name = "LongSubtractModification"),
93+
@XmlElement(type = LongExplicitValueModification.class, name = "LongExplicitValueModification"),
94+
@XmlElement(type = LongAddModification.class, name = "LongAddModification"),
95+
@XmlElement(type = ByteXorModification.class, name = "ByteXorModification"),
96+
@XmlElement(type = ByteSubtractModification.class, name = "ByteSubtractModification"),
97+
@XmlElement(type = ByteAddModification.class, name = "ByteAddModification"),
98+
@XmlElement(type = ByteExplicitValueModification.class, name = "ByteExplicitValueModification"),
99+
@XmlElement(type = StringExplicitValueModification.class, name = "StringExplicitValueModification") })
102100
private VariableModification<E> modification = null;
103101

104102
private Boolean createRandomModification;
@@ -121,6 +119,7 @@ public void setModification(VariableModification<E> modification) {
121119
this.modification = modification;
122120
}
123121

122+
@XmlTransient
124123
public VariableModification<E> getModification() {
125124
return modification;
126125
}

src/main/java/de/rub/nds/modifiablevariable/ModifiableVariableFactory.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
* Licensed under Apache License 2.0
77
* http://www.apache.org/licenses/LICENSE-2.0
88
*/
9+
910
package de.rub.nds.modifiablevariable;
1011

1112
import de.rub.nds.modifiablevariable.biginteger.ModifiableBigInteger;

src/main/java/de/rub/nds/modifiablevariable/ModifiableVariableProperty.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
* Licensed under Apache License 2.0
77
* http://www.apache.org/licenses/LICENSE-2.0
88
*/
9+
910
package de.rub.nds.modifiablevariable;
1011

1112
import java.lang.annotation.ElementType;

0 commit comments

Comments
 (0)