提交 c8fa2356 编写于 作者: R Rich Salz

Dead code cleanup: crypto/ec,ecdh,ecdsa

Reviewed-by: NAndy Polyakov <appro@openssl.org>
上级 f16a64d1
......@@ -1061,16 +1061,6 @@ static const struct {
NID_X9_62_characteristic_two_field, 0, 21, 2
},
{
/* no seed */
# if 0
/*
* The algorithm used to derive the curve parameters from the seed
* used here is slightly different than the algorithm described in
* X9.62 .
*/
0x24, 0xB7, 0xB1, 0x37, 0xC8, 0xA1, 0x4D, 0x69, 0x6E, 0x67, 0x68, 0x75,
0x61, 0x51, 0x75, 0x6F, 0xD0, 0xDA, 0x2E, 0x5C,
# endif
/* p */
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC9,
......@@ -1100,16 +1090,6 @@ static const struct {
NID_X9_62_characteristic_two_field, 0, 21, 2
},
{
/* no seed */
# if 0
/*
* The seed here was used to created the curve parameters in normal
* basis representation (and not the polynomial representation used
* here)
*/
0x85, 0xE2, 0x5B, 0xFE, 0x5C, 0x86, 0x22, 0x6C, 0xDB, 0x12, 0x01, 0x6F,
0x75, 0x53, 0xF9, 0xD0, 0xE6, 0x93, 0xA2, 0x68,
# endif
/* p */
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC9,
......
......@@ -103,11 +103,6 @@ int ECDH_set_method(EC_KEY *eckey, const ECDH_METHOD *meth)
if (ecdh == NULL)
return 0;
#if 0
mtmp = ecdh->meth;
if (mtmp->finish)
mtmp->finish(eckey);
#endif
#ifndef OPENSSL_NO_ENGINE
if (ecdh->engine) {
ENGINE_finish(ecdh->engine);
......@@ -115,10 +110,6 @@ int ECDH_set_method(EC_KEY *eckey, const ECDH_METHOD *meth)
}
#endif
ecdh->meth = meth;
#if 0
if (meth->init)
meth->init(eckey);
#endif
return 1;
}
......@@ -152,13 +143,6 @@ static ECDH_DATA *ECDH_DATA_new_method(ENGINE *engine)
ret->flags = ret->meth->flags;
CRYPTO_new_ex_data(CRYPTO_EX_INDEX_ECDH, ret, &ret->ex_data);
#if 0
if ((ret->meth->init != NULL) && !ret->meth->init(ret)) {
CRYPTO_free_ex_data(CRYPTO_EX_INDEX_ECDH, ret, &ret->ex_data);
OPENSSL_free(ret);
ret = NULL;
}
#endif
return (ret);
}
......
......@@ -68,10 +68,6 @@ struct ecdh_method {
EC_KEY *ecdh, void *(*KDF) (const void *in,
size_t inlen, void *out,
size_t *outlen));
# if 0
int (*init) (EC_KEY *eckey);
int (*finish) (EC_KEY *eckey);
# endif
int flags;
char *app_data;
};
......
......@@ -86,10 +86,6 @@ static int ecdh_compute_key(void *out, size_t len, const EC_POINT *pub_key,
static ECDH_METHOD openssl_ecdh_meth = {
"OpenSSL ECDH method",
ecdh_compute_key,
#if 0
NULL, /* init */
NULL, /* finish */
#endif
ECDH_FLAG_FIPS_METHOD, /* flags */
NULL /* app_data */
};
......
......@@ -131,13 +131,6 @@ static ECDSA_DATA *ECDSA_DATA_new_method(ENGINE *engine)
ret->flags = ret->meth->flags;
CRYPTO_new_ex_data(CRYPTO_EX_INDEX_ECDSA, ret, &ret->ex_data);
#if 0
if ((ret->meth->init != NULL) && !ret->meth->init(ret)) {
CRYPTO_free_ex_data(CRYPTO_EX_INDEX_ECDSA, ret, &ret->ex_data);
OPENSSL_free(ret);
ret = NULL;
}
#endif
return (ret);
}
......
......@@ -74,10 +74,6 @@ struct ecdsa_method {
BIGNUM **r);
int (*ecdsa_do_verify) (const unsigned char *dgst, int dgst_len,
const ECDSA_SIG *sig, EC_KEY *eckey);
# if 0
int (*init) (EC_KEY *eckey);
int (*finish) (EC_KEY *eckey);
# endif
int flags;
void *app_data;
};
......
......@@ -77,10 +77,6 @@ static ECDSA_METHOD openssl_ecdsa_meth = {
ecdsa_do_sign,
ecdsa_sign_setup_no_digest,
ecdsa_do_verify,
#if 0
NULL, /* init */
NULL, /* finish */
#endif
ECDSA_FLAG_FIPS_METHOD, /* flags */
NULL /* app_data */
};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册