diff options
author | Andreas Steffen <andreas.steffen@strongswan.org> | 2014-05-27 21:15:12 +0200 |
---|---|---|
committer | Andreas Steffen <andreas.steffen@strongswan.org> | 2014-05-31 20:37:57 +0200 |
commit | 543447cb6b3e08e627a6c9470f1bf5e951bee868 (patch) | |
tree | 742a7828b49d5be7fdbc569b11924781294ca683 | |
parent | 3a726816a2ca349a7127b23096e2545f8e3ac1d3 (diff) | |
download | strongswan-543447cb6b3e08e627a6c9470f1bf5e951bee868.tar.bz2 strongswan-543447cb6b3e08e627a6c9470f1bf5e951bee868.tar.xz |
Wait for the arrival of the TCPG_PTS_DH_NONCE_PARAMS_RESP
3 files changed, 9 insertions, 2 deletions
diff --git a/src/libpts/plugins/imv_attestation/imv_attestation_build.c b/src/libpts/plugins/imv_attestation/imv_attestation_build.c index 3750a0a5b..120fe3eaa 100644 --- a/src/libpts/plugins/imv_attestation/imv_attestation_build.c +++ b/src/libpts/plugins/imv_attestation/imv_attestation_build.c @@ -62,6 +62,11 @@ bool imv_attestation_build(imv_msg_t *out_msg, imv_state_t *state, pts_meas_algorithms_t selected_algorithm; chunk_t initiator_value, initiator_nonce; + if (!(state->get_action_flags(state) & IMV_ATTESTATION_DH_NONCE)) + { + break; + } + /* Send DH nonce finish attribute */ selected_algorithm = pts->get_meas_algorithm(pts); pts->get_my_public_value(pts, &initiator_value, &initiator_nonce); diff --git a/src/libpts/plugins/imv_attestation/imv_attestation_process.c b/src/libpts/plugins/imv_attestation/imv_attestation_process.c index f2aa4ec82..26a57d15c 100644 --- a/src/libpts/plugins/imv_attestation/imv_attestation_process.c +++ b/src/libpts/plugins/imv_attestation/imv_attestation_process.c @@ -142,6 +142,7 @@ bool imv_attestation_process(pa_tnc_attr_t *attr, imv_msg_t *out_msg, { return FALSE; } + state->set_action_flags(state, IMV_ATTESTATION_DH_NONCE); break; } case TCG_PTS_TPM_VERSION_INFO: diff --git a/src/libpts/plugins/imv_attestation/imv_attestation_state.h b/src/libpts/plugins/imv_attestation/imv_attestation_state.h index c3aea048c..b72857552 100644 --- a/src/libpts/plugins/imv_attestation/imv_attestation_state.h +++ b/src/libpts/plugins/imv_attestation/imv_attestation_state.h @@ -48,8 +48,9 @@ enum imv_attestation_flag_t { IMV_ATTESTATION_ATTR_MUST = (1<<3)-1, IMV_ATTESTATION_ATTR_REQ = (1<<3), IMV_ATTESTATION_ALGO = (1<<4), - IMV_ATTESTATION_FILE_MEAS = (1<<5), - IMV_ATTESTATION_REC = (1<<6) + IMV_ATTESTATION_DH_NONCE = (1<<5), + IMV_ATTESTATION_FILE_MEAS = (1<<6), + IMV_ATTESTATION_REC = (1<<7) }; /** |