summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/regress/lib/libcrypto/bn/bn_test.c26
1 files changed, 17 insertions, 9 deletions
diff --git a/src/regress/lib/libcrypto/bn/bn_test.c b/src/regress/lib/libcrypto/bn/bn_test.c
index 1476a92ee2..4cefc27ab7 100644
--- a/src/regress/lib/libcrypto/bn/bn_test.c
+++ b/src/regress/lib/libcrypto/bn/bn_test.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bn_test.c,v 1.9 2023/04/07 22:28:21 tb Exp $ */ 1/* $OpenBSD: bn_test.c,v 1.10 2023/04/07 22:29:33 tb Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -774,7 +774,8 @@ int
774test_sqr(BIO *bp, BN_CTX *ctx) 774test_sqr(BIO *bp, BN_CTX *ctx)
775{ 775{
776 BIGNUM *a = NULL, *c = NULL, *d = NULL, *e = NULL; 776 BIGNUM *a = NULL, *c = NULL, *d = NULL, *e = NULL;
777 int i, rc = 0; 777 int i;
778 int rc = 0;
778 779
779 if ((a = BN_new()) == NULL) 780 if ((a = BN_new()) == NULL)
780 goto err; 781 goto err;
@@ -1552,7 +1553,8 @@ int
1552test_gf2m_add(BIO *bp) 1553test_gf2m_add(BIO *bp)
1553{ 1554{
1554 BIGNUM *a = NULL, *b = NULL, *c = NULL; 1555 BIGNUM *a = NULL, *b = NULL, *c = NULL;
1555 int i, rc = 0; 1556 int i;
1557 int rc = 0;
1556 1558
1557 if ((a = BN_new()) == NULL) 1559 if ((a = BN_new()) == NULL)
1558 goto err; 1560 goto err;
@@ -1749,9 +1751,10 @@ int
1749test_gf2m_mod_sqr(BIO *bp, BN_CTX *ctx) 1751test_gf2m_mod_sqr(BIO *bp, BN_CTX *ctx)
1750{ 1752{
1751 BIGNUM *a = NULL, *b[2] = { 0 }, *c = NULL, *d = NULL; 1753 BIGNUM *a = NULL, *b[2] = { 0 }, *c = NULL, *d = NULL;
1752 int i, j, rc = 0;
1753 int p0[] = { 163, 7, 6, 3, 0, -1 }; 1754 int p0[] = { 163, 7, 6, 3, 0, -1 };
1754 int p1[] = { 193, 15, 0, -1 }; 1755 int p1[] = { 193, 15, 0, -1 };
1756 int i, j;
1757 int rc = 0;
1755 1758
1756 if ((a = BN_new()) == NULL) 1759 if ((a = BN_new()) == NULL)
1757 goto err; 1760 goto err;
@@ -1811,9 +1814,10 @@ int
1811test_gf2m_mod_inv(BIO *bp, BN_CTX *ctx) 1814test_gf2m_mod_inv(BIO *bp, BN_CTX *ctx)
1812{ 1815{
1813 BIGNUM *a = NULL, *b[2] = { 0 }, *c = NULL, *d = NULL; 1816 BIGNUM *a = NULL, *b[2] = { 0 }, *c = NULL, *d = NULL;
1814 int i, j, rc = 0;
1815 int p0[] = { 163, 7, 6, 3, 0, -1 }; 1817 int p0[] = { 163, 7, 6, 3, 0, -1 };
1816 int p1[] = { 193, 15, 0, -1 }; 1818 int p1[] = { 193, 15, 0, -1 };
1819 int i, j;
1820 int rc = 0;
1817 1821
1818 if ((a = BN_new()) == NULL) 1822 if ((a = BN_new()) == NULL)
1819 goto err; 1823 goto err;
@@ -1869,9 +1873,10 @@ int
1869test_gf2m_mod_div(BIO *bp, BN_CTX *ctx) 1873test_gf2m_mod_div(BIO *bp, BN_CTX *ctx)
1870{ 1874{
1871 BIGNUM *a = NULL, *b[2] = { 0 }, *c = NULL, *d = NULL, *e = NULL, *f = NULL; 1875 BIGNUM *a = NULL, *b[2] = { 0 }, *c = NULL, *d = NULL, *e = NULL, *f = NULL;
1872 int i, j, rc = 0;
1873 int p0[] = { 163, 7, 6, 3, 0, -1 }; 1876 int p0[] = { 163, 7, 6, 3, 0, -1 };
1874 int p1[] = { 193, 15, 0, -1 }; 1877 int p1[] = { 193, 15, 0, -1 };
1878 int i, j;
1879 int rc = 0;
1875 1880
1876 if ((a = BN_new()) == NULL) 1881 if ((a = BN_new()) == NULL)
1877 goto err; 1882 goto err;
@@ -1937,9 +1942,10 @@ int
1937test_gf2m_mod_exp(BIO *bp, BN_CTX *ctx) 1942test_gf2m_mod_exp(BIO *bp, BN_CTX *ctx)
1938{ 1943{
1939 BIGNUM *a = NULL, *b[2] = { 0 }, *c = NULL, *d = NULL, *e = NULL, *f = NULL; 1944 BIGNUM *a = NULL, *b[2] = { 0 }, *c = NULL, *d = NULL, *e = NULL, *f = NULL;
1940 int i, j, rc = 0;
1941 int p0[] = { 163, 7, 6, 3, 0, -1 }; 1945 int p0[] = { 163, 7, 6, 3, 0, -1 };
1942 int p1[] = { 193, 15, 0, -1 }; 1946 int p1[] = { 193, 15, 0, -1 };
1947 int i, j;
1948 int rc = 0;
1943 1949
1944 if ((a = BN_new()) == NULL) 1950 if ((a = BN_new()) == NULL)
1945 goto err; 1951 goto err;
@@ -2013,9 +2019,10 @@ int
2013test_gf2m_mod_sqrt(BIO *bp, BN_CTX *ctx) 2019test_gf2m_mod_sqrt(BIO *bp, BN_CTX *ctx)
2014{ 2020{
2015 BIGNUM *a = NULL, *b[2] = { 0 }, *c = NULL, *d = NULL, *e = NULL, *f = NULL; 2021 BIGNUM *a = NULL, *b[2] = { 0 }, *c = NULL, *d = NULL, *e = NULL, *f = NULL;
2016 int i, j, rc = 0;
2017 int p0[] = { 163, 7, 6, 3, 0, -1 }; 2022 int p0[] = { 163, 7, 6, 3, 0, -1 };
2018 int p1[] = { 193, 15, 0, -1 }; 2023 int p1[] = { 193, 15, 0, -1 };
2024 int i, j;
2025 int rc = 0;
2019 2026
2020 if ((a = BN_new()) == NULL) 2027 if ((a = BN_new()) == NULL)
2021 goto err; 2028 goto err;
@@ -2077,9 +2084,10 @@ int
2077test_gf2m_mod_solve_quad(BIO *bp, BN_CTX *ctx) 2084test_gf2m_mod_solve_quad(BIO *bp, BN_CTX *ctx)
2078{ 2085{
2079 BIGNUM *a = NULL, *b[2] = { 0 }, *c = NULL, *d = NULL, *e = NULL; 2086 BIGNUM *a = NULL, *b[2] = { 0 }, *c = NULL, *d = NULL, *e = NULL;
2080 int i, j, s = 0, t, rc = 0;
2081 int p0[] = { 163, 7, 6, 3, 0, -1 }; 2087 int p0[] = { 163, 7, 6, 3, 0, -1 };
2082 int p1[] = { 193, 15, 0, -1 }; 2088 int p1[] = { 193, 15, 0, -1 };
2089 int i, j, s = 0, t;
2090 int rc = 0;
2083 2091
2084 if ((a = BN_new()) == NULL) 2092 if ((a = BN_new()) == NULL)
2085 goto err; 2093 goto err;