Fix typos
authorKrzysztof Jackiewicz <k.jackiewicz@samsung.com>
Wed, 3 Apr 2024 10:20:10 +0000 (12:20 +0200)
committerKrzysztof Jackiewicz <k.jackiewicz@samsung.com>
Fri, 12 Apr 2024 10:05:06 +0000 (12:05 +0200)
Change-Id: I40199c5804d533466c477121c9912405e65b869a

17 files changed:
srcs/bluetooth_advert.cpp
srcs/bluetooth_advert.h
srcs/handshake.cpp
srcs/message.cpp
srcs/qr_transaction.cpp
srcs/request_handler.h
srcs/websockets.cpp
tests/api_tests.cpp
tests/cbor_tests.cpp
tests/crypto/noise/noise_unittest.cpp
tests/encrypted_tunnel_tests.cpp
tests/handshake_tests.cpp
tests/man_tests.cpp
tests/test_cancel_from_the_other_thread.h
tests/transaction_tester.h
tests/tunnel/auto_tests.h
tests/tunnel/manual_tests.cpp

index 57bee1ec8f30305ba76c77940c3870812d228272..7d36ec1c8361ef873243d361afb7abdd395b8346 100644 (file)
@@ -220,7 +220,7 @@ void Bluetooth::StopLEScan()
         // Stop the scan from the context of the main loop to avoid race conditions.
         // g_main_context_invoke_full() cannot be used here, because we need to defer the callback
         // to be run INSIDE g_main_loop_run() in StartLEScanAndAwaitStop(), otherwise
-        // g_main_loop_quit() will succeed, but the yet unstarted g_main_loop_run() will be left
+        // g_main_loop_quit() will succeed, but the not yet started g_main_loop_run() will be left
         // uninterrupted indefinitely waiting for g_main_loop_quit() that already happened.
         m_scanCancellationCallbackId = g_timeout_add_full(
             G_PRIORITY_HIGH,
index 40b9620d081345dab2d24947eec5e6d0169a3a2d..263dc70bd92ded9f78e47920abb24be15d4ba463 100644 (file)
@@ -71,9 +71,9 @@ public:
      * @brief Stop Bluetooth LE scan. May be called from other threads.
      *
      * @details Cancels current or the next LE scan. May be called without holding any mutex. Due to
-     * the possible race conditions, the design decison was made to cancel the next scan if
-     * there is no scan in progress. Also note that if for the currenty executed scan is too late to
-     * be cancelled (e.g. the scan has just ended) this function will report success, but do
+     * the possible race conditions, the design decision was made to cancel the next scan if
+     * there is no scan in progress. Also note that if for the currently executed scan is too late
+     * to be cancelled (e.g. the scan has just ended) this function will report success, but do
      * nothing.
      */
     virtual void StopLEScan() = 0;
index dcfe0f04841793162cc0fb519c6b097a6b98eb2a..5832dc713843f6c5aca3a6ccfb7384e19a3f1ae2 100644 (file)
@@ -30,7 +30,7 @@ namespace {
 
 struct InitialHandshakeMessage {
     CryptoBuffer msg;
-    Crypto::X9_62_P_256_Key ephermalKey;
+    Crypto::X9_62_P_256_Key ephemeralKey;
     Crypto::Noise::SymmetricState noise;
 };
 
@@ -48,11 +48,11 @@ InitialHandshakeMessage initialHandshakeMessage(const CryptoBuffer &psk,
 
     res.noise.MixKeyAndHash(psk);
 
-    auto exportedEphermalKeyPublic = res.ephermalKey.ExportPublicKey(false);
-    res.noise.MixHash(exportedEphermalKeyPublic);
-    res.noise.MixKey(exportedEphermalKeyPublic);
+    auto exportedEphemeralKeyPublic = res.ephemeralKey.ExportPublicKey(false);
+    res.noise.MixHash(exportedEphemeralKeyPublic);
+    res.noise.MixKey(exportedEphemeralKeyPublic);
 
-    res.msg = std::move(exportedEphermalKeyPublic);
+    res.msg = std::move(exportedEphemeralKeyPublic);
     auto ciphertext = res.noise.EncryptAndHash({});
     res.msg.insert(res.msg.end(), ciphertext.begin(), ciphertext.end());
     return res;
@@ -64,7 +64,7 @@ struct ProcessedHandshakeResponse {
 };
 
 ProcessedHandshakeResponse processHandshakeResponse(const CryptoBuffer &peerHandshakeMessage,
-                                                    const Crypto::X9_62_P_256_Key &ephermalKey,
+                                                    const Crypto::X9_62_P_256_Key &ephemeralKey,
                                                     const Crypto::X9_62_P_256_Key &privKey,
                                                     Crypto::Noise::SymmetricState &&noise)
 {
@@ -82,7 +82,7 @@ ProcessedHandshakeResponse processHandshakeResponse(const CryptoBuffer &peerHand
     noise.MixKey(peerPointBytes);
 
     auto peerPublicKey = Crypto::X9_62_P_256_Key::ImportPublicKey(peerPointBytes);
-    noise.MixKey(Crypto::deriveECDHSharedSecret(ephermalKey, peerPublicKey));
+    noise.MixKey(Crypto::deriveECDHSharedSecret(ephemeralKey, peerPublicKey));
     noise.MixKey(Crypto::deriveECDHSharedSecret(privKey, peerPublicKey));
 
     auto plaintext = noise.DecryptAndHash(ciphertext);
@@ -126,7 +126,7 @@ Handshake::ConnectAndDoQrHandshake(const CryptoBuffer &qrSecret,
 
     // Handshake
     auto psk = DeriveKey(qrSecret, decryptedBleAdvert, KeyPurpose::PSK, PSK_LEN);
-    auto [msg, ephermalKey, noise] = initialHandshakeMessage(psk, identityKey);
+    auto [msg, ephemeralKey, noise] = initialHandshakeMessage(psk, identityKey);
 
     m_tunnel->WriteBinary(msg); // Should throw if Cancel is already called.
 
@@ -134,7 +134,7 @@ Handshake::ConnectAndDoQrHandshake(const CryptoBuffer &qrSecret,
 
     // process response
     auto [splitRes, handshakeHash] =
-        processHandshakeResponse(response, ephermalKey, identityKey, std::move(noise));
+        processHandshakeResponse(response, ephemeralKey, identityKey, std::move(noise));
     LogDebug("handshake hash: " << LowercaseHexStringOf(handshakeHash));
 
     auto guard = std::unique_lock{m_lock};
index 8cabf8e823e6aea738825103e0777b6e6c690d19..2c77cc6c4105f4fec0fb065a2814a5f0b2479acc 100644 (file)
@@ -29,7 +29,7 @@
 namespace {
 
 enum class StatusCode : uint8_t {
-    CTAP1_ERR_SUCCES = 0x00,
+    CTAP1_ERR_SUCCESS = 0x00,
     CTAP2_OK = 0x00,                    // Indicates successful response.
     CTAP1_ERR_INVALID_COMMAND = 0x01,   // The command is not a valid CTAP command.
     CTAP1_ERR_INVALID_PARAMETER = 0x02, // The command included an invalid parameter.
@@ -132,7 +132,7 @@ constexpr size_t AAGUID_SIZE = 16;
 // Get Info response
 constexpr int64_t KEY_GI_BUFFER = 0x01;
 constexpr int64_t KEY_GI_RSP_VERSIONS = 0x01;
-constexpr int64_t KEY_GI_RSP_EXTENSTIONS = 0x02;
+constexpr int64_t KEY_GI_RSP_EXTENSIONS = 0x02;
 constexpr int64_t KEY_GI_RSP_AAGUID = 0x03;
 constexpr int64_t KEY_GI_RSP_OPTIONS = 0x04;
 constexpr int64_t KEY_GI_RSP_MAX_MSG_SIZE = 0x05;
@@ -793,7 +793,7 @@ void PostHandshakeResponse::Deserialize(BufferView &input)
             m_versions.emplace_back(versionArray.GetTextString());
     }
 
-    if (auto extensionsArray = getInfoMap.EnterArrayAt(KEY_GI_RSP_EXTENSTIONS)) {
+    if (auto extensionsArray = getInfoMap.EnterArrayAt(KEY_GI_RSP_EXTENSIONS)) {
         for (size_t i = 0; i < extensionsArray->Length(); i++)
             m_extensions.emplace_back(extensionsArray->GetTextString());
     }
index f0947cc88a57066d98f44a2179e505d3fce3e571..e49be0cb2bc2800b946e5f0cf0688e8ed6768348 100644 (file)
@@ -85,7 +85,7 @@ void QrTransaction::CommonPerformTransaction()
     if (err == BT_ERROR_CANCELLED)
         THROW_CANCELLED();
     if (err != BT_ERROR_NONE)
-        THROW_UNKNOWN("Awating BLE advert failed with code = " << err);
+        THROW_UNKNOWN("Awaiting BLE advert failed with code = " << err);
 
     UpdateStateAndCheckForCancel(State::DOING_HANDSHAKE);
     auto encryptedTunnel =
index 607431048701028959ab1fb032c1ecf54eba9a37..1de15f74fc8b9e69a4642e8a819e3c47fe446f2b 100644 (file)
@@ -64,7 +64,7 @@ public:
     void Process(
         const wauthn_client_data_s *client_data,
         Request request,
-        // If null, default implementations will be set in the function body to control excepitions.
+        // If null, default implementations will be set in the function body to control exceptions.
         std::unique_ptr<IQrCodeShower> qrCodeShower = nullptr,
         IBtAdvertScannerUPtr btAdvertScanner = nullptr,
         std::unique_ptr<IHandshake> handshake = nullptr)
@@ -136,7 +136,7 @@ public:
                             wauthn_const_buffer_s attestationObject;
                             wauthn_const_buffer_s subjectPubkeyInfo;
                             wauthn_authenticator_attestation_response_s response;
-                            wauthn_pubkey_credential_attestaion_s ca;
+                            wauthn_pubkey_credential_attestation_s ca;
                         } val{};
                         return val;
                     } else {
index 2a56c8aeaf32ae4c4ceb9a3a47e7d490b1e0e897..9ffffe241afff735de7eb4e8b3eb593fd95c2a9c 100644 (file)
@@ -187,7 +187,7 @@ int Websockets::FidoCallback(struct lws *wsi,
 
     auto proto = lws_get_protocol(wsi);
     if (proto == nullptr) {
-        // Normally it happes 2 times during the connection establishment.
+        // Normally it happens 2 times during the connection establishment.
         TRY_LOG_DEBUG("Protocol is NULL");
         return 0;
     }
index 07c4e8be9879182b2ab112643475817810451c1e..84a6a0b7c3d42a4c23b7f0930787afceae429882 100644 (file)
@@ -70,7 +70,7 @@ protected:
 };
 
 CallbackInfo<const char *, void *> qrCallback;
-CallbackInfo<const wauthn_pubkey_credential_attestaion_s *, wauthn_error_e, void *> mcCallback;
+CallbackInfo<const wauthn_pubkey_credential_attestation_s *, wauthn_error_e, void *> mcCallback;
 CallbackInfo<const wauthn_pubkey_credential_assertion_s *, wauthn_error_e, void *> gaCallback;
 
 void QrCallback(const char *qr_contents, void *user_data)
@@ -84,7 +84,7 @@ void QrThrowingCallback(const char *qr_contents, void *user_data)
     throw Exception::InvalidParam();
 }
 
-void McCallback(const wauthn_pubkey_credential_attestaion_s *pubkey_cred,
+void McCallback(const wauthn_pubkey_credential_attestation_s *pubkey_cred,
                 wauthn_error_e result,
                 void *user_data)
 {
@@ -193,7 +193,7 @@ TEST(ApiTest, testInvalidArguments)
     memset(&mcOptions, 0, sizeof mcOptions);
     memset(&gaOptions, 0, sizeof gaOptions);
 
-    auto mcInvalid = invalidParamChecker<wauthn_pubkey_credential_attestaion_s>(&userData);
+    auto mcInvalid = invalidParamChecker<wauthn_pubkey_credential_attestation_s>(&userData);
     auto gaInvalid = invalidParamChecker<wauthn_pubkey_credential_assertion_s>(&userData);
 
     mocked_wah_make_credential(&client, &mcOptions, nullptr);
@@ -255,7 +255,7 @@ TEST(ApiTest, testQrCallback)
         return &userData == user_data;
     };
 
-    auto mcInvalid = invalidParamChecker<wauthn_pubkey_credential_attestaion_s>(&userData);
+    auto mcInvalid = invalidParamChecker<wauthn_pubkey_credential_attestation_s>(&userData);
     auto gaInvalid = invalidParamChecker<wauthn_pubkey_credential_assertion_s>(&userData);
 
     qrCallback.SetArgsChecker(qrCheck);
index 75fbb2744f362adf72dea953a94cf738d4ef441e..68aaa5ac42aecc6b2e5df0bf4b09c94985441584 100644 (file)
@@ -80,7 +80,7 @@ struct tm convertToTm(struct date &date)
     ret.tm_min = date.minute;
     ret.tm_sec = date.second;
     ret.tm_mday = date.day;
-    ret.tm_mon = date.month - 1;    // month since january
+    ret.tm_mon = date.month - 1;    // month since January
     ret.tm_year = date.year - 1900; // This is year-1900
 
     return ret;
index f9a18fd3e62e70b57c9177293e1aee1c674df696..a0d178e5bcddb29dc99b408ab64b3f0947c2cb7b 100644 (file)
@@ -23,7 +23,7 @@ using namespace Crypto::Noise;
 TEST(NoiseTest, KNpsk0_P256_AESGCM_SHA256_initial_state)
 {
     SymmetricState noise{SymmetricState::HandshakeKind::KNpsk0_P256_AESGCM_SHA256};
-    // Values come from an alternative implemantation of Dong Sun Lee
+    // Values come from an alternative implementation of Dong Sun Lee
     EXPECT_EQ(noise.GetHandshakeHash(),
               (CryptoBuffer{0x4e, 0x6f, 0x69, 0x73, 0x65, 0x5f, 0x4b, 0x4e, 0x70, 0x73, 0x6b,
                             0x30, 0x5f, 0x50, 0x32, 0x35, 0x36, 0x5f, 0x41, 0x45, 0x53, 0x47,
@@ -42,7 +42,7 @@ TEST(NoiseTest, KNpsk0_P256_AESGCM_SHA256_initial_state)
 TEST(NoiseTest, NKpsk0_P256_AESGCM_SHA256_initial_state)
 {
     SymmetricState noise{SymmetricState::HandshakeKind::NKpsk0_P256_AESGCM_SHA256};
-    // Values come from an alternative implemantation of Dong Sun Lee
+    // Values come from an alternative implementation of Dong Sun Lee
     EXPECT_EQ(noise.GetHandshakeHash(),
               (CryptoBuffer{0x4e, 0x6f, 0x69, 0x73, 0x65, 0x5f, 0x4e, 0x4b, 0x70, 0x73, 0x6b,
                             0x30, 0x5f, 0x50, 0x32, 0x35, 0x36, 0x5f, 0x41, 0x45, 0x53, 0x47,
@@ -62,7 +62,7 @@ TEST(NoiseTest, KNpsk0_P256_AESGCM_SHA256_MixHash)
 {
     SymmetricState noise{SymmetricState::HandshakeKind::KNpsk0_P256_AESGCM_SHA256};
     noise.MixHash({'a', 'b', 'c'});
-    // Values come from an alternative implemantation of Dong Sun Lee
+    // Values come from an alternative implementation of Dong Sun Lee
     EXPECT_EQ(noise.GetHandshakeHash(),
               (CryptoBuffer{0xe0, 0x92, 0xb5, 0x62, 0x6c, 0x14, 0xf8, 0x3f, 0x8d, 0x28, 0x9f,
                             0x2c, 0x37, 0x61, 0xba, 0x15, 0xf9, 0x68, 0xb0, 0x7e, 0x40, 0x80,
@@ -82,7 +82,7 @@ TEST(NoiseTest, NKpsk0_P256_AESGCM_SHA256_MixHash)
 {
     SymmetricState noise{SymmetricState::HandshakeKind::NKpsk0_P256_AESGCM_SHA256};
     noise.MixHash({'a', 'b', 'c'});
-    // Values come from an alternative implemantation of Dong Sun Lee
+    // Values come from an alternative implementation of Dong Sun Lee
     EXPECT_EQ(noise.GetHandshakeHash(),
               (CryptoBuffer{0xc3, 0xec, 0x18, 0xe6, 0x5f, 0x80, 0xcc, 0xe1, 0x43, 0x86, 0xab,
                             0x76, 0x5d, 0xbc, 0x2f, 0xfc, 0x82, 0xc5, 0x94, 0x68, 0x9a, 0x45,
@@ -102,7 +102,7 @@ TEST(NoiseTest, KNpsk0_P256_AESGCM_SHA256_MixKey)
 {
     SymmetricState noise{SymmetricState::HandshakeKind::KNpsk0_P256_AESGCM_SHA256};
     noise.MixKey({'a', 'b', 'c'});
-    // Values come from an alternative implemantation of Dong Sun Lee
+    // Values come from an alternative implementation of Dong Sun Lee
     EXPECT_EQ(noise.GetHandshakeHash(),
               (CryptoBuffer{0x4e, 0x6f, 0x69, 0x73, 0x65, 0x5f, 0x4b, 0x4e, 0x70, 0x73, 0x6b,
                             0x30, 0x5f, 0x50, 0x32, 0x35, 0x36, 0x5f, 0x41, 0x45, 0x53, 0x47,
@@ -122,7 +122,7 @@ TEST(NoiseTest, NKpsk0_P256_AESGCM_SHA256_MixKey)
 {
     SymmetricState noise{SymmetricState::HandshakeKind::NKpsk0_P256_AESGCM_SHA256};
     noise.MixKey({'a', 'b', 'c'});
-    // Values come from an alternative implemantation of Dong Sun Lee
+    // Values come from an alternative implementation of Dong Sun Lee
     EXPECT_EQ(noise.GetHandshakeHash(),
               (CryptoBuffer{0x4e, 0x6f, 0x69, 0x73, 0x65, 0x5f, 0x4e, 0x4b, 0x70, 0x73, 0x6b,
                             0x30, 0x5f, 0x50, 0x32, 0x35, 0x36, 0x5f, 0x41, 0x45, 0x53, 0x47,
@@ -142,7 +142,7 @@ TEST(NoiseTest, KNpsk0_P256_AESGCM_SHA256_MixKeyAndHash)
 {
     SymmetricState noise{SymmetricState::HandshakeKind::KNpsk0_P256_AESGCM_SHA256};
     noise.MixKeyAndHash({'a', 'b', 'c'});
-    // Values come from an alternative implemantation of Dong Sun Lee
+    // Values come from an alternative implementation of Dong Sun Lee
     EXPECT_EQ(noise.GetHandshakeHash(),
               (CryptoBuffer{0x3a, 0xf7, 0x39, 0xd6, 0xa2, 0xf4, 0x87, 0x05, 0x3c, 0xf7, 0x20,
                             0x30, 0x91, 0x02, 0x85, 0xdf, 0x70, 0x33, 0x67, 0x53, 0xcf, 0xf1,
@@ -162,7 +162,7 @@ TEST(NoiseTest, NKpsk0_P256_AESGCM_SHA256_MixKeyAndHash)
 {
     SymmetricState noise{SymmetricState::HandshakeKind::NKpsk0_P256_AESGCM_SHA256};
     noise.MixKeyAndHash({'a', 'b', 'c'});
-    // Values come from an alternative implemantation of Dong Sun Lee
+    // Values come from an alternative implementation of Dong Sun Lee
     EXPECT_EQ(noise.GetHandshakeHash(),
               (CryptoBuffer{0x3f, 0x46, 0xd8, 0x5d, 0x19, 0x65, 0x9a, 0x23, 0x62, 0x16, 0x48,
                             0xde, 0x8d, 0x47, 0x38, 0x06, 0x8b, 0x54, 0x6a, 0x7b, 0x99, 0x30,
@@ -191,7 +191,7 @@ TEST(NoiseTest, KNpsk0_P256_AESGCM_SHA256_Encrypt_Decrypt)
     auto plaintext1 = noise2.DecryptAndHash(ciphertext1);
     EXPECT_EQ(msg1, plaintext1);
     // clang-format off
-    // Value comes from an alternative implemantation of Dong Sun Lee
+    // Value comes from an alternative implementation of Dong Sun Lee
     EXPECT_EQ(ciphertext1,
               (CryptoBuffer{
                   0x73, 0xa5, 0x70, 0x0a, 0x9f, 0x2b, 0x63, 0x8c, 0xa9, 0x68,
@@ -241,7 +241,7 @@ TEST(NoiseTest, NKpsk0_P256_AESGCM_SHA256_Encrypt_Decrypt)
     auto plaintext1 = noise2.DecryptAndHash(ciphertext1);
     EXPECT_EQ(msg1, plaintext1);
     // clang-format off
-    // Value comes from an alternative implemantation of Dong Sun Lee
+    // Value comes from an alternative implementation of Dong Sun Lee
     EXPECT_EQ(ciphertext1,
               (CryptoBuffer{
                   0x6e, 0x5f, 0x52, 0xf4, 0xf8, 0x53, 0xa3, 0x6c, 0xb0, 0x27,
index 67d843f66a376042828c6f20052ac4790548098c..d3e0517308eee99b25b41e0bb0c84f6b2c80c123 100644 (file)
@@ -96,7 +96,7 @@ TEST(EncryptedTunnel, works)
         }
     }
 
-    // Test writing and writting padding.
+    // Test writing and writing padding.
     for (int blocks = 0; blocks < 10; ++blocks) {
         for (int i = blocks * 32; i < (blocks + 1) * 32; ++i) {
             auto msg = Crypto::RandomBytes(i);
index f77043a244220efed8177d70fcea7f1ee32c23c7..aca3048c3b4aa49a93e1405cb648fd8b24b440f0 100644 (file)
@@ -82,27 +82,27 @@ public:
 
         auto exportedPublicKeyLen = m_platformIdentityPublicKey.ExportPublicKey(false).size();
         ASSERT_GE(msg.size(), exportedPublicKeyLen);
-        auto platformEphermalPublicKeyBytes =
+        auto platformEphemeralPublicKeyBytes =
             CryptoBuffer{msg.data(), msg.data() + exportedPublicKeyLen};
 
-        noise.MixHash(platformEphermalPublicKeyBytes);
-        noise.MixKey(platformEphermalPublicKeyBytes);
+        noise.MixHash(platformEphemeralPublicKeyBytes);
+        noise.MixKey(platformEphemeralPublicKeyBytes);
 
         auto ciphertext = CryptoBuffer{msg.begin() + exportedPublicKeyLen, msg.end()};
         auto plaintext = noise.DecryptAndHash(ciphertext);
         ASSERT_TRUE(plaintext.empty());
 
         // Prepare response
-        auto platformEphermalPublicKey =
-            Crypto::X9_62_P_256_Key::ImportPublicKey(platformEphermalPublicKeyBytes);
+        auto platformEphemeralPublicKey =
+            Crypto::X9_62_P_256_Key::ImportPublicKey(platformEphemeralPublicKeyBytes);
 
-        auto response = m_authenticatorEphermalKey.ExportPublicKey(false);
+        auto response = m_authenticatorEphemeralKey.ExportPublicKey(false);
         noise.MixHash(response);
         noise.MixKey(response);
 
-        noise.MixKey(
-            Crypto::deriveECDHSharedSecret(m_authenticatorEphermalKey, platformEphermalPublicKey));
-        noise.MixKey(Crypto::deriveECDHSharedSecret(m_authenticatorEphermalKey,
+        noise.MixKey(Crypto::deriveECDHSharedSecret(m_authenticatorEphemeralKey,
+                                                    platformEphemeralPublicKey));
+        noise.MixKey(Crypto::deriveECDHSharedSecret(m_authenticatorEphemeralKey,
                                                     m_platformIdentityPublicKey));
 
         ciphertext = noise.EncryptAndHash({});
@@ -145,7 +145,7 @@ private:
     const CryptoBuffer &m_decryptedBleAdvert;
     const CryptoBuffer &m_getInfoMsg;
 
-    Crypto::X9_62_P_256_Key m_authenticatorEphermalKey = Crypto::X9_62_P_256_Key::Create();
+    Crypto::X9_62_P_256_Key m_authenticatorEphemeralKey = Crypto::X9_62_P_256_Key::Create();
     CryptoBuffer m_handshakeResponse;
     CryptoBuffer m_encryptedGetInfoMsg;
     int m_readNo = 0;
index 348830cbd5be4ec6f48c3e8fd95592bb74ce02e8..ac483177ab3a55409e3890ccc30d3e7d0df9d240 100644 (file)
@@ -114,7 +114,7 @@ void DisplayQRCallback(const char *qr_contents, void *data)
 
 Buffer ToBuffer(wauthn_const_buffer_s buff) { return Buffer{buff.data, buff.data + buff.size}; }
 
-void MCCallback(const wauthn_pubkey_credential_attestaion_s *pubkey_cred,
+void MCCallback(const wauthn_pubkey_credential_attestation_s *pubkey_cred,
                 wauthn_error_e result,
                 void *data)
 {
index bf39d29cbd1a5a7ee93d9a8172e923594be64040..a64f33a9b4fac1ed931d5cfbe70b38142451376f 100644 (file)
@@ -132,7 +132,7 @@ void TestCancelFromTheOtherThread(size_t reps,
         }
     });
 
-    size_t sucessfullCancellations = 0;
+    size_t successfulCancellations = 0;
     auto lock = std::unique_lock{mutex};
     for (size_t i = 0; i < reps; ++i) {
         auto transactionObj = maker();
@@ -151,7 +151,7 @@ void TestCancelFromTheOtherThread(size_t reps,
         } catch (const Exception::Cancelled &) {
             // This may happen if cancellation happens before or during the transaction and is
             // expected.
-            ++sucessfullCancellations;
+            ++successfulCancellations;
         } catch (const std::exception &e) {
             ADD_FAILURE() << "Unexpected exception: " << e.what();
         } catch (...) {
@@ -172,8 +172,8 @@ void TestCancelFromTheOtherThread(size_t reps,
     cv.notify_all();
     canceller.join();
 
-    std::cerr << "sucessfullCancellations: " << sucessfullCancellations << " of " << reps
+    std::cerr << "successfulCancellations: " << successfulCancellations << " of " << reps
               << std::endl;
     // Reasonable number of cancellations has to happen, otherwise this code is wrong.
-    EXPECT_GE(sucessfullCancellations, minExpectedCancellationsNum);
+    EXPECT_GE(successfulCancellations, minExpectedCancellationsNum);
 }
index 7582a260c9a40a36a78d56dbf60aaeed51cbd18a..bb311530f08227bf865614bb72a7a9b56757ab1c 100644 (file)
@@ -57,7 +57,7 @@ public:
                 assert(m_testState.m_cancelCalledOn == CancelCalledOn::NONE);
                 m_testState.m_transaction->Cancel();
                 if (hasCancel) {
-                    // ITransaction::Cancel() should call apropriate Cancel() method immediately.
+                    // ITransaction::Cancel() should call appropriate Cancel() method immediately.
                     assert(m_testState.m_cancelCalledOn != CancelCalledOn::NONE);
                 }
                 return true;
index 84c753673293ab9bcdb3ec3b9af150806dedbce0..f240b97c91562373030d9a03ba7a6b58a5f94067 100644 (file)
@@ -24,7 +24,6 @@
 const std::string &TestUrl();
 
 struct MockedLws;
-struct MocketContext;
 
 class MockedSockets : public IWebsockets {
 protected:
index 908a1c4d93c667476121dd2782cd97ed5692af22..a637a3ba2a20d62df2e5613d0d1a5c712e771558 100644 (file)
@@ -42,7 +42,7 @@ class Config {
 private:
     /*
      * Default setting for tests running on emulator and websocket_server.py server running on the
-     * host. Can be overriden by using "--server=" argument.
+     * host. Can be overridden by using "--server=" argument.
      */
     Config() : m_testServer("10.0.2.2:7890") {}
 
@@ -115,9 +115,8 @@ TEST(TunnelDummyServerTests, UriParsing)
 {
     struct UnsafeSockets2 : public UnsafeSockets {
     public:
-        void CheckPath(const std::string &path) {
-            EXPECT_EQ(m_path, path);
-        }
+        void CheckPath(const std::string &path) { EXPECT_EQ(m_path, path); }
+
     protected:
         Lws *ClientConnectViaInfo(const struct lws_client_connect_info &info) noexcept override
         {