charon-tkm: Drop unneeded nonceg get_id function
This commit is contained in:
committed by
Tobias Brunner
parent
5460098cce
commit
a8ca50e635
@@ -71,12 +71,6 @@ METHOD(nonce_gen_t, destroy, void,
|
|||||||
free(this);
|
free(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
METHOD(tkm_nonceg_t, get_id, nc_id_type,
|
|
||||||
private_tkm_nonceg_t *this)
|
|
||||||
{
|
|
||||||
return this->context_id;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Described in header.
|
* Described in header.
|
||||||
*/
|
*/
|
||||||
@@ -91,7 +85,6 @@ tkm_nonceg_t *tkm_nonceg_create()
|
|||||||
.allocate_nonce = _allocate_nonce,
|
.allocate_nonce = _allocate_nonce,
|
||||||
.destroy = _destroy,
|
.destroy = _destroy,
|
||||||
},
|
},
|
||||||
.get_id = _get_id,
|
|
||||||
},
|
},
|
||||||
.context_id = tkm->idmgr->acquire_id(tkm->idmgr, TKM_CTX_NONCE),
|
.context_id = tkm->idmgr->acquire_id(tkm->idmgr, TKM_CTX_NONCE),
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -36,14 +36,6 @@ struct tkm_nonceg_t {
|
|||||||
* Implements nonce_gen_t.
|
* Implements nonce_gen_t.
|
||||||
*/
|
*/
|
||||||
nonce_gen_t nonce_gen;
|
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);
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -27,7 +27,6 @@ START_TEST(test_nonceg_creation)
|
|||||||
|
|
||||||
ng = tkm_nonceg_create();
|
ng = tkm_nonceg_create();
|
||||||
fail_if(ng == NULL, "Error creating tkm nonce generator");
|
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);
|
ng->nonce_gen.destroy(&ng->nonce_gen);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user