-/* $OpenBSD: bn_exp.c,v 1.45 2023/03/30 14:21:10 tb Exp $ */
+/* $OpenBSD: bn_exp.c,v 1.46 2023/05/09 05:38:11 tb Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
bits = BN_num_bits(p);
if (bits == 0) {
/* x**0 mod 1 is still zero. */
- if (BN_is_one(m)) {
+ if (BN_abs_is_word(m, 1)) {
ret = 1;
BN_zero(r);
} else
bits = BN_num_bits(p);
if (bits == 0) {
/* x**0 mod 1 is still zero. */
- if (BN_is_one(m)) {
+ if (BN_abs_is_word(m, 1)) {
ret = 1;
BN_zero(rr);
} else
bits = BN_num_bits(p);
if (bits == 0) {
/* x**0 mod 1 is still zero. */
- if (BN_is_one(m)) {
+ if (BN_abs_is_word(m, 1)) {
ret = 1;
BN_zero(rr);
} else
bits = BN_num_bits(p);
if (bits == 0) {
/* x**0 mod 1 is still zero. */
- if (BN_is_one(m)) {
+ if (BN_abs_is_word(m, 1)) {
ret = 1;
BN_zero(rr);
} else
bits = BN_num_bits(p);
if (bits == 0) {
/* x**0 mod 1 is still zero. */
- if (BN_is_one(m)) {
+ if (BN_abs_is_word(m, 1)) {
ret = 1;
BN_zero(r);
} else