From ee1527341ad1b42231c739ad01153c0fb0dda5fe Mon Sep 17 00:00:00 2001 From: consti10 Date: Thu, 10 Aug 2023 23:11:45 +0200 Subject: [PATCH] fix unit tests --- executables/benchmark.cpp | 2 +- executables/unit_test.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/executables/benchmark.cpp b/executables/benchmark.cpp index 9f803e6a..73898150 100644 --- a/executables/benchmark.cpp +++ b/executables/benchmark.cpp @@ -101,7 +101,7 @@ void benchmark_crypt(const Options &options,const bool packet_validation_only) { Encryptor encryptor{std::nullopt}; encryptor.set_encryption_enabled(!packet_validation_only); Decryptor decryptor{std::nullopt}; - encryptor.set_encryption_enabled(!packet_validation_only); + decryptor.set_encryption_enabled(!packet_validation_only); std::array sessionKeyNonce{}; std::array sessionKeyData{}; encryptor.makeNewSessionKey(sessionKeyNonce, sessionKeyData); diff --git a/executables/unit_test.cpp b/executables/unit_test.cpp index e97da788..a8fb024c 100644 --- a/executables/unit_test.cpp +++ b/executables/unit_test.cpp @@ -125,7 +125,7 @@ static void test_encrypt_decrypt_validate(const bool useGeneratedFiles,bool mess Encryptor encryptor{encKey}; encryptor.set_encryption_enabled(!message_signing_only); Decryptor decryptor{decKey}; - encryptor.set_encryption_enabled(!message_signing_only); + decryptor.set_encryption_enabled(!message_signing_only); struct SessionStuff{ std::array sessionKeyNonce{}; // random data std::array sessionKeyData{};