aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSansar Choinyambuu <schoinya@hsr.ch>2011-10-28 15:17:58 +0200
committerAndreas Steffen <andreas.steffen@strongswan.org>2011-11-28 14:39:52 +0100
commit6c5c5b6a2e6050d3598536a7df3cfbfb04c9e55e (patch)
treeebffc54c3c91e36b06972d81cef073877df2171c /src
parenta626ff926756c45413602e34176c8687c5e6f307 (diff)
downloadstrongswan-6c5c5b6a2e6050d3598536a7df3cfbfb04c9e55e.tar.bz2
strongswan-6c5c5b6a2e6050d3598536a7df3cfbfb04c9e55e.tar.xz
use D flag for PTS Protocol Capabilities
Diffstat (limited to 'src')
-rw-r--r--src/libimcv/plugins/imv_attestation/imv_attestation_build.c18
-rw-r--r--src/libpts/pts/pts.c4
2 files changed, 18 insertions, 4 deletions
diff --git a/src/libimcv/plugins/imv_attestation/imv_attestation_build.c b/src/libimcv/plugins/imv_attestation/imv_attestation_build.c
index 654782b3a..bea77d12f 100644
--- a/src/libimcv/plugins/imv_attestation/imv_attestation_build.c
+++ b/src/libimcv/plugins/imv_attestation/imv_attestation_build.c
@@ -43,12 +43,26 @@ bool imv_attestation_build(pa_tnc_msg_t *msg,
pts = attestation_state->get_pts(attestation_state);
if (handshake_state == IMV_ATTESTATION_STATE_NONCE_REQ &&
+ !(pts->get_proto_caps(pts) & PTS_PROTO_CAPS_D))
+ {
+ DBG1(DBG_IMV, "PTS-IMC is not using Diffie-Hellman Nonce negotiation,"
+ "advancing to TPM Initialization phase");
+ handshake_state = IMV_ATTESTATION_STATE_TPM_INIT;
+ }
+ if (handshake_state == IMV_ATTESTATION_STATE_TPM_INIT &&
!(pts->get_proto_caps(pts) & PTS_PROTO_CAPS_T))
{
- DBG1(DBG_IMV, "PTS-IMC has no TPM capability - "
- "advancing to PTS measurement phase");
+ DBG1(DBG_IMV, "PTS-IMC has not got TPM available,"
+ "advancing to File Measurement phase");
handshake_state = IMV_ATTESTATION_STATE_MEAS;
}
+ if (handshake_state == IMV_ATTESTATION_STATE_COMP_EVID &&
+ !(pts->get_proto_caps(pts) & PTS_PROTO_CAPS_T))
+ {
+ DBG1(DBG_IMV, "PTS-IMC has not got TPM available,"
+ "skipping Component Measurement phase");
+ handshake_state = IMV_ATTESTATION_STATE_END;
+ }
/* Switch on the attribute type IMV has received */
switch (handshake_state)
diff --git a/src/libpts/pts/pts.c b/src/libpts/pts/pts.c
index 269be4108..18a64dec3 100644
--- a/src/libpts/pts/pts.c
+++ b/src/libpts/pts/pts.c
@@ -1389,14 +1389,14 @@ pts_t *pts_create(bool is_imc)
if (has_tpm(this))
{
this->has_tpm = TRUE;
- this->proto_caps |= PTS_PROTO_CAPS_T;
+ this->proto_caps |= PTS_PROTO_CAPS_T | PTS_PROTO_CAPS_D;
load_aik(this);
load_aik_blob(this);
}
}
else
{
- this->proto_caps |= PTS_PROTO_CAPS_T | PTS_PROTO_CAPS_C;
+ this->proto_caps |= PTS_PROTO_CAPS_T | PTS_PROTO_CAPS_D;
}
return &this->public;