Package: golang-github-cloudflare-circl
Severity: important
Tags: patch
User: [email protected]
Usertags: origin-ubuntu jammy ubuntu-patch

Dear Maintainer,

golang-github-cloudflare-circl currently FTBFS with Go 1.18

In Ubuntu, the attached patch was applied to achieve the following:

  * Fix FTBFS with Go 1.18

Thanks for considering the patch.


-- System Information:
Debian Release: bookworm/sid
  APT prefers jammy
  APT policy: (500, 'jammy')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.15.0-22-generic (SMP w/32 CPU threads)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, 
TAINT_UNSIGNED_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
diff -Nru 
golang-github-cloudflare-circl-1.0.0+20200724/debian/patches/fix-ftbfs-with-go-1.18.patch
 
golang-github-cloudflare-circl-1.0.0+20200724/debian/patches/fix-ftbfs-with-go-1.18.patch
--- 
golang-github-cloudflare-circl-1.0.0+20200724/debian/patches/fix-ftbfs-with-go-1.18.patch
   1969-12-31 18:00:00.000000000 -0600
+++ 
golang-github-cloudflare-circl-1.0.0+20200724/debian/patches/fix-ftbfs-with-go-1.18.patch
   2022-03-16 13:59:34.000000000 -0500
@@ -0,0 +1,29 @@
+Description: Fix FTBFS with Go 1.18
+ Per https://go.dev/doc/go1.18: "Operating on invalid
+ curve points (those for which the IsOnCurve method
+ returns false, and which are never returned by Unmarshal
+ or a Curve method operating on a valid point) has always
+ been undefined behavior, can lead to key recovery attacks,
+ and is now unsupported by the new backend." Upstream has
+ already rewritten the tests for this change.
+Origin: upstream, https://github.com/cloudflare/circl/pull/327
+Forwarded:
+Applied-Upstream: 
https://github.com/cloudflare/circl/commit/c7e43e0f74e917f712bdc46f32aead07b27b0abb
+Last-Update: 2022-03-16
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+Index: golang-github-cloudflare-circl-1.0.0+20200724/ecc/p384/p384_test.go
+===================================================================
+--- golang-github-cloudflare-circl-1.0.0+20200724.orig/ecc/p384/p384_test.go
++++ golang-github-cloudflare-circl-1.0.0+20200724/ecc/p384/p384_test.go
+@@ -163,8 +163,8 @@
+                       x, _ := rand.Int(rand.Reader, params.P)
+                       y, _ := rand.Int(rand.Reader, params.P)
+ 
+-                      got := CirclCurve.IsOnCurve(CirclCurve.ScalarMult(x, y, 
k.Bytes()))
+-                      want := StdCurve.IsOnCurve(StdCurve.ScalarMult(x, y, 
k.Bytes()))
++                      got := CirclCurve.IsOnCurve(x, y) && 
CirclCurve.IsOnCurve(CirclCurve.ScalarMult(x, y, k.Bytes()))
++                      want := StdCurve.IsOnCurve(x, y) && 
StdCurve.IsOnCurve(StdCurve.ScalarMult(x, y, k.Bytes()))
+ 
+                       if got != want {
+                               test.ReportError(t, got, want, k, x, y)
diff -Nru golang-github-cloudflare-circl-1.0.0+20200724/debian/patches/series 
golang-github-cloudflare-circl-1.0.0+20200724/debian/patches/series
--- golang-github-cloudflare-circl-1.0.0+20200724/debian/patches/series 
1969-12-31 18:00:00.000000000 -0600
+++ golang-github-cloudflare-circl-1.0.0+20200724/debian/patches/series 
2022-03-16 13:59:05.000000000 -0500
@@ -0,0 +1 @@
+fix-ftbfs-with-go-1.18.patch

Reply via email to