Skip to content

Commit cc9c17d

Browse files
committed
formatting + license headers
1 parent 2cf73cf commit cc9c17d

File tree

7 files changed

+39
-53
lines changed

7 files changed

+39
-53
lines changed

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

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
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
*/
10-
119
package de.rub.nds.tlsattacker.core.constants;
1210

1311
import de.rub.nds.modifiablevariable.ModifiableVariableFactory;

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 & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
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
*/
10-
119
package de.rub.nds.tlsattacker.core.protocol.handler;
1210

1311
import de.rub.nds.modifiablevariable.util.ArrayConverter;
@@ -148,52 +146,50 @@ private void setRecordCipher(Tls13KeySetType keySetType) {
148146
keySet.setClientWriteIv(HKDFunction.expandLabel(hkdfAlgortihm,
149147
tlsContext.getClientApplicationTrafficSecret(), HKDFunction.IV, new byte[0], AEAD_IV_LENGTH));
150148

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

156154
keySet.setServerWriteIv(HKDFunction.expandLabel(hkdfAlgortihm,
157155
tlsContext.getServerApplicationTrafficSecret(), HKDFunction.IV, new byte[0], AEAD_IV_LENGTH));
158156

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

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

169166
tlsContext.setWriteSequenceNumber(0);
170167
tlsContext.getRecordLayer().updateEncryptionCipher();
171168

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

175172
if (tlsContext.getChooser().getTalkingConnectionEnd() == ConnectionEndType.SERVER) {
176173

177174
keySet.setServerWriteIv(HKDFunction.expandLabel(hkdfAlgortihm,
178175
tlsContext.getServerApplicationTrafficSecret(), HKDFunction.IV, new byte[0], AEAD_IV_LENGTH));
179176

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

184181
} else {
185182

186183
keySet.setClientWriteIv(HKDFunction.expandLabel(hkdfAlgortihm,
187184
tlsContext.getClientApplicationTrafficSecret(), HKDFunction.IV, new byte[0], AEAD_IV_LENGTH));
188185

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

194-
RecordCipher recordCipherClient =
195-
RecordCipherFactory.getRecordCipher(tlsContext, keySet, tlsContext.getChooser()
196-
.getSelectedCipherSuite());
191+
RecordCipher recordCipherClient = RecordCipherFactory.getRecordCipher(tlsContext, keySet,
192+
tlsContext.getChooser().getSelectedCipherSuite());
197193
tlsContext.getRecordLayer().setRecordCipher(recordCipherClient);
198194

199195
tlsContext.setReadSequenceNumber(0);

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

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
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
*/
10-
119
package de.rub.nds.tlsattacker.core.protocol.message;
1210

1311
import de.rub.nds.tlsattacker.core.config.Config;

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

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
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
*/
10-
119
package de.rub.nds.tlsattacker.core.protocol.parser;
1210

1311
import org.apache.logging.log4j.LogManager;

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

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
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
*/
10-
119
package de.rub.nds.tlsattacker.core.protocol.preparator;
1210

1311
import de.rub.nds.tlsattacker.core.constants.KeyUpdateRequest;

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

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
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
*/
10-
119
package de.rub.nds.tlsattacker.core.protocol.serializer;
1210

1311
import de.rub.nds.tlsattacker.core.constants.ProtocolVersion;
@@ -26,9 +24,9 @@ public class KeyUpdateSerializer extends HandshakeMessageSerializer<KeyUpdateMes
2624
* Constructor for the FinishedMessageSerializer
2725
*
2826
* @param message
29-
* Message that should be serialized
27+
* Message that should be serialized
3028
* @param version
31-
* Version of the Protocol
29+
* Version of the Protocol
3230
*/
3331

3432
public KeyUpdateSerializer(KeyUpdateMessage message, ProtocolVersion version) {

0 commit comments

Comments
 (0)