Change all instances of OPENSSL_NO_DEPRECATED to OPENSSL_USE_DEPRECATED
Introduce use of DECLARE_DEPRECATED Reviewed-by: Rich Salz <rsalz@openssl.org>
This commit is contained in:
parent
5bafb04d2e
commit
53e95716f5
@ -70,7 +70,7 @@
|
||||
#include <openssl/symhacks.h>
|
||||
|
||||
#include <openssl/ossl_typ.h>
|
||||
#ifndef OPENSSL_NO_DEPRECATED
|
||||
#ifdef OPENSSL_USE_DEPRECATED
|
||||
#include <openssl/bn.h>
|
||||
#endif
|
||||
|
||||
|
@ -263,13 +263,13 @@ extern "C" {
|
||||
* BN_mod_inverse() will call BN_mod_inverse_no_branch.
|
||||
*/
|
||||
|
||||
#ifndef OPENSSL_NO_DEPRECATED
|
||||
#ifdef OPENSSL_USE_DEPRECATED
|
||||
#define BN_FLG_EXP_CONSTTIME BN_FLG_CONSTTIME /* deprecated name for the flag */
|
||||
/* avoid leaking exponent information through timings
|
||||
* (BN_mod_exp_mont() will call BN_mod_exp_mont_consttime) */
|
||||
#endif
|
||||
|
||||
#ifndef OPENSSL_NO_DEPRECATED
|
||||
#ifdef OPENSSL_USE_DEPRECATED
|
||||
#define BN_FLG_FREE 0x8000 /* used for debuging */
|
||||
#endif
|
||||
|
||||
@ -342,7 +342,7 @@ int BN_is_odd(const BIGNUM *a);
|
||||
|
||||
void BN_zero_ex(BIGNUM *a);
|
||||
|
||||
#ifdef OPENSSL_NO_DEPRECATED
|
||||
#ifndef OPENSSL_USE_DEPRECATED
|
||||
#define BN_zero(a) BN_zero_ex(a)
|
||||
#else
|
||||
#define BN_zero(a) (BN_set_word((a),0))
|
||||
@ -464,17 +464,17 @@ BIGNUM *BN_mod_sqrt(BIGNUM *ret,
|
||||
void BN_consttime_swap(BN_ULONG swap, BIGNUM *a, BIGNUM *b, int nwords);
|
||||
|
||||
/* Deprecated versions */
|
||||
#ifndef OPENSSL_NO_DEPRECATED
|
||||
BIGNUM *BN_generate_prime(BIGNUM *ret,int bits,int safe,
|
||||
#ifdef OPENSSL_USE_DEPRECATED
|
||||
DECLARE_DEPRECATED(BIGNUM *BN_generate_prime(BIGNUM *ret,int bits,int safe,
|
||||
const BIGNUM *add, const BIGNUM *rem,
|
||||
void (*callback)(int,int,void *),void *cb_arg);
|
||||
int BN_is_prime(const BIGNUM *p,int nchecks,
|
||||
void (*callback)(int,int,void *),void *cb_arg));
|
||||
DECLARE_DEPRECATED(int BN_is_prime(const BIGNUM *p,int nchecks,
|
||||
void (*callback)(int,int,void *),
|
||||
BN_CTX *ctx,void *cb_arg);
|
||||
int BN_is_prime_fasttest(const BIGNUM *p,int nchecks,
|
||||
BN_CTX *ctx,void *cb_arg));
|
||||
DECLARE_DEPRECATED(int BN_is_prime_fasttest(const BIGNUM *p,int nchecks,
|
||||
void (*callback)(int,int,void *),BN_CTX *ctx,void *cb_arg,
|
||||
int do_trial_division);
|
||||
#endif /* !defined(OPENSSL_NO_DEPRECATED) */
|
||||
int do_trial_division));
|
||||
#endif /* defined(OPENSSL_USE_DEPRECATED) */
|
||||
|
||||
/* Newer versions */
|
||||
int BN_generate_prime_ex(BIGNUM *ret,int bits,int safe, const BIGNUM *add,
|
||||
@ -517,9 +517,9 @@ int BN_BLINDING_convert(BIGNUM *n, BN_BLINDING *b, BN_CTX *ctx);
|
||||
int BN_BLINDING_invert(BIGNUM *n, BN_BLINDING *b, BN_CTX *ctx);
|
||||
int BN_BLINDING_convert_ex(BIGNUM *n, BIGNUM *r, BN_BLINDING *b, BN_CTX *);
|
||||
int BN_BLINDING_invert_ex(BIGNUM *n, const BIGNUM *r, BN_BLINDING *b, BN_CTX *);
|
||||
#ifndef OPENSSL_NO_DEPRECATED
|
||||
unsigned long BN_BLINDING_get_thread_id(const BN_BLINDING *);
|
||||
void BN_BLINDING_set_thread_id(BN_BLINDING *, unsigned long);
|
||||
#ifdef OPENSSL_USE_DEPRECATED
|
||||
DECLARE_DEPRECATED(unsigned long BN_BLINDING_get_thread_id(const BN_BLINDING *));
|
||||
DECLARE_DEPRECATED(void BN_BLINDING_set_thread_id(BN_BLINDING *, unsigned long));
|
||||
#endif
|
||||
CRYPTO_THREADID *BN_BLINDING_thread_id(BN_BLINDING *);
|
||||
unsigned long BN_BLINDING_get_flags(const BN_BLINDING *);
|
||||
@ -530,9 +530,9 @@ BN_BLINDING *BN_BLINDING_create_param(BN_BLINDING *b,
|
||||
const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx),
|
||||
BN_MONT_CTX *m_ctx);
|
||||
|
||||
#ifndef OPENSSL_NO_DEPRECATED
|
||||
void BN_set_params(int mul,int high,int low,int mont);
|
||||
int BN_get_params(int which); /* 0, mul, 1 high, 2 low, 3 mont */
|
||||
#ifdef OPENSSL_USE_DEPRECATED
|
||||
DECLARE_DEPRECATED(void BN_set_params(int mul,int high,int low,int mont));
|
||||
DECLARE_DEPRECATED(int BN_get_params(int which)); /* 0, mul, 1 high, 2 low, 3 mont */
|
||||
#endif
|
||||
|
||||
BN_RECP_CTX *BN_RECP_CTX_new(void);
|
||||
|
@ -442,10 +442,14 @@ void CRYPTO_THREADID_current(CRYPTO_THREADID *id);
|
||||
int CRYPTO_THREADID_cmp(const CRYPTO_THREADID *a, const CRYPTO_THREADID *b);
|
||||
void CRYPTO_THREADID_cpy(CRYPTO_THREADID *dest, const CRYPTO_THREADID *src);
|
||||
unsigned long CRYPTO_THREADID_hash(const CRYPTO_THREADID *id);
|
||||
#ifndef OPENSSL_NO_DEPRECATED
|
||||
void CRYPTO_set_id_callback(unsigned long (*func)(void));
|
||||
#ifdef OPENSSL_USE_DEPRECATED
|
||||
DECLARE_DEPRECATED(void CRYPTO_set_id_callback(unsigned long (*func)(void)));
|
||||
/*
|
||||
* mkdef.pl cannot handle this next one so not inside DECLARE_DEPRECATED,
|
||||
* but still inside OPENSSL_USE_DEPRECATED
|
||||
*/
|
||||
unsigned long (*CRYPTO_get_id_callback(void))(void);
|
||||
unsigned long CRYPTO_thread_id(void);
|
||||
DECLARE_DEPRECATED(unsigned long CRYPTO_thread_id(void));
|
||||
#endif
|
||||
|
||||
const char *CRYPTO_get_lock_name(int type);
|
||||
|
@ -69,7 +69,7 @@
|
||||
#include <openssl/bio.h>
|
||||
#endif
|
||||
#include <openssl/ossl_typ.h>
|
||||
#ifndef OPENSSL_NO_DEPRECATED
|
||||
#ifdef OPENSSL_USE_DEPRECATED
|
||||
#include <openssl/bn.h>
|
||||
#endif
|
||||
|
||||
@ -204,10 +204,10 @@ int DH_set_ex_data(DH *d, int idx, void *arg);
|
||||
void *DH_get_ex_data(DH *d, int idx);
|
||||
|
||||
/* Deprecated version */
|
||||
#ifndef OPENSSL_NO_DEPRECATED
|
||||
DH * DH_generate_parameters(int prime_len,int generator,
|
||||
void (*callback)(int,int,void *),void *cb_arg);
|
||||
#endif /* !defined(OPENSSL_NO_DEPRECATED) */
|
||||
#ifdef OPENSSL_USE_DEPRECATED
|
||||
DECLARE_DEPRECATED(DH * DH_generate_parameters(int prime_len,int generator,
|
||||
void (*callback)(int,int,void *),void *cb_arg));
|
||||
#endif /* defined(OPENSSL_USE_DEPRECATED) */
|
||||
|
||||
/* New version */
|
||||
int DH_generate_parameters_ex(DH *dh, int prime_len,int generator, BN_GENCB *cb);
|
||||
|
@ -77,7 +77,7 @@
|
||||
#include <openssl/crypto.h>
|
||||
#include <openssl/ossl_typ.h>
|
||||
|
||||
#ifndef OPENSSL_NO_DEPRECATED
|
||||
#ifdef OPENSSL_USE_DEPRECATED
|
||||
#include <openssl/bn.h>
|
||||
#ifndef OPENSSL_NO_DH
|
||||
# include <openssl/dh.h>
|
||||
@ -236,12 +236,12 @@ DSA * d2i_DSAPrivateKey(DSA **a, const unsigned char **pp, long length);
|
||||
DSA * d2i_DSAparams(DSA **a, const unsigned char **pp, long length);
|
||||
|
||||
/* Deprecated version */
|
||||
#ifndef OPENSSL_NO_DEPRECATED
|
||||
DSA * DSA_generate_parameters(int bits,
|
||||
#ifdef OPENSSL_USE_DEPRECATED
|
||||
DECLARE_DEPRECATED(DSA * DSA_generate_parameters(int bits,
|
||||
unsigned char *seed,int seed_len,
|
||||
int *counter_ret, unsigned long *h_ret,void
|
||||
(*callback)(int, int, void *),void *cb_arg);
|
||||
#endif /* !defined(OPENSSL_NO_DEPRECATED) */
|
||||
(*callback)(int, int, void *),void *cb_arg));
|
||||
#endif /* defined(OPENSSL_USE_DEPRECATED) */
|
||||
|
||||
/* New version */
|
||||
int DSA_generate_parameters_ex(DSA *dsa, int bits,
|
||||
|
@ -84,7 +84,7 @@
|
||||
|
||||
#include <openssl/asn1.h>
|
||||
#include <openssl/symhacks.h>
|
||||
#ifndef OPENSSL_NO_DEPRECATED
|
||||
#ifdef OPENSSL_USE_DEPRECATED
|
||||
#include <openssl/bn.h>
|
||||
#endif
|
||||
|
||||
|
@ -77,7 +77,7 @@
|
||||
|
||||
#include <openssl/ec.h>
|
||||
#include <openssl/ossl_typ.h>
|
||||
#ifndef OPENSSL_NO_DEPRECATED
|
||||
#ifdef OPENSSL_USE_DEPRECATED
|
||||
#include <openssl/bn.h>
|
||||
#endif
|
||||
|
||||
|
@ -67,7 +67,7 @@
|
||||
|
||||
#include <openssl/ec.h>
|
||||
#include <openssl/ossl_typ.h>
|
||||
#ifndef OPENSSL_NO_DEPRECATED
|
||||
#ifdef OPENSSL_USE_DEPRECATED
|
||||
#include <openssl/bn.h>
|
||||
#endif
|
||||
|
||||
|
@ -70,7 +70,7 @@
|
||||
#error ENGINE is disabled.
|
||||
#endif
|
||||
|
||||
#ifndef OPENSSL_NO_DEPRECATED
|
||||
#ifdef OPENSSL_USE_DEPRECATED
|
||||
#include <openssl/bn.h>
|
||||
#ifndef OPENSSL_NO_RSA
|
||||
#include <openssl/rsa.h>
|
||||
|
@ -354,8 +354,8 @@ void ERR_load_crypto_strings(void);
|
||||
void ERR_free_strings(void);
|
||||
|
||||
void ERR_remove_thread_state(const CRYPTO_THREADID *tid);
|
||||
#ifndef OPENSSL_NO_DEPRECATED
|
||||
void ERR_remove_state(unsigned long pid); /* if zero we look it up */
|
||||
#ifdef OPENSSL_USE_DEPRECATED
|
||||
DECLARE_DEPRECATED(void ERR_remove_state(unsigned long pid)); /* if zero we look it up */
|
||||
#endif
|
||||
ERR_STATE *ERR_get_state(void);
|
||||
|
||||
|
@ -66,7 +66,7 @@
|
||||
#endif
|
||||
#include <openssl/crypto.h>
|
||||
#include <openssl/ossl_typ.h>
|
||||
#ifndef OPENSSL_NO_DEPRECATED
|
||||
#ifdef OPENSSL_USE_DEPRECATED
|
||||
#include <openssl/bn.h>
|
||||
#endif
|
||||
|
||||
@ -208,7 +208,7 @@ struct rsa_st
|
||||
* operations and results in faster RSA
|
||||
* private key operations.
|
||||
*/
|
||||
#ifndef OPENSSL_NO_DEPRECATED
|
||||
#ifdef OPENSSL_USE_DEPRECATED
|
||||
#define RSA_FLAG_NO_EXP_CONSTTIME RSA_FLAG_NO_CONSTTIME /* deprecated name for the flag*/
|
||||
/* new with 0.9.7h; the built-in RSA
|
||||
* implementation now uses constant time
|
||||
@ -310,10 +310,10 @@ int RSA_size(const RSA *rsa);
|
||||
int RSA_security_bits(const RSA *rsa);
|
||||
|
||||
/* Deprecated version */
|
||||
#ifndef OPENSSL_NO_DEPRECATED
|
||||
RSA * RSA_generate_key(int bits, unsigned long e,void
|
||||
(*callback)(int,int,void *),void *cb_arg);
|
||||
#endif /* !defined(OPENSSL_NO_DEPRECATED) */
|
||||
#ifdef OPENSSL_USE_DEPRECATED
|
||||
DECLARE_DEPRECATED(RSA * RSA_generate_key(int bits, unsigned long e,void
|
||||
(*callback)(int,int,void *),void *cb_arg));
|
||||
#endif /* defined(OPENSSL_USE_DEPRECATED) */
|
||||
|
||||
/* New version */
|
||||
int RSA_generate_key_ex(RSA *rsa, int bits, BIGNUM *e, BN_GENCB *cb);
|
||||
|
@ -66,7 +66,7 @@
|
||||
#endif
|
||||
|
||||
#include <openssl/ossl_typ.h>
|
||||
#ifndef OPENSSL_NO_DEPRECATED
|
||||
#ifdef OPENSSL_USE_DEPRECATED
|
||||
#include <openssl/evp.h>
|
||||
#include <openssl/bn.h>
|
||||
#include <openssl/x509.h>
|
||||
|
@ -59,7 +59,7 @@
|
||||
#ifndef HEADER_UI_H
|
||||
#define HEADER_UI_H
|
||||
|
||||
#ifndef OPENSSL_NO_DEPRECATED
|
||||
#ifdef OPENSSL_USE_DEPRECATED
|
||||
#include <openssl/crypto.h>
|
||||
#endif
|
||||
#include <openssl/safestack.h>
|
||||
|
@ -91,7 +91,7 @@
|
||||
#include <openssl/ecdh.h>
|
||||
#endif
|
||||
|
||||
#ifndef OPENSSL_NO_DEPRECATED
|
||||
#ifdef OPENSSL_USE_DEPRECATED
|
||||
#ifndef OPENSSL_NO_RSA
|
||||
#include <openssl/rsa.h>
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user