Blame SOURCES/0001-sss-use-BN_set_word-x-0-instead-of-BN_zero.patch

b5339b
From 95f25c355fc13727410ccacaa618caf6af5d5eba Mon Sep 17 00:00:00 2001
b5339b
From: Sergio Correia <scorreia@redhat.com>
b5339b
Date: Mon, 3 May 2021 22:36:36 -0300
b5339b
Subject: [PATCH] sss: use BN_set_word(x, 0) instead of BN_zero()
b5339b
b5339b
Different OpenSSL versions define BN_zero() differently -- sometimes
b5339b
returning an integer, sometimes as void --, so let's use instead
b5339b
BN_set_word() instead, not to have issues when building with these
b5339b
different versions.
b5339b
---
b5339b
 src/pins/sss/sss.c | 6 +++---
b5339b
 1 file changed, 3 insertions(+), 3 deletions(-)
b5339b
b5339b
diff --git a/src/pins/sss/sss.c b/src/pins/sss/sss.c
b5339b
index a37215d..7486d6c 100644
b5339b
--- a/src/pins/sss/sss.c
b5339b
+++ b/src/pins/sss/sss.c
b5339b
@@ -214,7 +214,7 @@ sss_point(const json_t *sss, size_t *len)
b5339b
     if (BN_rand_range(xx, pp) <= 0)
b5339b
         return NULL;
b5339b
 
b5339b
-    if (BN_zero(yy) <= 0)
b5339b
+    if (BN_set_word(yy, 0) <= 0)
b5339b
         return NULL;
b5339b
 
b5339b
     for (size_t i = 0; i < json_array_size(e); i++) {
b5339b
@@ -272,7 +272,7 @@ sss_recover(const json_t *p, size_t npnts, const uint8_t *pnts[])
b5339b
     if (!ctx || !pp || !acc || !tmp || !k)
b5339b
         return NULL;
b5339b
 
b5339b
-    if (BN_zero(k) <= 0)
b5339b
+    if (BN_set_word(k, 0) <= 0)
b5339b
         return NULL;
b5339b
 
b5339b
     len = jose_b64_dec(p, NULL, 0);
b5339b
@@ -303,7 +303,7 @@ sss_recover(const json_t *p, size_t npnts, const uint8_t *pnts[])
b5339b
 
b5339b
             /* acc *= (0 - xi) / (xo - xi) */
b5339b
 
b5339b
-            if (BN_zero(tmp) <= 0)
b5339b
+            if (BN_set_word(tmp, 0) <= 0)
b5339b
                 return NULL;
b5339b
 
b5339b
             if (BN_mod_sub(tmp, tmp, xi, pp, ctx) <= 0)
b5339b
-- 
b5339b
2.31.1
b5339b