aboutsummaryrefslogtreecommitdiffstats
path: root/src/charon/testing/parser_test.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/charon/testing/parser_test.c')
-rw-r--r--src/charon/testing/parser_test.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/charon/testing/parser_test.c b/src/charon/testing/parser_test.c
index 263c6eb70..87069cda0 100644
--- a/src/charon/testing/parser_test.c
+++ b/src/charon/testing/parser_test.c
@@ -532,6 +532,7 @@ void test_parser_with_notify_payload(protected_tester_t *tester)
notify_payload_t *notify_payload;
status_t status;
chunk_t notify_chunk, result;
+ u_int32_t spi;
u_int8_t notify_bytes[] = {
0x00,0x00,0x00,0x1C, /* payload header */
@@ -559,8 +560,8 @@ void test_parser_with_notify_payload(protected_tester_t *tester)
tester->assert_true(tester,(notify_payload->get_protocol_id(notify_payload) == 3), "Protocol id");
tester->assert_true(tester,(notify_payload->get_notify_message_type(notify_payload) == 1), "notify message type");
- result = notify_payload->get_spi(notify_payload);
- tester->assert_false(tester,(memcmp(notify_bytes + 8, result.ptr, result.len)), "parsed spi");
+ spi = notify_payload->get_spi(notify_payload);
+ tester->assert_false(tester, spi == 0x01020303, "parsed spi");
result = notify_payload->get_notification_data(notify_payload);
tester->assert_false(tester,(memcmp(notify_bytes + 12, result.ptr, result.len)), "parsed notification data");