]> granicus.if.org Git - openssl/commitdiff
"#if 0" removal: header files
authorRich Salz <rsalz@openssl.org>
Tue, 27 Jan 2015 22:44:12 +0000 (17:44 -0500)
committerRich Salz <rsalz@openssl.org>
Tue, 27 Jan 2015 22:44:12 +0000 (17:44 -0500)
Remove all "#if 0" blocks from header files.

Reviewed-by: Tim Hudson <tjh@openssl.org>
14 files changed:
crypto/aes/aes.h
crypto/asn1/asn1.h
crypto/bn/bn.h
crypto/conf/conf.h
crypto/crypto.h
crypto/des/des.h
crypto/des/des_old.h
crypto/dso/dso.h
crypto/evp/evp.h
crypto/symhacks.h
crypto/x509/x509_vfy.h
ssl/dtls1.h
ssl/ssl.h
ssl/ssl3.h

index 18fd52779c13c5c68f717b4acbd50f68c662fb7c..20e7b8ee0cb997c56f23e5c63257b064dad851f6 100644 (file)
@@ -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,
index e3fea150b3780b3196b55d07354debfc7c98643b..104056eac326ac7391798f78d669a54ec95c8f96 100644 (file)
@@ -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,
index ae44e65e3dc5e7c0d3c4c7996f33fda0c00eba17..f13760547d1eaa036dbc61a4fcd95bf70a597943 100644 (file)
@@ -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);
 
index 54edfdd97e07f93c60b304d1e0116c4576e41834..06c76018fdd5d8ef74276785d023fb80b99e3f75 100644 (file)
@@ -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 */
 
index 167f375c1e8449e1483492cac10121133816e0f8..9762398950220197b07b98405d051619f6b34afd 100644 (file)
@@ -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;
index 0accc9b72386f8822bbbe70bf6a790e7265172fc..589b73b4c87ad398d0adef20c05a34343f47f481 100644 (file)
@@ -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,
index baa4b7d338a45c609097028bf00373b53f6c1893..998ac09af1790f7417425971d45d5c68d6724068 100644 (file)
@@ -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);
index f6a1b67003c563246cba7b2a2475e8b8f7dd0d8e..12c16b69b2dd7a3407d210ecef63a50d8b91b0ec 100644 (file)
@@ -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.
index ca7447f540ff0441f9d04e9104e8d74074dae667..74f621788470b8392c84c13d3a2073fc8f18e712 100644 (file)
@@ -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);
index 6348fb49e882932f06da7f49250674c789cd5f7f..56922c99da24f5e275e6501e882536222880cbf5 100644 (file)
 #  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
index 959af30fa8ba668b98f9f144bf988a35b277b468..03e43e58692912edaf6317dd2842528f0d619623 100644 (file)
 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;
index 4af7e4a7f62ad42e67edafd8009e6cc050f52592..e2be78d346f85f62f2a9f13d3821993f40074818 100644 (file)
@@ -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
 
index 6809fd615cf601c0a84a335b9bca0589739eb99c..86f2387d9f1f6f0eed8dd4ae20a646e24beced65 100644 (file)
--- a/ssl/ssl.h
+++ b/ssl/ssl.h
@@ -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))
index beaa04dff609b8e549e8f3c32f587f82d687bed6..6c7c4396824685140e5596c56bf19cf1c212d230 100644 (file)
@@ -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"