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)
This commit is contained in:
Matt Caswell 2017-02-28 14:55:35 +00:00
parent 9fa36f5f4b
commit 7f517c2676
16 changed files with 1 additions and 98 deletions

View File

@ -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;

View File

@ -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:

View File

@ -1911,7 +1911,6 @@ int BIO_dgram_non_fatal_error(int err)
# endif
return (1);
/* break; */
default:
break;
}

View File

@ -268,7 +268,6 @@ int BIO_fd_non_fatal_error(int err)
case EALREADY:
# endif
return (1);
/* break; */
default:
break;
}

View File

@ -225,7 +225,6 @@ int BIO_sock_non_fatal_error(int err)
case EALREADY:
# endif
return (1);
/* break; */
default:
break;
}

View File

@ -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

View File

@ -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);

View File

@ -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);
}
*/

View File

@ -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);
}

View File

@ -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);

View File

@ -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)
{

View File

@ -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);

View File

@ -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;

View File

@ -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) {

View File

@ -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)

View File

@ -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;
}
*/