summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2017-02-28 14:55:35 +0000
committerMatt Caswell <matt@openssl.org>2017-02-28 16:02:11 +0000
commit7f517c2676103db8123aaad5c722125d936f807c (patch)
treed326cecefbe6b0d38ef5784ecc241b786e8870ee
parent9fa36f5f4b32557c20b2c2665d50b239dcc49b91 (diff)
Remove some commented out code in libcrypto
Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Andy Polyakov <appro@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2774)
-rw-r--r--crypto/asn1/d2i_pu.c1
-rw-r--r--crypto/bio/bss_acpt.c6
-rw-r--r--crypto/bio/bss_dgram.c1
-rw-r--r--crypto/bio/bss_fd.c1
-rw-r--r--crypto/bio/bss_sock.c1
-rw-r--r--crypto/bn/bn_exp.c7
-rw-r--r--crypto/bn/bn_mul.c3
-rw-r--r--crypto/des/set_key.c8
-rw-r--r--crypto/dso/dso_win32.c6
-rw-r--r--crypto/evp/bio_b64.c3
-rw-r--r--crypto/evp/bio_enc.c26
-rw-r--r--crypto/evp/bio_md.c3
-rw-r--r--crypto/evp/p_seal.c12
-rw-r--r--crypto/lhash/lhash.c5
-rw-r--r--crypto/objects/obj_dat.c1
-rw-r--r--crypto/x509v3/v3_pku.c15
16 files changed, 1 insertions, 98 deletions
diff --git a/crypto/asn1/d2i_pu.c b/crypto/asn1/d2i_pu.c
index dfdc1a6c96..77c643bcf6 100644
--- a/crypto/asn1/d2i_pu.c
+++ b/crypto/asn1/d2i_pu.c
@@ -66,7 +66,6 @@ EVP_PKEY *d2i_PublicKey(int type, EVP_PKEY **a, const unsigned char **pp,
default:
ASN1err(ASN1_F_D2I_PUBLICKEY, ASN1_R_UNKNOWN_PUBLIC_KEY_TYPE);
goto err;
- /* break; */
}
if (a != NULL)
(*a) = ret;
diff --git a/crypto/bio/bss_acpt.c b/crypto/bio/bss_acpt.c
index e490fcdf73..dda637db7f 100644
--- a/crypto/bio/bss_acpt.c
+++ b/crypto/bio/bss_acpt.c
@@ -521,12 +521,6 @@ static long acpt_ctrl(BIO *b, int cmd, long num, void *ptr)
ret = (long)data->bind_mode;
break;
case BIO_CTRL_DUP:
-/*- dbio=(BIO *)ptr;
- if (data->param_port) EAY EAY
- BIO_set_port(dbio,data->param_port);
- if (data->param_hostname)
- BIO_set_hostname(dbio,data->param_hostname);
- BIO_set_nbio(dbio,data->nbio); */
break;
default:
diff --git a/crypto/bio/bss_dgram.c b/crypto/bio/bss_dgram.c
index b14d03666a..d43e8dc471 100644
--- a/crypto/bio/bss_dgram.c
+++ b/crypto/bio/bss_dgram.c
@@ -1911,7 +1911,6 @@ int BIO_dgram_non_fatal_error(int err)
# endif
return (1);
- /* break; */
default:
break;
}
diff --git a/crypto/bio/bss_fd.c b/crypto/bio/bss_fd.c
index 0f003cd89b..a02c65d128 100644
--- a/crypto/bio/bss_fd.c
+++ b/crypto/bio/bss_fd.c
@@ -268,7 +268,6 @@ int BIO_fd_non_fatal_error(int err)
case EALREADY:
# endif
return (1);
- /* break; */
default:
break;
}
diff --git a/crypto/bio/bss_sock.c b/crypto/bio/bss_sock.c
index c47b160bb0..744b768d12 100644
--- a/crypto/bio/bss_sock.c
+++ b/crypto/bio/bss_sock.c
@@ -225,7 +225,6 @@ int BIO_sock_non_fatal_error(int err)
case EALREADY:
# endif
return (1);
- /* break; */
default:
break;
}
diff --git a/crypto/bn/bn_exp.c b/crypto/bn/bn_exp.c
index feeb7649a5..5e6bb4474f 100644
--- a/crypto/bn/bn_exp.c
+++ b/crypto/bn/bn_exp.c
@@ -133,13 +133,6 @@ int BN_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, const BIGNUM *m,
#define RECP_MUL_MOD
#ifdef MONT_MUL_MOD
- /*
- * I have finally been able to take out this pre-condition of the top bit
- * being set. It was caused by an error in BN_div with negatives. There
- * was also another problem when for a^b%m a >= m. eay 07-May-97
- */
- /* if ((m->d[m->top-1]&BN_TBIT) && BN_is_odd(m)) */
-
if (BN_is_odd(m)) {
# ifdef MONT_EXP_WORD
if (a->top == 1 && !a->neg
diff --git a/crypto/bn/bn_mul.c b/crypto/bn/bn_mul.c
index 1f28f64abb..99402fc4c9 100644
--- a/crypto/bn/bn_mul.c
+++ b/crypto/bn/bn_mul.c
@@ -339,7 +339,6 @@ void bn_mul_part_recursive(BN_ULONG *r, BN_ULONG *a, BN_ULONG *b, int n,
bn_sub_part_words(&(t[n]), b, &(b[n]), tnb, n - tnb); /* - */
break;
case -3:
- /* break; */
case -2:
bn_sub_part_words(t, &(a[n]), a, tna, tna - n); /* - */
bn_sub_part_words(&(t[n]), &(b[n]), b, tnb, tnb - n); /* + */
@@ -348,14 +347,12 @@ void bn_mul_part_recursive(BN_ULONG *r, BN_ULONG *a, BN_ULONG *b, int n,
case -1:
case 0:
case 1:
- /* break; */
case 2:
bn_sub_part_words(t, a, &(a[n]), tna, n - tna); /* + */
bn_sub_part_words(&(t[n]), b, &(b[n]), tnb, n - tnb); /* - */
neg = 1;
break;
case 3:
- /* break; */
case 4:
bn_sub_part_words(t, a, &(a[n]), tna, n - tna);
bn_sub_part_words(&(t[n]), &(b[n]), b, tnb, tnb - n);
diff --git a/crypto/des/set_key.c b/crypto/des/set_key.c
index 795d9549cf..cd3ec67ecb 100644
--- a/crypto/des/set_key.c
+++ b/crypto/des/set_key.c
@@ -379,11 +379,3 @@ int DES_key_sched(const_DES_cblock *key, DES_key_schedule *schedule)
{
return (DES_set_key(key, schedule));
}
-
-/*-
-#undef des_fixup_key_parity
-void des_fixup_key_parity(des_cblock *key)
- {
- des_set_odd_parity(key);
- }
-*/
diff --git a/crypto/dso/dso_win32.c b/crypto/dso/dso_win32.c
index 4a4c34abb6..829f1b859b 100644
--- a/crypto/dso/dso_win32.c
+++ b/crypto/dso/dso_win32.c
@@ -209,9 +209,6 @@ static struct file_st *win32_splitter(DSO *dso, const char *filename,
if (!filename) {
DSOerr(DSO_F_WIN32_SPLITTER, DSO_R_NO_FILENAME);
- /*
- * goto err;
- */
return (NULL);
}
@@ -237,9 +234,6 @@ static struct file_st *win32_splitter(DSO *dso, const char *filename,
case ':':
if (position != IN_DEVICE) {
DSOerr(DSO_F_WIN32_SPLITTER, DSO_R_INCORRECT_FILE_SYNTAX);
- /*
- * goto err;
- */
OPENSSL_free(result);
return (NULL);
}
diff --git a/crypto/evp/bio_b64.c b/crypto/evp/bio_b64.c
index 4f0e19eed3..a48cd17e28 100644
--- a/crypto/evp/bio_b64.c
+++ b/crypto/evp/bio_b64.c
@@ -17,9 +17,6 @@
static int b64_write(BIO *h, const char *buf, int num);
static int b64_read(BIO *h, char *buf, int size);
static int b64_puts(BIO *h, const char *str);
-/*
- * static int b64_gets(BIO *h, char *str, int size);
- */
static long b64_ctrl(BIO *h, int cmd, long arg1, void *arg2);
static int b64_new(BIO *h);
static int b64_free(BIO *data);
diff --git a/crypto/evp/bio_enc.c b/crypto/evp/bio_enc.c
index 7d596e0f48..a4db4124da 100644
--- a/crypto/evp/bio_enc.c
+++ b/crypto/evp/bio_enc.c
@@ -16,12 +16,6 @@
static int enc_write(BIO *h, const char *buf, int num);
static int enc_read(BIO *h, char *buf, int size);
-/*
- * static int enc_puts(BIO *h, const char *str);
- */
-/*
- * static int enc_gets(BIO *h, char *str, int size);
- */
static long enc_ctrl(BIO *h, int cmd, long arg1, void *arg2);
static int enc_new(BIO *h);
static int enc_free(BIO *data);
@@ -405,26 +399,6 @@ static long enc_callback_ctrl(BIO *b, int cmd, bio_info_cb *fp)
return (ret);
}
-/*-
-void BIO_set_cipher_ctx(b,c)
-BIO *b;
-EVP_CIPHER_ctx *c;
- {
- if (b == NULL) return;
-
- if ((b->callback != NULL) &&
- (b->callback(b,BIO_CB_CTRL,(char *)c,BIO_CTRL_SET,e,0L) <= 0))
- return;
-
- b->init=1;
- ctx=(BIO_ENC_CTX *)b->ptr;
- memcpy(ctx->cipher,c,sizeof(EVP_CIPHER_CTX));
-
- if (b->callback != NULL)
- b->callback(b,BIO_CB_CTRL,(char *)c,BIO_CTRL_SET,e,1L);
- }
-*/
-
int BIO_set_cipher(BIO *b, const EVP_CIPHER *c, const unsigned char *k,
const unsigned char *i, int e)
{
diff --git a/crypto/evp/bio_md.c b/crypto/evp/bio_md.c
index c9e38583d2..619e0654ad 100644
--- a/crypto/evp/bio_md.c
+++ b/crypto/evp/bio_md.c
@@ -22,9 +22,6 @@
static int md_write(BIO *h, char const *buf, int num);
static int md_read(BIO *h, char *buf, int size);
-/*
- * static int md_puts(BIO *h, const char *str);
- */
static int md_gets(BIO *h, char *str, int size);
static long md_ctrl(BIO *h, int cmd, long arg1, void *arg2);
static int md_new(BIO *h);
diff --git a/crypto/evp/p_seal.c b/crypto/evp/p_seal.c
index faa246483b..a2b9497dba 100644
--- a/crypto/evp/p_seal.c
+++ b/crypto/evp/p_seal.c
@@ -48,18 +48,6 @@ int EVP_SealInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *type,
return (npubk);
}
-/*- MACRO
-void EVP_SealUpdate(ctx,out,outl,in,inl)
-EVP_CIPHER_CTX *ctx;
-unsigned char *out;
-int *outl;
-unsigned char *in;
-int inl;
- {
- EVP_EncryptUpdate(ctx,out,outl,in,inl);
- }
-*/
-
int EVP_SealFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl)
{
int i;
diff --git a/crypto/lhash/lhash.c b/crypto/lhash/lhash.c
index adde832cc4..82de223599 100644
--- a/crypto/lhash/lhash.c
+++ b/crypto/lhash/lhash.c
@@ -309,11 +309,6 @@ unsigned long OPENSSL_LH_strhash(const char *c)
if ((c == NULL) || (*c == '\0'))
return (ret);
-/*-
- unsigned char b[16];
- MD5(c,strlen(c),b);
- return(b[0]|(b[1]<<8)|(b[2]<<16)|(b[3]<<24));
-*/
n = 0x100;
while (*c) {
diff --git a/crypto/objects/obj_dat.c b/crypto/objects/obj_dat.c
index 259851bc00..f37e947f30 100644
--- a/crypto/objects/obj_dat.c
+++ b/crypto/objects/obj_dat.c
@@ -676,7 +676,6 @@ int OBJ_create_objects(BIO *in)
return (num);
num++;
}
- /* return(num); */
}
int OBJ_create(const char *oid, const char *sn, const char *ln)
diff --git a/crypto/x509v3/v3_pku.c b/crypto/x509v3/v3_pku.c
index ed82bca8ba..5a7e7d9725 100644
--- a/crypto/x509v3/v3_pku.c
+++ b/crypto/x509v3/v3_pku.c
@@ -17,10 +17,7 @@
static int i2r_PKEY_USAGE_PERIOD(X509V3_EXT_METHOD *method,
PKEY_USAGE_PERIOD *usage, BIO *out,
int indent);
-/*
- * static PKEY_USAGE_PERIOD *v2i_PKEY_USAGE_PERIOD(X509V3_EXT_METHOD *method,
- * X509V3_CTX *ctx, STACK_OF(CONF_VALUE) *values);
- */
+
const X509V3_EXT_METHOD v3_pkey_usage_period = {
NID_private_key_usage_period, 0, ASN1_ITEM_ref(PKEY_USAGE_PERIOD),
0, 0, 0, 0,
@@ -53,13 +50,3 @@ static int i2r_PKEY_USAGE_PERIOD(X509V3_EXT_METHOD *method,
}
return 1;
}
-
-/*-
-static PKEY_USAGE_PERIOD *v2i_PKEY_USAGE_PERIOD(method, ctx, values)
-X509V3_EXT_METHOD *method;
-X509V3_CTX *ctx;
-STACK_OF(CONF_VALUE) *values;
-{
-return NULL;
-}
-*/