From 375cac0c809d6a3c4cb1c9eca9ef8fd1a0ee750a Mon Sep 17 00:00:00 2001 From: tb Date: Tue, 12 Jul 2022 16:08:19 +0000 Subject: [PATCH] Move BN_lsw() to bn_lcl.h so that other code can use it. ok jsing --- lib/libcrypto/bn/bn_kron.c | 5 +---- lib/libcrypto/bn/bn_lcl.h | 5 ++++- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/libcrypto/bn/bn_kron.c b/lib/libcrypto/bn/bn_kron.c index 15033ff9dbf..998adedcd85 100644 --- a/lib/libcrypto/bn/bn_kron.c +++ b/lib/libcrypto/bn/bn_kron.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bn_kron.c,v 1.9 2022/06/20 19:42:58 tb Exp $ */ +/* $OpenBSD: bn_kron.c,v 1.10 2022/07/12 16:08:19 tb Exp $ */ /* ==================================================================== * Copyright (c) 1998-2000 The OpenSSL Project. All rights reserved. * @@ -55,9 +55,6 @@ #include "bn_lcl.h" -/* The least significant word of a BIGNUM. */ -#define BN_lsw(n) (((n)->top == 0) ? (BN_ULONG) 0 : (n)->d[0]) - /* * Kronecker symbol, implemented according to Henri Cohen, "A Course in * Computational Algebraic Number Theory", Algorithm 1.4.10. diff --git a/lib/libcrypto/bn/bn_lcl.h b/lib/libcrypto/bn/bn_lcl.h index d8c9e20f402..91ce5951e51 100644 --- a/lib/libcrypto/bn/bn_lcl.h +++ b/lib/libcrypto/bn/bn_lcl.h @@ -1,4 +1,4 @@ -/* $OpenBSD: bn_lcl.h,v 1.31 2022/01/14 08:01:47 tb Exp $ */ +/* $OpenBSD: bn_lcl.h,v 1.32 2022/07/12 16:08:19 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -493,6 +493,9 @@ struct bn_gencb_st { } #endif /* !BN_LLONG */ +/* The least significant word of a BIGNUM. */ +#define BN_lsw(n) (((n)->top == 0) ? (BN_ULONG) 0 : (n)->d[0]) + void bn_mul_normal(BN_ULONG *r, BN_ULONG *a, int na, BN_ULONG *b, int nb); void bn_mul_comba8(BN_ULONG *r, BN_ULONG *a, BN_ULONG *b); void bn_mul_comba4(BN_ULONG *r, BN_ULONG *a, BN_ULONG *b); -- 2.20.1