@@ -671,7 +671,7 @@ START_TEST(test_replay_overflow)
671671END_TEST
672672
673673/* The sequence number must only be committed after aead verify.
674- * Send plausible junk ESP packets for a real RFC4543 SA, and check the
674+ * Send a plausible junk ESP packet for a real RFC4543 SA, and check the
675675 * inbound replay state is not mutated after verify failure. */
676676START_TEST (test_replay_aead_verify )
677677{
@@ -682,7 +682,7 @@ START_TEST(test_replay_aead_verify)
682682 wolfIP_esp_sa * esp_sa = NULL ;
683683 struct wolfIP_ip_packet * ip = (struct wolfIP_ip_packet * )buf ;
684684
685- for (i = 0U ; i < sizeof (ref ); i ++ ) ref [i ] = (uint8_t )(i & 0xaaU );
685+ for (i = 0U ; i < sizeof (ref ); i ++ ) ref [i ] = (uint8_t )(i & 0xffU );
686686
687687 /* fake ESP packet with enough data to get through early processing, but
688688 * eventually fail during GMAC verify. */
@@ -705,7 +705,7 @@ START_TEST(test_replay_aead_verify)
705705 ck_assert_uint_eq (esp_sa -> replay .bitmap , 0U );
706706
707707 /* should fail to unwrap. */
708- frame_len = build_ip_packet (buf , sizeof (buf ), 0x32 , ref , sizeof (ref ));
708+ frame_len = build_ip_packet (buf , sizeof (buf ), 0x32U , ref , sizeof (ref ));
709709 ret = esp_transport_unwrap (ip , & frame_len );
710710 ck_assert_int_eq (ret , -1 );
711711
0 commit comments