reference counting for EC_GROUP structures is not needed (at the
authorBodo Möller <bodo@openssl.org>
Wed, 6 Mar 2002 09:46:17 +0000 (09:46 +0000)
committerBodo Möller <bodo@openssl.org>
Wed, 6 Mar 2002 09:46:17 +0000 (09:46 +0000)
moment at least), so remove it

CHANGES
crypto/ec/ec_lcl.h
crypto/ec/ec_lib.c

diff --git a/CHANGES b/CHANGES
index 5cb5422661fb1ce747b8b04d1cff97a61ad14980..1b3bcb54b52dd48fb2a3a4980e6cb6ab2cc5f59d 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -22,9 +22,6 @@
        extracted before the specific public key.
      [Nils Larsch <nla@trustcenter.de>]
 
-  *) Add reference counting for EC_GROUP objects.
-     [Nils Larsch <nla@trustcenter.de>]
-
   *) Include some named elliptic curves.  These can be obtained from
      the new functions
           EC_GROUP_new_by_nid()
index 9603e74e7d079cccc74c18b37f00be25c8f3bd0d..b93825524f7bddfe5e2094dde2818f5415d1bf59 100644 (file)
@@ -166,7 +166,6 @@ struct ec_group_st {
        EC_POINT *generator; /* optional */
        BIGNUM order, cofactor;
 
-       int references;
        int nid;
 
        void *field_data1; /* method-specific (e.g., Montgomery structure) */
index 2b1e49182e3ea2b53f9e1302073ba125032d5e30..3e372dbed3ca180071dcd2cf3a786475562363e2 100644 (file)
@@ -96,8 +96,6 @@ EC_GROUP *EC_GROUP_new(const EC_METHOD *meth)
 
        ret->nid = 0;   
 
-       ret->references = 1;
-
        if (!meth->group_init(ret))
                {
                OPENSSL_free(ret);
@@ -110,12 +108,6 @@ EC_GROUP *EC_GROUP_new(const EC_METHOD *meth)
 
 void EC_GROUP_free(EC_GROUP *group)
        {
-       int i;
-
-       i = CRYPTO_add(&group->references, -1, CRYPTO_LOCK_EC);
-       if (i > 0)
-               return;
-       
        if (group->meth->group_finish != 0)
                group->meth->group_finish(group);
 
@@ -127,12 +119,6 @@ void EC_GROUP_free(EC_GROUP *group)
 
 void EC_GROUP_clear_free(EC_GROUP *group)
        {
-       int i;
-
-       i = CRYPTO_add(&group->references, -1, CRYPTO_LOCK_EC);
-       if (i > 0)
-               return;
-
        if (group->meth->group_clear_finish != 0)
                group->meth->group_clear_finish(group);
        else if (group->meth != NULL && group->meth->group_finish != 0)
@@ -314,14 +300,14 @@ void EC_GROUP_clear_free_extra_data(EC_GROUP *group)
        }
 
 void EC_GROUP_set_nid(EC_GROUP *group, int nid)
-{
+       {
        group->nid = nid;
-}
+       }
 
 int EC_GROUP_get_nid(const EC_GROUP *group)
-{
+       {
        return group->nid;
-}
+       }