From b51b96fb8e2e7b9cefac77dd8f6566e31a19a9a8 Mon Sep 17 00:00:00 2001 From: tb <> Date: Sat, 4 Dec 2021 16:02:44 +0000 Subject: Implement the BN_is_negative macro as a function ok inoguchi jsing --- src/lib/libcrypto/bn/bn_lib.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/lib/libcrypto/bn/bn_lib.c') diff --git a/src/lib/libcrypto/bn/bn_lib.c b/src/lib/libcrypto/bn/bn_lib.c index 77ee3b1fdc..2544722ea9 100644 --- a/src/lib/libcrypto/bn/bn_lib.c +++ b/src/lib/libcrypto/bn/bn_lib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bn_lib.c,v 1.51 2021/12/04 15:59:52 tb Exp $ */ +/* $OpenBSD: bn_lib.c,v 1.52 2021/12/04 16:02:44 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -1099,6 +1099,12 @@ BN_is_odd(const BIGNUM *a) return a->top > 0 && (a->d[0] & 1); } +int +BN_is_negative(const BIGNUM *a) +{ + return a->neg != 0; +} + BN_GENCB * BN_GENCB_new(void) { -- cgit v1.2.3-55-g6feb