]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
charon-tkm: Drop unneeded nonceg get_id function
authorReto Buerki <reet@codelabs.ch>
Thu, 23 Apr 2015 08:06:49 +0000 (10:06 +0200)
committerTobias Brunner <tobias@strongswan.org>
Mon, 4 May 2015 16:07:51 +0000 (18:07 +0200)
src/charon-tkm/src/tkm/tkm_nonceg.c
src/charon-tkm/src/tkm/tkm_nonceg.h
src/charon-tkm/tests/nonceg_tests.c

index a07326798789e09cb3fc28429ff8d52bf0333e96..89baab7ce1e91131a49664eaf0457a6b0f5b3b10 100644 (file)
@@ -71,12 +71,6 @@ METHOD(nonce_gen_t, destroy, void,
        free(this);
 }
 
-METHOD(tkm_nonceg_t, get_id, nc_id_type,
-       private_tkm_nonceg_t *this)
-{
-       return this->context_id;
-}
-
 /*
  * Described in header.
  */
@@ -91,7 +85,6 @@ tkm_nonceg_t *tkm_nonceg_create()
                                .allocate_nonce = _allocate_nonce,
                                .destroy = _destroy,
                        },
-                       .get_id = _get_id,
                },
                .context_id = tkm->idmgr->acquire_id(tkm->idmgr, TKM_CTX_NONCE),
        );
index ceadb081f8fda994e788ff97245965fcf425f52d..d158551feb9048933f07f31874aa7b1e03135f0f 100644 (file)
@@ -36,14 +36,6 @@ struct tkm_nonceg_t {
         * Implements nonce_gen_t.
         */
        nonce_gen_t nonce_gen;
-
-       /**
-        * Get nonce context id.
-        *
-        * @return      context id of this nonce generator.
-        */
-       nc_id_type (*get_id)(tkm_nonceg_t * const this);
-
 };
 
 /**
index 6f524cb2249a11dc4ee3faefc857b43284bca5fc..d150891eb127892aab3545e60fa7104f65368715 100644 (file)
@@ -27,7 +27,6 @@ START_TEST(test_nonceg_creation)
 
        ng = tkm_nonceg_create();
        fail_if(ng == NULL, "Error creating tkm nonce generator");
-       fail_if(ng->get_id(ng) == 0, "Invalid context id (0)");
 
        ng->nonce_gen.destroy(&ng->nonce_gen);
 }