summaryrefslogtreecommitdiff
path: root/cesar/cp/sta
diff options
context:
space:
mode:
authordufour2009-11-03 14:32:07 +0000
committerdufour2009-11-03 14:32:07 +0000
commit3fca08f846bc49c023e861a844cd292906e2791f (patch)
tree9e3af55ed5bde9482f1c5dbcf44057ace0556595 /cesar/cp/sta
parentf75f3ffbb284b4844374ff57f24d7f17320e50b9 (diff)
cesar/cp/secu: makes cp_secu directly use lib_rnd, refs #702
Rather than using random numbers as parameters in the function cp_secu_protocol_run_new, we now use the lib_rnd context to generate random numbers when required. Update tests and other modules which are using cp_secu. git-svn-id: svn+ssh://pessac/svn/cesar/trunk@6311 017c9cb6-072f-447c-8318-d5b54f68fe89
Diffstat (limited to 'cesar/cp/sta')
-rw-r--r--cesar/cp/sta/action/src/assoc.c6
-rw-r--r--cesar/cp/sta/action/src/sc.c3
2 files changed, 3 insertions, 6 deletions
diff --git a/cesar/cp/sta/action/src/assoc.c b/cesar/cp/sta/action/src/assoc.c
index de2f32d252..59d7fa4fbe 100644
--- a/cesar/cp/sta/action/src/assoc.c
+++ b/cesar/cp/sta/action/src/assoc.c
@@ -210,8 +210,7 @@ cp_sta_action_assoc__wait_assoc_cnf__cc_assoc_cnf__common (cp_t *ctx,
.relayed = false, .key_type = CP_MSG_KEY_NEK,
.nid = cp_sta_own_data_get_nid (ctx) };
cp_secu_protocol_run_new (&ctx->sta_action.assoc.prun, 0,
- lib_rnd32 (&ctx->rnd),
- lib_rnd32 (&ctx->rnd));
+ &ctx->rnd);
cp_msg_cm_get_key_req_send (ctx, &mme->peer, CP_MME_PEKS_NMK,
&ctx->sta_action.assoc.prun, &get_key);
/* Change state. */
@@ -461,8 +460,7 @@ cp_sta_action_assoc__sc_tek_exchanged__cm_set_key_req_pid_3 (cp_t *ctx,
.relayed = false, .key_type = CP_MSG_KEY_NEK,
.nid = cp_sta_own_data_get_nid (ctx) };
cp_secu_protocol_run_new (&ctx->sta_action.assoc.prun, 0,
- lib_rnd32 (&ctx->rnd),
- lib_rnd32 (&ctx->rnd));
+ &ctx->rnd);
cp_msg_cm_get_key_req_send (ctx, &ctx->sta_action.assoc.peer,
CP_MME_PEKS_NMK,
&ctx->sta_action.assoc.prun, &get_key);
diff --git a/cesar/cp/sta/action/src/sc.c b/cesar/cp/sta/action/src/sc.c
index 109379d3cb..d1d3d31bde 100644
--- a/cesar/cp/sta/action/src/sc.c
+++ b/cesar/cp/sta/action/src/sc.c
@@ -298,8 +298,7 @@ cp_sta_action_sc__sc_wait_peer_associated__new_sta_associated (cp_t *ctx,
/* Keep a copy of the hash key. */
memcpy (ctx->sta_action.sc.hash_key, req.hash_key, CP_HASH_KEY_SIZE);
cp_secu_protocol_run_new (&ctx->sta_action.sc.prun, 3,
- lib_rnd32 (&ctx->rnd),
- lib_rnd32 (&ctx->rnd));
+ &ctx->rnd);
/* Send GET_KEY_REQ_PID3. */
cp_msg_cm_get_key_req_send (ctx, &ctx->sta_action.sc.peer,
CP_MME_PEKS_SPC_NOT_EMBEDDED, /* Not encrypted! */