Fix feature check in wauthn_cancel() 85/315785/1
authorKrzysztof Jackiewicz <k.jackiewicz@samsung.com>
Wed, 7 Aug 2024 15:31:23 +0000 (17:31 +0200)
committerKrzysztof Jackiewicz <k.jackiewicz@samsung.com>
Wed, 7 Aug 2024 15:31:23 +0000 (17:31 +0200)
Change-Id: Ia918f03902cd87994952feb312b9bc216df247ef

srcs/client/client.cpp

index a22c2ec10c0c68eafab05619b59ad9d935eecda5..2b5e2f4229ec784d0512a039de32527cf88ce339 100644 (file)
@@ -127,11 +127,9 @@ int wauthn_get_assertion(const wauthn_client_data_s *client_data,
 
 WEBAUTHN_API
 int wauthn_cancel() {
-    int ret = has_feature(WEBAUTHN);
-    if (ret != WAUTHN_ERROR_NONE)
-    {
-        LogError(get_error_message(ret));
-        return ret;
+    if (!has_feature(WEBAUTHN)) {
+        LogError("Required feature is missing");
+        return WAUTHN_ERROR_NOT_SUPPORTED;
     }
 
     return try_catch([&]() -> int {