Remove all "#if 0" blocks from header files.
Reviewed-by: Tim Hudson <tjh@openssl.org>
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,
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,
*/
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);
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);
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 */
# 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;
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,
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)\
_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)\
_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);
* 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.
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);
* 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);
# 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
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;
/* 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
X509_VERIFY_PARAM *param;
-# if 0
- int purpose; /* Purpose setting */
- int trust; /* Trust setting */
-# endif
-
int quiet_shutdown;
/*
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;
# 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))
# 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
*/
# 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"