Skip to content

Commit 7a21a38

Browse files
committed
Fixed compiler flaws during merge
1 parent 9e88f9c commit 7a21a38

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

TLS-Core/src/main/java/de/rub/nds/tlsattacker/core/protocol/preparator/CertificateMessagePreparator.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
import de.rub.nds.tlsattacker.core.certificate.CertificateKeyPair;
1414
import de.rub.nds.tlsattacker.core.constants.CertificateType;
1515
import de.rub.nds.tlsattacker.core.constants.ECPointFormat;
16+
import de.rub.nds.tlsattacker.core.constants.NamedGroup;
1617
import de.rub.nds.tlsattacker.core.crypto.ec.Point;
1718
import de.rub.nds.tlsattacker.core.crypto.ec.PointFormatter;
1819
import de.rub.nds.tlsattacker.core.exceptions.PreparationException;
@@ -82,10 +83,11 @@ private void prepareCertificateListBytes(CertificateMessage msg) {
8283
} else {
8384
ecPointToEncode = chooser.getServerEcPublicKey();
8485
}
86+
//TODO this needs to be adjusted for different curves
8587
asn1OutputStream.writeObject(new DLSequence(new ASN1Encodable[] {
8688
new DLSequence(new ASN1Encodable[] { new ASN1ObjectIdentifier("1.2.840.10045.2.1"),
8789
new ASN1ObjectIdentifier("1.2.840.10045.3.1.7") }),
88-
new DERBitString(PointFormatter.formatToByteArray(ecPointToEncode,
90+
new DERBitString(PointFormatter.formatToByteArray(NamedGroup.SECP256R1, ecPointToEncode,
8991
ECPointFormat.UNCOMPRESSED)) }));
9092
asn1OutputStream.flush();
9193
asn1OutputStream.close();

TLS-Core/src/main/java/de/rub/nds/tlsattacker/core/state/TlsContext.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1247,6 +1247,10 @@ public int getDtlsWriteEpoch() {
12471247
return dtlsWriteEpoch;
12481248
}
12491249

1250+
public void setDtlsWriteEpoch(int dtlsWriteEpoch) {
1251+
this.dtlsWriteEpoch = dtlsWriteEpoch;
1252+
}
1253+
12501254
public int getDtlsReceiveEpoch() {
12511255
return dtlsReadEpoch;
12521256
}

TLS-Core/src/main/java/de/rub/nds/tlsattacker/core/workflow/action/ResetConnectionAction.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,11 @@ public void execute(State state) throws WorkflowExecutionException {
5353
tlsContext.setWriteSequenceNumber(0);
5454
LOGGER.info("Resetting DTLS numbers and cookie");
5555
tlsContext.setDtlsCookie(new byte[] {});
56-
tlsContext.setDtlsNextReceiveSequenceNumber(0);
57-
tlsContext.setDtlsNextSendSequenceNumber(0);
58-
tlsContext.setDtlsSendEpoch(0);
59-
tlsContext.setDtlsNextReceiveEpoch(0);
56+
tlsContext.setDtlsReadHandshakeMessageSequence(0);
57+
tlsContext.setDtlsWriteHandshakeMessageSequence(0);
58+
tlsContext.setDtlsReceiveEpoch(0);
59+
tlsContext.setDtlsWriteEpoch(0);
60+
6061
LOGGER.info("Reopening Connection");
6162
try {
6263
tlsContext.getTransportHandler().initialize();

0 commit comments

Comments
 (0)