summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/bn/bn_primitives.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/bn/bn_primitives.c')
-rw-r--r--src/lib/libcrypto/bn/bn_primitives.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/libcrypto/bn/bn_primitives.c b/src/lib/libcrypto/bn/bn_primitives.c
index e9caec4818..66427a9046 100644
--- a/src/lib/libcrypto/bn/bn_primitives.c
+++ b/src/lib/libcrypto/bn/bn_primitives.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bn_primitives.c,v 1.1 2023/06/21 07:41:55 jsing Exp $ */ 1/* $OpenBSD: bn_primitives.c,v 1.2 2023/06/21 07:48:41 jsing Exp $ */
2/* 2/*
3 * Copyright (c) 2023 Joel Sing <jsing@openbsd.org> 3 * Copyright (c) 2023 Joel Sing <jsing@openbsd.org>
4 * 4 *
@@ -21,6 +21,7 @@
21#include "bn_internal.h" 21#include "bn_internal.h"
22#include "bn_local.h" 22#include "bn_local.h"
23 23
24#ifndef HAVE_BN_CLZW
24#ifndef HAVE_BN_WORD_CLZ 25#ifndef HAVE_BN_WORD_CLZ
25int 26int
26bn_word_clz(BN_ULONG w) 27bn_word_clz(BN_ULONG w)
@@ -41,6 +42,7 @@ bn_word_clz(BN_ULONG w)
41 return BN_BITS2 - bits; 42 return BN_BITS2 - bits;
42} 43}
43#endif 44#endif
45#endif
44 46
45#ifndef HAVE_BN_BITSIZE 47#ifndef HAVE_BN_BITSIZE
46int 48int
@@ -58,6 +60,6 @@ bn_bitsize(const BIGNUM *bn)
58 i++; 60 i++;
59 } 61 }
60 62
61 return (n + 1) * BN_BITS2 - bn_word_clz(x); 63 return (n + 1) * BN_BITS2 - bn_clzw(x);
62} 64}
63#endif 65#endif