Skip to content

Commit f7a37ae

Browse files
committed
Formatting
1 parent 600332c commit f7a37ae

File tree

7 files changed

+39
-47
lines changed

7 files changed

+39
-47
lines changed

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
/**
22
* TLS-Attacker - A Modular Penetration Testing Framework for TLS
33
*
4-
* Copyright 2014-2020 Ruhr University Bochum, Paderborn University,
5-
* and Hackmanit GmbH
4+
* Copyright 2014-2021 Ruhr University Bochum, Paderborn University, Hackmanit GmbH
65
*
7-
* Licensed under Apache License 2.0
8-
* http://www.apache.org/licenses/LICENSE-2.0
6+
* Licensed under Apache License, Version 2.0
7+
* http://www.apache.org/licenses/LICENSE-2.0.txt
98
*/
109

1110
package de.rub.nds.tlsattacker.core.constants;

TLS-Core/src/main/java/de/rub/nds/tlsattacker/core/protocol/handler/FinishedHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public void adjustTLSContext(FinishedMessage message) {
7272

7373
if (tlsContext.getTalkingConnectionEndType() == ConnectionEndType.CLIENT) {
7474
NewSessionTicketHandler ticketHandler = (NewSessionTicketHandler) HandlerFactory
75-
.getHandshakeHandler(tlsContext, HandshakeMessageType.NEW_SESSION_TICKET);
75+
.getHandshakeHandler(tlsContext, HandshakeMessageType.NEW_SESSION_TICKET);
7676
if (tlsContext.getPskSets() != null) {
7777
for (PskSet pskSet : tlsContext.getPskSets()) {
7878
// if psk was derived earliers, skip derivation (especially for state reusage helpful)

TLS-Core/src/main/java/de/rub/nds/tlsattacker/core/protocol/handler/KeyUpdateHandler.java

Lines changed: 21 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
/**
22
* TLS-Attacker - A Modular Penetration Testing Framework for TLS
33
*
4-
* Copyright 2014-2020 Ruhr University Bochum, Paderborn University,
5-
* and Hackmanit GmbH
4+
* Copyright 2014-2021 Ruhr University Bochum, Paderborn University, Hackmanit GmbH
65
*
7-
* Licensed under Apache License 2.0
8-
* http://www.apache.org/licenses/LICENSE-2.0
6+
* Licensed under Apache License, Version 2.0
7+
* http://www.apache.org/licenses/LICENSE-2.0.txt
98
*/
109

1110
package de.rub.nds.tlsattacker.core.protocol.handler;
@@ -148,52 +147,50 @@ private void setRecordCipher(Tls13KeySetType keySetType) {
148147
keySet.setClientWriteIv(HKDFunction.expandLabel(hkdfAlgortihm,
149148
tlsContext.getClientApplicationTrafficSecret(), HKDFunction.IV, new byte[0], AEAD_IV_LENGTH));
150149

151-
keySet.setClientWriteKey(HKDFunction.expandLabel(hkdfAlgortihm, tlsContext
152-
.getClientApplicationTrafficSecret(), HKDFunction.KEY, new byte[0], AlgorithmResolver
153-
.getCipher(tlsContext.getChooser().getSelectedCipherSuite()).getKeySize()));
150+
keySet.setClientWriteKey(HKDFunction.expandLabel(hkdfAlgortihm,
151+
tlsContext.getClientApplicationTrafficSecret(), HKDFunction.KEY, new byte[0],
152+
AlgorithmResolver.getCipher(tlsContext.getChooser().getSelectedCipherSuite()).getKeySize()));
154153
} else {
155154

156155
keySet.setServerWriteIv(HKDFunction.expandLabel(hkdfAlgortihm,
157156
tlsContext.getServerApplicationTrafficSecret(), HKDFunction.IV, new byte[0], AEAD_IV_LENGTH));
158157

159-
keySet.setServerWriteKey(HKDFunction.expandLabel(hkdfAlgortihm, tlsContext
160-
.getServerApplicationTrafficSecret(), HKDFunction.KEY, new byte[0], AlgorithmResolver
161-
.getCipher(tlsContext.getChooser().getSelectedCipherSuite()).getKeySize()));
158+
keySet.setServerWriteKey(HKDFunction.expandLabel(hkdfAlgortihm,
159+
tlsContext.getServerApplicationTrafficSecret(), HKDFunction.KEY, new byte[0],
160+
AlgorithmResolver.getCipher(tlsContext.getChooser().getSelectedCipherSuite()).getKeySize()));
162161
}
163162

164-
RecordCipher recordCipherClient =
165-
RecordCipherFactory.getRecordCipher(tlsContext, keySet, tlsContext.getChooser()
166-
.getSelectedCipherSuite());
163+
RecordCipher recordCipherClient = RecordCipherFactory.getRecordCipher(tlsContext, keySet,
164+
tlsContext.getChooser().getSelectedCipherSuite());
167165
tlsContext.getRecordLayer().setRecordCipher(recordCipherClient);
168166

169167
tlsContext.setWriteSequenceNumber(0);
170168
tlsContext.getRecordLayer().updateEncryptionCipher();
171169

172-
} else if (tlsContext.getChooser().getTalkingConnectionEnd() != tlsContext.getChooser()
173-
.getConnectionEndType()) {
170+
} else if (tlsContext.getChooser().getTalkingConnectionEnd()
171+
!= tlsContext.getChooser().getConnectionEndType()) {
174172

175173
if (tlsContext.getChooser().getTalkingConnectionEnd() == ConnectionEndType.SERVER) {
176174

177175
keySet.setServerWriteIv(HKDFunction.expandLabel(hkdfAlgortihm,
178176
tlsContext.getServerApplicationTrafficSecret(), HKDFunction.IV, new byte[0], AEAD_IV_LENGTH));
179177

180-
keySet.setServerWriteKey(HKDFunction.expandLabel(hkdfAlgortihm, tlsContext
181-
.getServerApplicationTrafficSecret(), HKDFunction.KEY, new byte[0], AlgorithmResolver
182-
.getCipher(tlsContext.getChooser().getSelectedCipherSuite()).getKeySize()));
178+
keySet.setServerWriteKey(HKDFunction.expandLabel(hkdfAlgortihm,
179+
tlsContext.getServerApplicationTrafficSecret(), HKDFunction.KEY, new byte[0],
180+
AlgorithmResolver.getCipher(tlsContext.getChooser().getSelectedCipherSuite()).getKeySize()));
183181

184182
} else {
185183

186184
keySet.setClientWriteIv(HKDFunction.expandLabel(hkdfAlgortihm,
187185
tlsContext.getClientApplicationTrafficSecret(), HKDFunction.IV, new byte[0], AEAD_IV_LENGTH));
188186

189-
keySet.setClientWriteKey(HKDFunction.expandLabel(hkdfAlgortihm, tlsContext
190-
.getClientApplicationTrafficSecret(), HKDFunction.KEY, new byte[0], AlgorithmResolver
191-
.getCipher(tlsContext.getChooser().getSelectedCipherSuite()).getKeySize()));
187+
keySet.setClientWriteKey(HKDFunction.expandLabel(hkdfAlgortihm,
188+
tlsContext.getClientApplicationTrafficSecret(), HKDFunction.KEY, new byte[0],
189+
AlgorithmResolver.getCipher(tlsContext.getChooser().getSelectedCipherSuite()).getKeySize()));
192190
}
193191

194-
RecordCipher recordCipherClient =
195-
RecordCipherFactory.getRecordCipher(tlsContext, keySet, tlsContext.getChooser()
196-
.getSelectedCipherSuite());
192+
RecordCipher recordCipherClient = RecordCipherFactory.getRecordCipher(tlsContext, keySet,
193+
tlsContext.getChooser().getSelectedCipherSuite());
197194
tlsContext.getRecordLayer().setRecordCipher(recordCipherClient);
198195

199196
tlsContext.setReadSequenceNumber(0);

TLS-Core/src/main/java/de/rub/nds/tlsattacker/core/protocol/message/KeyUpdateMessage.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
/**
22
* TLS-Attacker - A Modular Penetration Testing Framework for TLS
33
*
4-
* Copyright 2014-2020 Ruhr University Bochum, Paderborn University,
5-
* and Hackmanit GmbH
4+
* Copyright 2014-2021 Ruhr University Bochum, Paderborn University, Hackmanit GmbH
65
*
7-
* Licensed under Apache License 2.0
8-
* http://www.apache.org/licenses/LICENSE-2.0
6+
* Licensed under Apache License, Version 2.0
7+
* http://www.apache.org/licenses/LICENSE-2.0.txt
98
*/
109

1110
package de.rub.nds.tlsattacker.core.protocol.message;

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
/**
22
* TLS-Attacker - A Modular Penetration Testing Framework for TLS
33
*
4-
* Copyright 2014-2020 Ruhr University Bochum, Paderborn University,
5-
* and Hackmanit GmbH
4+
* Copyright 2014-2021 Ruhr University Bochum, Paderborn University, Hackmanit GmbH
65
*
7-
* Licensed under Apache License 2.0
8-
* http://www.apache.org/licenses/LICENSE-2.0
6+
* Licensed under Apache License, Version 2.0
7+
* http://www.apache.org/licenses/LICENSE-2.0.txt
98
*/
109

1110
package de.rub.nds.tlsattacker.core.protocol.parser;

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
/**
22
* TLS-Attacker - A Modular Penetration Testing Framework for TLS
33
*
4-
* Copyright 2014-2020 Ruhr University Bochum, Paderborn University,
5-
* and Hackmanit GmbH
4+
* Copyright 2014-2021 Ruhr University Bochum, Paderborn University, Hackmanit GmbH
65
*
7-
* Licensed under Apache License 2.0
8-
* http://www.apache.org/licenses/LICENSE-2.0
6+
* Licensed under Apache License, Version 2.0
7+
* http://www.apache.org/licenses/LICENSE-2.0.txt
98
*/
109

1110
package de.rub.nds.tlsattacker.core.protocol.preparator;

TLS-Core/src/main/java/de/rub/nds/tlsattacker/core/protocol/serializer/KeyUpdateSerializer.java

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
/**
22
* TLS-Attacker - A Modular Penetration Testing Framework for TLS
33
*
4-
* Copyright 2014-2020 Ruhr University Bochum, Paderborn University,
5-
* and Hackmanit GmbH
4+
* Copyright 2014-2021 Ruhr University Bochum, Paderborn University, Hackmanit GmbH
65
*
7-
* Licensed under Apache License 2.0
8-
* http://www.apache.org/licenses/LICENSE-2.0
6+
* Licensed under Apache License, Version 2.0
7+
* http://www.apache.org/licenses/LICENSE-2.0.txt
98
*/
109

1110
package de.rub.nds.tlsattacker.core.protocol.serializer;
@@ -26,9 +25,9 @@ public class KeyUpdateSerializer extends HandshakeMessageSerializer<KeyUpdateMes
2625
* Constructor for the FinishedMessageSerializer
2726
*
2827
* @param message
29-
* Message that should be serialized
28+
* Message that should be serialized
3029
* @param version
31-
* Version of the Protocol
30+
* Version of the Protocol
3231
*/
3332

3433
public KeyUpdateSerializer(KeyUpdateMessage message, ProtocolVersion version) {

0 commit comments

Comments
 (0)