summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjsing <>2022-11-23 02:20:27 +0000
committerjsing <>2022-11-23 02:20:27 +0000
commit447de170d86e9b86dca57574fb275896187d76d1 (patch)
treeb501d3c08d29746b6861a362deb6f2b8ceafcd69 /src
parent429da67d96a9ca12d121a7190aa504d0cd1fd7cc (diff)
downloadopenbsd-447de170d86e9b86dca57574fb275896187d76d1.tar.gz
openbsd-447de170d86e9b86dca57574fb275896187d76d1.tar.bz2
openbsd-447de170d86e9b86dca57574fb275896187d76d1.zip
Move #ifndef OPENSSL_NO_DEPRECATED.
The BN_set_params()/BN_get_params() and associated unused variables are meant to be in this block, not things like BN_new() and BN_free(). ok tb@
Diffstat (limited to 'src')
-rw-r--r--src/lib/libcrypto/bn/bn_lib.c42
1 files changed, 21 insertions, 21 deletions
diff --git a/src/lib/libcrypto/bn/bn_lib.c b/src/lib/libcrypto/bn/bn_lib.c
index 599a744822..e3d5cd7ade 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.54 2022/06/27 12:25:49 tb Exp $ */ 1/* $OpenBSD: bn_lib.c,v 1.55 2022/11/23 02:20:27 jsing 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 *
@@ -72,26 +72,6 @@
72 72
73#include "bn_lcl.h" 73#include "bn_lcl.h"
74 74
75/* This stuff appears to be completely unused, so is deprecated */
76#ifndef OPENSSL_NO_DEPRECATED
77/* For a 32 bit machine
78 * 2 - 4 == 128
79 * 3 - 8 == 256
80 * 4 - 16 == 512
81 * 5 - 32 == 1024
82 * 6 - 64 == 2048
83 * 7 - 128 == 4096
84 * 8 - 256 == 8192
85 */
86static int bn_limit_bits = 0;
87static int bn_limit_num = 8; /* (1<<bn_limit_bits) */
88static int bn_limit_bits_low = 0;
89static int bn_limit_num_low = 8; /* (1<<bn_limit_bits_low) */
90static int bn_limit_bits_high = 0;
91static int bn_limit_num_high = 8; /* (1<<bn_limit_bits_high) */
92static int bn_limit_bits_mont = 0;
93static int bn_limit_num_mont = 8; /* (1<<bn_limit_bits_mont) */
94
95BIGNUM * 75BIGNUM *
96BN_new(void) 76BN_new(void)
97{ 77{
@@ -149,6 +129,26 @@ BN_free(BIGNUM *a)
149 BN_clear_free(a); 129 BN_clear_free(a);
150} 130}
151 131
132/* This stuff appears to be completely unused, so is deprecated */
133#ifndef OPENSSL_NO_DEPRECATED
134/* For a 32 bit machine
135 * 2 - 4 == 128
136 * 3 - 8 == 256
137 * 4 - 16 == 512
138 * 5 - 32 == 1024
139 * 6 - 64 == 2048
140 * 7 - 128 == 4096
141 * 8 - 256 == 8192
142 */
143static int bn_limit_bits = 0;
144static int bn_limit_num = 8; /* (1<<bn_limit_bits) */
145static int bn_limit_bits_low = 0;
146static int bn_limit_num_low = 8; /* (1<<bn_limit_bits_low) */
147static int bn_limit_bits_high = 0;
148static int bn_limit_num_high = 8; /* (1<<bn_limit_bits_high) */
149static int bn_limit_bits_mont = 0;
150static int bn_limit_num_mont = 8; /* (1<<bn_limit_bits_mont) */
151
152void 152void
153BN_set_params(int mult, int high, int low, int mont) 153BN_set_params(int mult, int high, int low, int mont)
154{ 154{