summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authortb <>2023-04-16 09:08:20 +0000
committertb <>2023-04-16 09:08:20 +0000
commit5395426626260fbe486c8cc65ba8222305ecc71e (patch)
treef76bf7bd4fde6d0c9420d8bc73f654f55b7568f7 /src/lib
parentb0586cdb4979567771d97bea702186303fc94d64 (diff)
downloadopenbsd-5395426626260fbe486c8cc65ba8222305ecc71e.tar.gz
openbsd-5395426626260fbe486c8cc65ba8222305ecc71e.tar.bz2
openbsd-5395426626260fbe486c8cc65ba8222305ecc71e.zip
Various BN*init() will be removed from the public API
With the corresponding structs now being opaque, the only thing they are good for outside the library are memory leaks. They will be removed completely or become internal only. ok jsing
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/libcrypto/bn/bn.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/lib/libcrypto/bn/bn.h b/src/lib/libcrypto/bn/bn.h
index d6f77288c1..e090c46696 100644
--- a/src/lib/libcrypto/bn/bn.h
+++ b/src/lib/libcrypto/bn/bn.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: bn.h,v 1.58 2023/04/16 08:55:44 tb Exp $ */ 1/* $OpenBSD: bn.h,v 1.59 2023/04/16 09:08:20 tb Exp $ */
2/* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -348,8 +348,11 @@ const BIGNUM *BN_value_one(void);
348char * BN_options(void); 348char * BN_options(void);
349BN_CTX *BN_CTX_new(void); 349BN_CTX *BN_CTX_new(void);
350#ifndef OPENSSL_NO_DEPRECATED 350#ifndef OPENSSL_NO_DEPRECATED
351/* Remove in next major bump. */
352#if !defined(LIBRESSL_NEXT_API) || defined(LIBRESSL_INTERNAL)
351void BN_CTX_init(BN_CTX *c); 353void BN_CTX_init(BN_CTX *c);
352#endif 354#endif
355#endif
353void BN_CTX_free(BN_CTX *c); 356void BN_CTX_free(BN_CTX *c);
354void BN_CTX_start(BN_CTX *ctx); 357void BN_CTX_start(BN_CTX *ctx);
355BIGNUM *BN_CTX_get(BN_CTX *ctx); 358BIGNUM *BN_CTX_get(BN_CTX *ctx);
@@ -361,7 +364,10 @@ int BN_pseudo_rand_range(BIGNUM *rnd, const BIGNUM *range);
361int BN_num_bits(const BIGNUM *a); 364int BN_num_bits(const BIGNUM *a);
362int BN_num_bits_word(BN_ULONG); 365int BN_num_bits_word(BN_ULONG);
363BIGNUM *BN_new(void); 366BIGNUM *BN_new(void);
367/* Move to bn_local.h in the next major bump. */
368#if !defined(LIBRESSL_NEXT_API) || defined(LIBRESSL_INTERNAL)
364void BN_init(BIGNUM *); 369void BN_init(BIGNUM *);
370#endif
365void BN_clear_free(BIGNUM *a); 371void BN_clear_free(BIGNUM *a);
366BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b); 372BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b);
367void BN_swap(BIGNUM *a, BIGNUM *b); 373void BN_swap(BIGNUM *a, BIGNUM *b);
@@ -498,7 +504,10 @@ int BN_X931_generate_prime_ex(BIGNUM *p, BIGNUM *p1, BIGNUM *p2,
498 BN_GENCB *cb); 504 BN_GENCB *cb);
499 505
500BN_MONT_CTX *BN_MONT_CTX_new(void ); 506BN_MONT_CTX *BN_MONT_CTX_new(void );
507/* Remove in next major bump. */
508#if !defined(LIBRESSL_NEXT_API) || defined(LIBRESSL_INTERNAL)
501void BN_MONT_CTX_init(BN_MONT_CTX *ctx); 509void BN_MONT_CTX_init(BN_MONT_CTX *ctx);
510#endif
502int BN_mod_mul_montgomery(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, 511int BN_mod_mul_montgomery(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
503 BN_MONT_CTX *mont, BN_CTX *ctx); 512 BN_MONT_CTX *mont, BN_CTX *ctx);
504int BN_to_montgomery(BIGNUM *r, const BIGNUM *a, BN_MONT_CTX *mont, 513int BN_to_montgomery(BIGNUM *r, const BIGNUM *a, BN_MONT_CTX *mont,