Преглед изворни кода

improve fizz (#4356)

* improve fizz

* Update xmake.lua

* Update xmake.lua

* Update xmake.lua

* Update xmake.lua
c8ef пре 1 година
родитељ
комит
101dc3d144
1 измењених фајлова са 13 додато и 3 уклоњено
  1. 13 3
      packages/f/fizz/xmake.lua

+ 13 - 3
packages/f/fizz/xmake.lua

@@ -11,19 +11,29 @@ package("fizz")
     add_versions("2024.03.18", "f46799dda118ec5a35cf7533e00daf25e7b2d7c58f00b80ba6c0388b19190c6f")
     add_versions("2024.03.25", "bcf9c551719bc86318a77e2b13769d52679642b98728e645900485d7a90c0f8b")
     add_versions("2024.04.01", "caf2cf1ba8f6db66abbadf382fb3e0667888567c4ac0d8f74ec92e1fb27c3727")
+    add_versions("2024.06.10", "dabc77e2238383fb37c19327af8ab864ba030d32e98f49b23008075a7afb6e19")
 
-    add_deps("cmake", "folly", "libsodium")
+    add_deps("cmake", "folly", "libsodium", "liboqs")
 
     on_install("linux", "macosx", function (package)
         os.cd("fizz")
         local configs = {"-DBUILD_TESTS=OFF",
                          "-DBUILD_EXAMPLES=OFF",
-                         "-DCMAKE_CXX_STANDARD=17"}
+                         "-DCMAKE_CXX_STANDARD=17",
+                         "-DFIZZ_HAVE_OQS=TRUE"}
         table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))
         table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF"))
         import("package.tools.cmake").install(package, configs)
     end)
 
     on_test(function (package)
-        assert(package:has_cxxincludes("fizz/server/AsyncFizzServer.h", {configs = {languages = "c++17"}}))
+        assert(package:check_cxxsnippets({test = [[
+            #include "fizz/experimental/crypto/exchange/OQSKeyExchange.h"
+            void test() {
+                auto clientKex = fizz::OQSClientKeyExchange(OQS_KEM_alg_kyber_768);
+                auto serverKex = fizz::OQSServerKeyExchange(OQS_KEM_alg_kyber_768);
+                clientKex.generateKeyPair();
+                serverKex.generateKeyPair();
+            }
+        ]]}, {configs = {languages = "c++17"}}))
     end)