From 61825f1327979c4a79019055ad5f279c3b820b63 Mon Sep 17 00:00:00 2001 From: Tobias Buchberger Date: Tue, 11 Jun 2024 16:33:25 +0200 Subject: [PATCH] fix: fixed bug introduced in crypto_test with CI fixes --- auto_tests/crypto_test.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/auto_tests/crypto_test.c b/auto_tests/crypto_test.c index 41d69da75b..04f4bfeeae 100644 --- a/auto_tests/crypto_test.c +++ b/auto_tests/crypto_test.c @@ -649,7 +649,7 @@ static void test_noiseik(void) // bin2hex_toupper(init_static_print, sizeof(init_static_print), init_static_pub, CRYPTO_PUBLIC_KEY_SIZE); // printf("init_static_pub: %s\n", init_static_print); - noise_handshake_init(noise_handshake_responder, resp_static, init_static_pub, false, prologue, sizeof(prologue)); + noise_handshake_init(noise_handshake_responder, resp_static, nullptr, false, prologue, sizeof(prologue)); /* e */ memcpy(noise_handshake_responder->remote_ephemeral, noise_handshake_initiator->ephemeral_public, CRYPTO_PUBLIC_KEY_SIZE); @@ -728,12 +728,12 @@ static void test_noiseik(void) noise_mix_key(noise_handshake_initiator->chaining_key, noise_handshake_temp_key_init, noise_handshake_initiator->static_private, noise_handshake_initiator->remote_ephemeral); - // uint8_t handshake_payload_plain_responder[sizeof(resp_payload_hs)]; - // if(noise_decrypt_and_hash(handshake_payload_plain_initiator, ciphertext3_hs_responder, - // sizeof(ciphertext3_hs_responder), noise_handshake_temp_key_init, - // noise_handshake_initiator->hash) != sizeof(resp_payload_hs)) { - // printf("Initiator: HS decryption failed\n"); - // } + uint8_t handshake_payload_plain_responder[sizeof(resp_payload_hs)]; + if(noise_decrypt_and_hash(handshake_payload_plain_responder, ciphertext3_hs_responder, + sizeof(ciphertext3_hs_responder), noise_handshake_temp_key_init, + noise_handshake_initiator->hash) != sizeof(resp_payload_hs)) { + printf("Initiator: HS decryption failed\n"); + } /* INITIATOR Noise Split(), nonces already set in crypto connection */ uint8_t initiator_send_key[CRYPTO_SHARED_KEY_SIZE];