Skip to content

Commit aca233f

Browse files
author
jan
committed
Modified Constants for SupplementalDataEntryParser according to RFC 4680
1 parent e43e041 commit aca233f

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

TLS-Core/src/main/java/de/rub/nds/tlsattacker/core/constants/ExtensionByteLength.java

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -236,16 +236,6 @@ public class ExtensionByteLength {
236236

237237
public static final int RENEGOTIATION_INFO = 1;
238238

239-
/**
240-
* Length of the Supplemental Data Entry Type
241-
*/
242-
public static final int SUPPLEMENTAL_DATA_ENTRY_TYPE_LENGTH = 2;
243-
244-
/**
245-
* Length of the Supplemental Data Entry
246-
*/
247-
public static final int SUPPLEMENTAL_DATA_ENTRY_LENGTH = 2;
248-
249239
private ExtensionByteLength() {
250240
}
251241
}

TLS-Core/src/main/java/de/rub/nds/tlsattacker/core/constants/HandshakeByteLength.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,16 @@ public class HandshakeByteLength {
220220
* Length of the Supplemental Data Field
221221
*/
222222
public static final int SUPPLEMENTAL_DATA_LENGTH = 3;
223+
224+
/**
225+
* Length of the Supplemental Data Entry Type
226+
*/
227+
public static final int SUPPLEMENTAL_DATA_ENTRY_TYPE_LENGTH = 2;
228+
229+
/**
230+
* Length of the Supplemental Data Entry
231+
*/
232+
public static final int SUPPLEMENTAL_DATA_ENTRY_LENGTH = 2;
223233

224234
private HandshakeByteLength() {
225235
}

TLS-Core/src/main/java/de/rub/nds/tlsattacker/core/protocol/parser/suppData/SupplementalDataEntryParser.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
package de.rub.nds.tlsattacker.core.protocol.parser.suppData;
1010

1111
import de.rub.nds.modifiablevariable.util.ArrayConverter;
12-
import de.rub.nds.tlsattacker.core.constants.ExtensionByteLength;
12+
import de.rub.nds.tlsattacker.core.constants.HandshakeByteLength;
1313
import de.rub.nds.tlsattacker.core.protocol.message.suppData.SupplementalDataEntry;
1414
import de.rub.nds.tlsattacker.core.protocol.parser.Parser;
1515

@@ -29,12 +29,12 @@ public SupplementalDataEntry parse() {
2929
}
3030

3131
private void parseSupplementalDataEntryType(SupplementalDataEntry entry) {
32-
entry.setSupplementalDataEntryType(parseIntField(ExtensionByteLength.SUPPLEMENTAL_DATA_ENTRY_TYPE_LENGTH));
32+
entry.setSupplementalDataEntryType(parseIntField(HandshakeByteLength.SUPPLEMENTAL_DATA_ENTRY_TYPE_LENGTH));
3333
LOGGER.debug("SupplementalDataEntryType: " + entry.getSupplementalDataEntryType().getValue());
3434
}
3535

3636
private void parseSupplementalDataEntryLength(SupplementalDataEntry entry) {
37-
entry.setSupplementalDataEntryLength(parseIntField(ExtensionByteLength.SUPPLEMENTAL_DATA_ENTRY_LENGTH));
37+
entry.setSupplementalDataEntryLength(parseIntField(HandshakeByteLength.SUPPLEMENTAL_DATA_ENTRY_LENGTH));
3838
LOGGER.debug("SupplementalDataEntryLength: " + entry.getSupplementalDataEntryLength().getValue());
3939
}
4040

0 commit comments

Comments
 (0)