@@ -150,7 +150,11 @@ public static Collection<Object[]> generateData() {
150
150
ArrayConverter .hexStringToByteArray (
151
151
"0200004a03030fa96863574fc48715a6aa266f5f954a2a3fbcaa6a359b663c21dde3c71e6f2400c030000022ff0100010000000000000b0004030001020023000000100005000302683200170000" ));
152
152
Record serverHelloRecord = parseRecord (ProtocolMessageType .HANDSHAKE , ProtocolVersion .TLS12 .getValue (), 78 ,
153
- ArrayConverter .hexStringToByteArray ("160303004e0200004a03030fa96863574fc48715a6aa266f5f954a2a3fbcaa6a359b663c21dde3c71e6f2400c030000022ff0100010000000000000b0004030001020023000000100005000302683200170000" ));
153
+ ArrayConverter .hexStringToByteArray (
154
+ "160303004e0200004a03030fa96863574fc48715a6aa266f5f954a2a3fbcaa6a359b663c21dde3c71e6f2400c030000022ff0100010000000000000b0004030001020023000000100005000302683200170000" ));
155
+ Record serverHelloRecordDiffContent = parseRecord (ProtocolMessageType .HANDSHAKE , ProtocolVersion .TLS12 .getValue (), 78 ,
156
+ ArrayConverter .hexStringToByteArray (
157
+ "00" ));
154
158
155
159
HandshakeMessage certificateMsg =
156
160
parseMessage (HandshakeMessageType .CERTIFICATE .getValue (), 4050 , null , ArrayConverter .hexStringToByteArray (
@@ -231,15 +235,15 @@ public static Collection<Object[]> generateData() {
231
235
ModifiableByteArray serverHelloRandomDiffContent = new ModifiableByteArray ();
232
236
serverHelloRandomDiffContent .setOriginalValue (ServerHelloMessage .getHelloRetryRequestRandom ());
233
237
serverHelloMsgDiffContent .setRandom (serverHelloRandomDiffContent );
234
-
238
+
235
239
ModifiableByteArray serverHelloRandom = new ModifiableByteArray ();
236
- serverHelloRandom .setOriginalValue (ArrayConverter .hexStringToByteArray ("0fa96863574fc48715a6aa266f5f954a2a3fbcaa6a359b663c21dde3c71e6f24" ));
240
+ serverHelloRandom .setOriginalValue (
241
+ ArrayConverter .hexStringToByteArray ("0fa96863574fc48715a6aa266f5f954a2a3fbcaa6a359b663c21dde3c71e6f24" ));
237
242
serverHelloMsg .setRandom (serverHelloRandom );
238
-
243
+
239
244
List <ProtocolMessage > msgListTestMsgContent = new LinkedList <>();
240
245
EqualityError expectedResultMsgContent ;
241
246
242
-
243
247
msgListTestMsgContent .add (serverHelloMsgDiffContent );
244
248
msgListTestMsgContent .add (certificateMsg );
245
249
msgListTestMsgContent .add (serverKeyExchangeMsg );
@@ -344,17 +348,20 @@ public static Collection<Object[]> generateData() {
344
348
msgListTestMsgClassWithPriority .add (clientKeyExchangeMsg );
345
349
expectedResultMsgClassWithPriority = EqualityError .MESSAGE_CLASS ;
346
350
347
- /*
348
- * TODO-------------------------------------------------------------------------------- // Data for test with
349
- * expected EqualityError: // EqualityError.MESSAGE_CONTENT // with PriorityCheck regarding
350
- * EqualityError.RecordContent List<ProtocolMessage> msgListTestMsgContentWithPriority = new LinkedList<>();
351
- * EqualityError expectedResultMsgContentWithPriority;
352
- * msgListTestMsgContentWithPriority.add(clientHelloMsgDiffContent);
353
- * msgListTestMsgContentWithPriority.add(clientKeyExchangeMsg); expectedResultMsgContentWithPriority =
354
- * EqualityError.MESSAGE_CONTENT;
355
- * ------------------------------------------------------------------------------------
356
- */
357
-
351
+ //Data for test with expected EqualityError:
352
+ //EqualityError.MessageContent
353
+ // with PriorityCheck regarding EqualityError.RecordContent
354
+ EqualityError expectedResultMsgContentWithPriority ;
355
+ expectedResultMsgContentWithPriority = EqualityError .MESSAGE_CONTENT ;
356
+
357
+ List <AbstractRecord > recordListTestServerWithContentError = new LinkedList <>();
358
+
359
+ recordListTestServerWithContentError .add (serverHelloRecordDiffContent );
360
+ recordListTestServerWithContentError .add (certificateRecord );
361
+ recordListTestServerWithContentError .add (serverKeyExchangeRecord );
362
+ recordListTestServerWithContentError .add (serverHelloDoneRecord );
363
+
364
+
358
365
// Data for test with expected EqualityError:
359
366
// EqualityError.MESSAGE_COUNT
360
367
// with PriorityCheck regarding EqualityError.RecordContent
@@ -388,7 +395,8 @@ public static Collection<Object[]> generateData() {
388
395
389
396
// generate clientHelloRecord with different ContentType & different Content
390
397
Record clientHelloRecordDiffContentTypeWithPriority = parseRecord (ProtocolMessageType .APPLICATION_DATA ,
391
- ProtocolVersion .TLS10 .getValue (), 512 , ArrayConverter .hexStringToByteArray ("1603010200010001fc03036ced07c5f0707d08d6c98ab375b523236492233a56eaec0d8feb2565ba7c337720c6b3ba7f6fdf5c643a038d40b56a8db014a6c90359432f3ccbb6db40fa76a9200022130113031302c02bc02fcca9cca8c02cc030c00ac009c013c014009c009d002f0035010001910000001a00180000157777772e7363686e6569657266616374732e636f6d00170000ff01000100000a000e000c001d00170018001901000101000b00020100002300000010000e000c02683208687474702f312e310005000501000000000022000a000804030503060302030033006b0069001d00204ca75275f38541b0628d64892200b8b184c7b7fd836b4c8c9b3124e753d7577a00170041040c6eae5febeb82f27d09c5cb7155682da96bf0863aeaff721f556885790a3819449702afd594b8c088aa1ea4effaf210867a0c0e430ad460ffe16847b6d1cbc4002b00050403040303000d0018001604030503060308040805080604010501060102030201002d00020101001c0002400100150081000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" ));
398
+ ProtocolVersion .TLS10 .getValue (), 512 , ArrayConverter .hexStringToByteArray (
399
+ "1603010200010001fc03036ced07c5f0707d08d6c98ab375b523236492233a56eaec0d8feb2565ba7c337720c6b3ba7f6fdf5c643a038d40b56a8db014a6c90359432f3ccbb6db40fa76a9200022130113031302c02bc02fcca9cca8c02cc030c00ac009c013c014009c009d002f0035010001910000001a00180000157777772e7363686e6569657266616374732e636f6d00170000ff01000100000a000e000c001d00170018001901000101000b00020100002300000010000e000c02683208687474702f312e310005000501000000000022000a000804030503060302030033006b0069001d00204ca75275f38541b0628d64892200b8b184c7b7fd836b4c8c9b3124e753d7577a00170041040c6eae5febeb82f27d09c5cb7155682da96bf0863aeaff721f556885790a3819449702afd594b8c088aa1ea4effaf210867a0c0e430ad460ffe16847b6d1cbc4002b00050403040303000d0018001604030503060308040805080604010501060102030201002d00020101001c0002400100150081000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" ));
392
400
393
401
List <AbstractRecord > recordListTestRecordContentTypeWithPriority = new LinkedList <>();
394
402
EqualityError expectedResultRecordContentTypeWithPriority ;
@@ -416,7 +424,8 @@ public static Collection<Object[]> generateData() {
416
424
417
425
// generate ClientHelloRecord with different Version & different Content
418
426
Record clientHelloRecordDiffVersionWithPriority = parseRecord (ProtocolMessageType .HANDSHAKE ,
419
- ProtocolVersion .TLS12 .getValue (), 512 , ArrayConverter .hexStringToByteArray ("1603010200010001fc03036ced07c5f0707d08d6c98ab375b523236492233a56eaec0d8feb2565ba7c337720c6b3ba7f6fdf5c643a038d40b56a8db014a6c90359432f3ccbb6db40fa76a9200022130113031302c02bc02fcca9cca8c02cc030c00ac009c013c014009c009d002f0035010001910000001a00180000157777772e7363686e6569657266616374732e636f6d00170000ff01000100000a000e000c001d00170018001901000101000b00020100002300000010000e000c02683208687474702f312e310005000501000000000022000a000804030503060302030033006b0069001d00204ca75275f38541b0628d64892200b8b184c7b7fd836b4c8c9b3124e753d7577a00170041040c6eae5febeb82f27d09c5cb7155682da96bf0863aeaff721f556885790a3819449702afd594b8c088aa1ea4effaf210867a0c0e430ad460ffe16847b6d1cbc4002b00050403040303000d0018001604030503060308040805080604010501060102030201002d00020101001c0002400100150081000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" ));
427
+ ProtocolVersion .TLS12 .getValue (), 512 , ArrayConverter .hexStringToByteArray (
428
+ "1603010200010001fc03036ced07c5f0707d08d6c98ab375b523236492233a56eaec0d8feb2565ba7c337720c6b3ba7f6fdf5c643a038d40b56a8db014a6c90359432f3ccbb6db40fa76a9200022130113031302c02bc02fcca9cca8c02cc030c00ac009c013c014009c009d002f0035010001910000001a00180000157777772e7363686e6569657266616374732e636f6d00170000ff01000100000a000e000c001d00170018001901000101000b00020100002300000010000e000c02683208687474702f312e310005000501000000000022000a000804030503060302030033006b0069001d00204ca75275f38541b0628d64892200b8b184c7b7fd836b4c8c9b3124e753d7577a00170041040c6eae5febeb82f27d09c5cb7155682da96bf0863aeaff721f556885790a3819449702afd594b8c088aa1ea4effaf210867a0c0e430ad460ffe16847b6d1cbc4002b00050403040303000d0018001604030503060308040805080604010501060102030201002d00020101001c0002400100150081000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" ));
420
429
421
430
List <AbstractRecord > recordListTestRecordVersionWithPriority = new LinkedList <>();
422
431
EqualityError expectedResultRecordVersionWithPriority ;
@@ -460,8 +469,8 @@ public static Collection<Object[]> generateData() {
460
469
// Tests with PriorityCheck regarding EqualityError.Record_Content
461
470
{ msgListTestClient , recordListTestClient , stateTestClient , msgListTestMsgClassWithPriority ,
462
471
recordListTestClientWithContentError , stateTestClient , expectedResultMsgClassWithPriority },
463
- // { msgListTestClient, recordListTestClient, stateTestClient, msgListTestMsgContentWithPriority ,
464
- // recordListTestClientWithContentError, stateTestClient , expectedResultMsgContentWithPriority },
472
+ { msgListTestServer , recordListTestServer , stateTestServer , msgListTestMsgContent , recordListTestServerWithContentError ,
473
+ stateTestServer , expectedResultMsgContentWithPriority },
465
474
{ msgListTestClient , recordListTestClient , stateTestClient , msgListTestMsgCountWithPriority ,
466
475
recordListTestClientWithContentError , stateTestClient , expectedResultMsgCountWithPriority },
467
476
{ msgListTestClient , recordListTestClient , stateTestClient , msgListTestClient ,
0 commit comments