[openssl-commits] [openssl] master update

Rich Salz rsalz at openssl.org
Mon Feb 2 16:57:14 UTC 2015


The branch master has been updated
       via  c8fa2356a00cbaada8963f739e5570298311a060 (commit)
      from  f16a64d11f55c01f56baa62ebf1dec7f8fe718cb (commit)


- Log -----------------------------------------------------------------
commit c8fa2356a00cbaada8963f739e5570298311a060
Author: Rich Salz <rsalz at openssl.org>
Date:   Mon Feb 2 11:56:47 2015 -0500

    Dead code cleanup: crypto/ec,ecdh,ecdsa
    
    Reviewed-by: Andy Polyakov <appro at openssl.org>

-----------------------------------------------------------------------

Summary of changes:
 crypto/ec/ec_curve.c    |   20 --------------------
 crypto/ecdh/ech_lib.c   |   16 ----------------
 crypto/ecdh/ech_locl.h  |    4 ----
 crypto/ecdh/ech_ossl.c  |    4 ----
 crypto/ecdsa/ecs_lib.c  |    7 -------
 crypto/ecdsa/ecs_locl.h |    4 ----
 crypto/ecdsa/ecs_ossl.c |    4 ----
 7 files changed, 59 deletions(-)

diff --git a/crypto/ec/ec_curve.c b/crypto/ec/ec_curve.c
index 81846ec..6199e25 100644
--- a/crypto/ec/ec_curve.c
+++ b/crypto/ec/ec_curve.c
@@ -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,
diff --git a/crypto/ecdh/ech_lib.c b/crypto/ecdh/ech_lib.c
index b910b50..5147368 100644
--- a/crypto/ecdh/ech_lib.c
+++ b/crypto/ecdh/ech_lib.c
@@ -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);
 }
 
diff --git a/crypto/ecdh/ech_locl.h b/crypto/ecdh/ech_locl.h
index 4e66024..d61ef80 100644
--- a/crypto/ecdh/ech_locl.h
+++ b/crypto/ecdh/ech_locl.h
@@ -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;
 };
diff --git a/crypto/ecdh/ech_ossl.c b/crypto/ecdh/ech_ossl.c
index e60cf10..278c41b 100644
--- a/crypto/ecdh/ech_ossl.c
+++ b/crypto/ecdh/ech_ossl.c
@@ -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 */
 };
diff --git a/crypto/ecdsa/ecs_lib.c b/crypto/ecdsa/ecs_lib.c
index 321b425..67e521f 100644
--- a/crypto/ecdsa/ecs_lib.c
+++ b/crypto/ecdsa/ecs_lib.c
@@ -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);
 }
 
diff --git a/crypto/ecdsa/ecs_locl.h b/crypto/ecdsa/ecs_locl.h
index d3a5efc..9a0666e 100644
--- a/crypto/ecdsa/ecs_locl.h
+++ b/crypto/ecdsa/ecs_locl.h
@@ -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;
 };
diff --git a/crypto/ecdsa/ecs_ossl.c b/crypto/ecdsa/ecs_ossl.c
index c232321..1343850 100644
--- a/crypto/ecdsa/ecs_ossl.c
+++ b/crypto/ecdsa/ecs_ossl.c
@@ -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 */
 };


More information about the openssl-commits mailing list