diff options
| author | tb <> | 2021-12-04 16:02:44 +0000 |
|---|---|---|
| committer | tb <> | 2021-12-04 16:02:44 +0000 |
| commit | c4cc32b24a7a10ab2763bb6be4d835b32e6aa4b1 (patch) | |
| tree | e69efe0002805e09d6a9a57be55ef27e4d28eb49 /src/lib/libcrypto/bn/bn_lib.c | |
| parent | 351ab4c8a19a3e680ec610b0d6fb491fc26ffe0b (diff) | |
| download | openbsd-c4cc32b24a7a10ab2763bb6be4d835b32e6aa4b1.tar.gz openbsd-c4cc32b24a7a10ab2763bb6be4d835b32e6aa4b1.tar.bz2 openbsd-c4cc32b24a7a10ab2763bb6be4d835b32e6aa4b1.zip | |
Implement the BN_is_negative macro as a function
ok inoguchi jsing
Diffstat (limited to 'src/lib/libcrypto/bn/bn_lib.c')
| -rw-r--r-- | src/lib/libcrypto/bn/bn_lib.c | 8 |
1 files changed, 7 insertions, 1 deletions
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 @@ | |||
| 1 | /* $OpenBSD: bn_lib.c,v 1.51 2021/12/04 15:59:52 tb Exp $ */ | 1 | /* $OpenBSD: bn_lib.c,v 1.52 2021/12/04 16:02:44 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 | * |
| @@ -1099,6 +1099,12 @@ BN_is_odd(const BIGNUM *a) | |||
| 1099 | return a->top > 0 && (a->d[0] & 1); | 1099 | return a->top > 0 && (a->d[0] & 1); |
| 1100 | } | 1100 | } |
| 1101 | 1101 | ||
| 1102 | int | ||
| 1103 | BN_is_negative(const BIGNUM *a) | ||
| 1104 | { | ||
| 1105 | return a->neg != 0; | ||
| 1106 | } | ||
| 1107 | |||
| 1102 | BN_GENCB * | 1108 | BN_GENCB * |
| 1103 | BN_GENCB_new(void) | 1109 | BN_GENCB_new(void) |
| 1104 | { | 1110 | { |
