提交 1a5adcfb 编写于 作者: R Rich Salz

"#if 0" removal: header files

Remove all "#if 0" blocks from header files.
Reviewed-by: NTim Hudson <tjh@openssl.org>
上级 63c574f6
......@@ -114,13 +114,6 @@ void AES_cfb8_encrypt(const unsigned char *in, unsigned char *out,
void AES_ofb128_encrypt(const unsigned char *in, unsigned char *out,
size_t length, const AES_KEY *key,
unsigned char *ivec, int *num);
# if 0
void AES_ctr128_encrypt(const unsigned char *in, unsigned char *out,
size_t length, const AES_KEY *key,
unsigned char ivec[AES_BLOCK_SIZE],
unsigned char ecount_buf[AES_BLOCK_SIZE],
unsigned int *num);
# endif
/* NB: the IV is _two_ blocks long */
void AES_ige_encrypt(const unsigned char *in, unsigned char *out,
size_t length, const AES_KEY *key,
......
......@@ -851,9 +851,6 @@ ASN1_UTCTIME *ASN1_UTCTIME_adj(ASN1_UTCTIME *s, time_t t,
int offset_day, long offset_sec);
int ASN1_UTCTIME_set_string(ASN1_UTCTIME *s, const char *str);
int ASN1_UTCTIME_cmp_time_t(const ASN1_UTCTIME *s, time_t t);
# if 0
time_t ASN1_UTCTIME_get(const ASN1_UTCTIME *s);
# endif
int ASN1_GENERALIZEDTIME_check(const ASN1_GENERALIZEDTIME *a);
ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_set(ASN1_GENERALIZEDTIME *s,
......
......@@ -292,17 +292,6 @@ int BN_get_flags(const BIGNUM *b, int n);
*/
void BN_with_flags(BIGNUM *dest, const BIGNUM *b, int n);
/* Already declared in ossl_typ.h */
# if 0
typedef struct bignum_st BIGNUM;
/* Used for temp variables (declaration hidden in bn_lcl.h) */
typedef struct bignum_ctx BN_CTX;
typedef struct bn_blinding_st BN_BLINDING;
typedef struct bn_mont_ctx_st BN_MONT_CTX;
typedef struct bn_recp_ctx_st BN_RECP_CTX;
typedef struct bn_gencb_st BN_GENCB;
# endif
/* Wrapper function to make using BN_GENCB easier, */
int BN_GENCB_call(BN_GENCB *cb, int a, int b);
......
......@@ -153,10 +153,6 @@ struct conf_st {
CONF *NCONF_new(CONF_METHOD *meth);
CONF_METHOD *NCONF_default(void);
CONF_METHOD *NCONF_WIN32(void);
# if 0 /* Just to give you an idea of what I have in
* mind */
CONF_METHOD *NCONF_XML(void);
# endif
void NCONF_free(CONF *conf);
void NCONF_free_data(CONF *conf);
......@@ -173,12 +169,7 @@ int NCONF_get_number_e(const CONF *conf, const char *group, const char *name,
int NCONF_dump_fp(const CONF *conf, FILE *out);
int NCONF_dump_bio(const CONF *conf, BIO *out);
# if 0 /* The following function has no error
* checking, and should therefore be avoided */
long NCONF_get_number(CONF *conf, char *group, char *name);
# else
# define NCONF_get_number(c,g,n,r) NCONF_get_number_e(c,g,n,r)
# endif
#define NCONF_get_number(c,g,n,r) NCONF_get_number_e(c,g,n,r)
/* Module functions */
......
......@@ -158,20 +158,6 @@ extern "C" {
# define SSLEAY_PLATFORM 4
# define SSLEAY_DIR 5
/* Already declared in ossl_typ.h */
# if 0
typedef struct crypto_ex_data_st CRYPTO_EX_DATA;
/* Called when a new object is created */
typedef int CRYPTO_EX_new (void *parent, void *ptr, CRYPTO_EX_DATA *ad,
int idx, long argl, void *argp);
/* Called when an object is free()ed */
typedef void CRYPTO_EX_free (void *parent, void *ptr, CRYPTO_EX_DATA *ad,
int idx, long argl, void *argp);
/* Called when we need to dup an object */
typedef int CRYPTO_EX_dup (CRYPTO_EX_DATA *to, CRYPTO_EX_DATA *from,
void *from_d, int idx, long argl, void *argp);
# endif
/* A generic structure to pass assorted data in a expandable way */
typedef struct openssl_item_st {
int code;
......
......@@ -194,11 +194,6 @@ void DES_ede3_ofb64_encrypt(const unsigned char *in, unsigned char *out,
long length, DES_key_schedule *ks1,
DES_key_schedule *ks2, DES_key_schedule *ks3,
DES_cblock *ivec, int *num);
# if 0
void DES_xwhite_in2out(const_DES_cblock *DES_key, const_DES_cblock *in_white,
DES_cblock *out_white);
# endif
int DES_enc_read(int fd, void *buf, int len, DES_key_schedule *sched,
DES_cblock *iv);
int DES_enc_write(int fd, const void *buf, int len, DES_key_schedule *sched,
......
......@@ -175,14 +175,6 @@ typedef struct _ossl_old_des_ks_struct {
DES_enc_write((f),(b),(l),&(k),(iv))
# define des_fcrypt(b,s,r)\
DES_fcrypt((b),(s),(r))
# if 0
# define des_crypt(b,s)\
DES_crypt((b),(s))
# if !defined(PERL5) && !defined(__FreeBSD__) && !defined(__OpenBSD__)
# define crypt(b,s)\
DES_crypt((b),(s))
# endif
# endif
# define des_ofb_encrypt(i,o,n,l,k,iv)\
DES_ofb_encrypt((i),(o),(n),(l),&(k),(iv))
# define des_pcbc_encrypt(i,o,l,k,iv,e)\
......@@ -281,10 +273,6 @@ typedef struct _ossl_old_des_ks_struct {
_ossl_old_des_fcrypt((b),(s),(r))
# define des_crypt(b,s)\
_ossl_old_des_crypt((b),(s))
# if 0
# define crypt(b,s)\
_ossl_old_crypt((b),(s))
# endif
# define des_ofb_encrypt(i,o,n,l,k,iv)\
_ossl_old_des_ofb_encrypt((i),(o),(n),(l),(k),(iv))
# define des_pcbc_encrypt(i,o,l,k,iv,e)\
......@@ -392,12 +380,6 @@ void _ossl_old_des_ede3_ofb64_encrypt(unsigned char *in, unsigned char *out,
_ossl_old_des_key_schedule ks2,
_ossl_old_des_key_schedule ks3,
_ossl_old_des_cblock *ivec, int *num);
# if 0
void _ossl_old_des_xwhite_in2out(_ossl_old_des_cblock (*des_key),
_ossl_old_des_cblock (*in_white),
_ossl_old_des_cblock (*out_white));
# endif
int _ossl_old_des_enc_read(int fd, char *buf, int len,
_ossl_old_des_key_schedule sched,
_ossl_old_des_cblock *iv);
......
......@@ -157,13 +157,6 @@ typedef struct dso_meth_st {
* libraries at all, let alone a DSO_METHOD implemented for them.
*/
DSO_FUNC_TYPE (*dso_bind_func) (DSO *dso, const char *symname);
/* I don't think this would actually be used in any circumstances. */
# if 0
/* Unbinds a variable */
int (*dso_unbind_var) (DSO *dso, char *symname, void *symptr);
/* Unbinds a function */
int (*dso_unbind_func) (DSO *dso, char *symname, DSO_FUNC_TYPE symptr);
# endif
/*
* The generic (yuck) "ctrl()" function. NB: Negative return values
* (rather than zero) indicate errors.
......
......@@ -788,10 +788,6 @@ const EVP_CIPHER *EVP_des_cfb1(void);
const EVP_CIPHER *EVP_des_cfb8(void);
const EVP_CIPHER *EVP_des_ede_cfb64(void);
# define EVP_des_ede_cfb EVP_des_ede_cfb64
# if 0
const EVP_CIPHER *EVP_des_ede_cfb1(void);
const EVP_CIPHER *EVP_des_ede_cfb8(void);
# endif
const EVP_CIPHER *EVP_des_ede3_cfb64(void);
# define EVP_des_ede3_cfb EVP_des_ede3_cfb64
const EVP_CIPHER *EVP_des_ede3_cfb1(void);
......@@ -809,13 +805,6 @@ const EVP_CIPHER *EVP_des_ede3_wrap(void);
* are rc4 and md5 declarations made here inside a "NO_DES" precompiler
* branch?
*/
# if 0
# ifdef OPENSSL_OPENBSD_DEV_CRYPTO
const EVP_CIPHER *EVP_dev_crypto_des_ede3_cbc(void);
const EVP_CIPHER *EVP_dev_crypto_rc4(void);
const EVP_MD *EVP_dev_crypto_md5(void);
# endif
# endif
# endif
# ifndef OPENSSL_NO_RC4
const EVP_CIPHER *EVP_rc4(void);
......
......@@ -81,33 +81,6 @@
# undef ASN1_STRING_set_default_mask_asc
# define ASN1_STRING_set_default_mask_asc ASN1_STRING_set_def_mask_asc
# if 0 /* No longer needed, since safestack macro
* magic does the job */
/* Hack the names created with DECLARE_ASN1_SET_OF(PKCS7_SIGNER_INFO) */
# undef i2d_ASN1_SET_OF_PKCS7_SIGNER_INFO
# define i2d_ASN1_SET_OF_PKCS7_SIGNER_INFO i2d_ASN1_SET_OF_PKCS7_SIGINF
# undef d2i_ASN1_SET_OF_PKCS7_SIGNER_INFO
# define d2i_ASN1_SET_OF_PKCS7_SIGNER_INFO d2i_ASN1_SET_OF_PKCS7_SIGINF
# endif
# if 0 /* No longer needed, since safestack macro
* magic does the job */
/* Hack the names created with DECLARE_ASN1_SET_OF(PKCS7_RECIP_INFO) */
# undef i2d_ASN1_SET_OF_PKCS7_RECIP_INFO
# define i2d_ASN1_SET_OF_PKCS7_RECIP_INFO i2d_ASN1_SET_OF_PKCS7_RECINF
# undef d2i_ASN1_SET_OF_PKCS7_RECIP_INFO
# define d2i_ASN1_SET_OF_PKCS7_RECIP_INFO d2i_ASN1_SET_OF_PKCS7_RECINF
# endif
# if 0 /* No longer needed, since safestack macro
* magic does the job */
/* Hack the names created with DECLARE_ASN1_SET_OF(ACCESS_DESCRIPTION) */
# undef i2d_ASN1_SET_OF_ACCESS_DESCRIPTION
# define i2d_ASN1_SET_OF_ACCESS_DESCRIPTION i2d_ASN1_SET_OF_ACC_DESC
# undef d2i_ASN1_SET_OF_ACCESS_DESCRIPTION
# define d2i_ASN1_SET_OF_ACCESS_DESCRIPTION d2i_ASN1_SET_OF_ACC_DESC
# endif
/* Hack the names created with DECLARE_PEM_rw(NETSCAPE_CERT_SEQUENCE) */
# undef PEM_read_NETSCAPE_CERT_SEQUENCE
# define PEM_read_NETSCAPE_CERT_SEQUENCE PEM_read_NS_CERT_SEQ
......
......@@ -77,16 +77,6 @@
extern "C" {
#endif
# if 0
/* Outer object */
typedef struct x509_hash_dir_st {
int num_dirs;
char **dirs;
int *dirs_type;
int num_dirs_alloced;
} X509_HASH_DIR_CTX;
# endif
typedef struct x509_file_st {
int num_paths; /* number of paths to files or directories */
int num_alloced;
......
......@@ -92,11 +92,6 @@ extern "C" {
/* Special value for method supporting multiple versions */
# define DTLS_ANY_VERSION 0x1FFFF
# if 0
/* this alert description is not specified anywhere... */
# define DTLS1_AD_MISSING_HANDSHAKE_MESSAGE 110
# endif
/* lengths of messages */
# define DTLS1_COOKIE_LENGTH 256
......
......@@ -1026,11 +1026,6 @@ struct ssl_ctx_st {
X509_VERIFY_PARAM *param;
# if 0
int purpose; /* Purpose setting */
int trust; /* Trust setting */
# endif
int quiet_shutdown;
/*
......@@ -1464,10 +1459,6 @@ struct ssl_st {
void *msg_callback_arg;
int hit; /* reusing a previous session */
X509_VERIFY_PARAM *param;
# if 0
int purpose; /* Purpose setting */
int trust; /* Trust setting */
# endif
/* crypto */
STACK_OF(SSL_CIPHER) *cipher_list;
STACK_OF(SSL_CIPHER) *cipher_list_by_id;
......@@ -1747,14 +1738,6 @@ size_t SSL_get_peer_finished(const SSL *s, void *buf, size_t count);
# define OpenSSL_add_ssl_algorithms() SSL_library_init()
# define SSLeay_add_ssl_algorithms() SSL_library_init()
/* this is for backward compatibility */
# if 0 /* NEW_SSLEAY */
# define SSL_CTX_set_default_verify(a,b,c) SSL_CTX_set_verify(a,b,c)
# define SSL_set_pref_cipher(c,n) SSL_set_cipher_list(c,n)
# define SSL_add_session(a,b) SSL_CTX_add_session((a),(b))
# define SSL_remove_session(a,b) SSL_CTX_remove_session((a),(b))
# define SSL_flush_sessions(a,b) SSL_CTX_flush_sessions((a),(b))
# endif
/* More backward compatibility */
# define SSL_get_cipher(s) \
SSL_CIPHER_get_name(SSL_get_current_cipher(s))
......
......@@ -177,18 +177,6 @@ extern "C" {
# define SSL3_CK_ADH_DES_64_CBC_SHA 0x0300001A
# define SSL3_CK_ADH_DES_192_CBC_SHA 0x0300001B
# if 0
# define SSL3_CK_FZA_DMS_NULL_SHA 0x0300001C
# define SSL3_CK_FZA_DMS_FZA_SHA 0x0300001D
# if 0 /* Because it clashes with KRB5, is never
* used any more, and is safe to remove
* according to David Hopwood
* <david.hopwood@zetnet.co.uk> of the
* ietf-tls list */
# define SSL3_CK_FZA_DMS_RC4_SHA 0x0300001E
# endif
# endif
/*
* VRS Additional Kerberos5 entries
*/
......@@ -251,12 +239,6 @@ extern "C" {
# define SSL3_TXT_ADH_DES_64_CBC_SHA "ADH-DES-CBC-SHA"
# define SSL3_TXT_ADH_DES_192_CBC_SHA "ADH-DES-CBC3-SHA"
# if 0
# define SSL3_TXT_FZA_DMS_NULL_SHA "FZA-NULL-SHA"
# define SSL3_TXT_FZA_DMS_FZA_SHA "FZA-FZA-CBC-SHA"
# define SSL3_TXT_FZA_DMS_RC4_SHA "FZA-RC4-SHA"
# endif
# define SSL3_TXT_KRB5_DES_64_CBC_SHA "KRB5-DES-CBC-SHA"
# define SSL3_TXT_KRB5_DES_192_CBC3_SHA "KRB5-DES-CBC3-SHA"
# define SSL3_TXT_KRB5_RC4_128_SHA "KRB5-RC4-SHA"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册