Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support pure = "on" for circl@1.3.7 #1629

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions modules/circl/1.3.7.bcr.1/MODULE.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
module(
name = "circl",
version = "1.3.7.bcr.1",
)

bazel_dep(name = "rules_go", version = "0.39.1", repo_name = "io_bazel_rules_go")
bazel_dep(name = "gazelle", version = "0.31.0")

go_deps = use_extension("@gazelle//:extensions.bzl", "go_deps")
go_deps.from_file(go_mod = "//:go.mod")
use_repo(
go_deps,
"com_github_bwesterb_go_ristretto",
"org_golang_x_crypto",
"org_golang_x_sys",
)
28 changes: 28 additions & 0 deletions modules/circl/1.3.7.bcr.1/patches/add_module_file.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
commit f88c99d4b8d02731ede3fd7e3a5f01fe84336c31
Author: Fabian Meumertzheim <fabian@meumertzhe.im>
Date: Tue Jan 9 08:55:10 2024 +0100

Add MODULE.bazel

diff --git a/MODULE.bazel b/MODULE.bazel
new file mode 100644
index 0000000..9754824
--- /dev/null
+++ b/MODULE.bazel
@@ -0,0 +1,16 @@
+module(
+ name = "circl",
+ version = "1.3.7.bcr.1",
+)
+
+bazel_dep(name = "rules_go", version = "0.39.1", repo_name = "io_bazel_rules_go")
+bazel_dep(name = "gazelle", version = "0.31.0")
+
+go_deps = use_extension("@gazelle//:extensions.bzl", "go_deps")
+go_deps.from_file(go_mod = "//:go.mod")
+use_repo(
+ go_deps,
+ "com_github_bwesterb_go_ristretto",
+ "org_golang_x_crypto",
+ "org_golang_x_sys",
+)
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
From a8c4375a01c55eaef53e457a045e9874fc930d88 Mon Sep 17 00:00:00 2001
From: Matt Clarkson <mattyclarkson@gmail.com>
Date: Fri, 15 Mar 2024 12:10:45 +0000
Subject: [PATCH] Add pure tests for mathmatical libraries

The libraries have `noasm` support. These tests validate that support does not regress.
---
dh/x25519/BUILD.bazel | 16 ++++++++++++++++
dh/x448/BUILD.bazel | 16 ++++++++++++++++
2 files changed, 32 insertions(+)

diff --git a/dh/x25519/BUILD.bazel b/dh/x25519/BUILD.bazel
index cacfcf1..7464c66 100644
--- a/dh/x25519/BUILD.bazel
+++ b/dh/x25519/BUILD.bazel
@@ -41,3 +41,19 @@ go_test(
"//math/fp25519",
],
)
+
+go_test(
+ name = "x25519_pure_test",
+ srcs = [
+ "curve_test.go",
+ "key_test.go",
+ ],
+ data = glob(["testdata/**"]),
+ embed = [":x25519"],
+ pure = "on",
+ deps = [
+ "//internal/conv",
+ "//internal/test",
+ "//math/fp25519",
+ ],
+)
diff --git a/dh/x448/BUILD.bazel b/dh/x448/BUILD.bazel
index 94a7b2b..b96c160 100644
--- a/dh/x448/BUILD.bazel
+++ b/dh/x448/BUILD.bazel
@@ -41,3 +41,19 @@ go_test(
"//math/fp448",
],
)
+
+go_test(
+ name = "x448_pure_test",
+ srcs = [
+ "curve_test.go",
+ "key_test.go",
+ ],
+ data = glob(["testdata/**"]),
+ embed = [":x448"],
+ pure = "on",
+ deps = [
+ "//internal/conv",
+ "//internal/test",
+ "//math/fp448",
+ ],
+)
Loading
Loading