WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-3.2-testing] TPM emulator: HMAC calculation fix for

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-3.2-testing] TPM emulator: HMAC calculation fix for response from TPM_LoadKey2
From: "Xen patchbot-3.2-testing" <patchbot-3.2-testing@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 06 Mar 2008 00:31:05 -0800
Delivery-date: Thu, 06 Mar 2008 00:31:50 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1204733925 0
# Node ID 2156219ec80884c2f8b32ccfc2d18207bdd07aa9
# Parent  50d91c0ef79fba8a1348f8c87ac8fe97ab80b88f
TPM emulator: HMAC calculation fix for response from TPM_LoadKey2
Signed-off-by: Stefan Berger <stefanb@xxxxxxxxxx>
xen-unstable changeset:   17162:5ea409d66ee4c78764920c4319f8bdece359a0f6
xen-unstable date:        Mon Mar 03 10:53:43 2008 +0000
---
 tools/vtpm/vtpm.patch |   17 ++++++++++++++++-
 1 files changed, 16 insertions(+), 1 deletion(-)

diff -r 50d91c0ef79f -r 2156219ec808 tools/vtpm/vtpm.patch
--- a/tools/vtpm/vtpm.patch     Wed Mar 05 16:18:20 2008 +0000
+++ b/tools/vtpm/vtpm.patch     Wed Mar 05 16:18:45 2008 +0000
@@ -125,9 +125,32 @@ diff -uprN tpm_emulator/tpm/tpm_capabili
        return TPM_FAIL;
  
      case TPM_CAP_PROP_ACTIVE_COUNTER:
+diff -uprN tpm_emulator/tpm/tpm_cmd_handler.c vtpm/tpm/tpm_cmd_handler.c
+--- tpm_emulator/tpm/tpm_cmd_handler.c 2008-02-27 16:35:41.000000000 -0500
++++ vtpm/tpm/tpm_cmd_handler.c 2008-02-28 14:43:28.000000000 -0500
+@@ -94,12 +94,18 @@ void tpm_compute_out_param_digest(TPM_CO
+   sha1_ctx_t sha1;
+   UINT32 res = CPU_TO_BE32(rsp->result);
+   UINT32 ord = CPU_TO_BE32(ordinal);
++  UINT32 offset = 0;
+ 
+   /* compute SHA1 hash */
+   sha1_init(&sha1);
+   sha1_update(&sha1, (BYTE*)&res, 4);
+   sha1_update(&sha1, (BYTE*)&ord, 4);
+-  sha1_update(&sha1, rsp->param, rsp->paramSize);
++  if (ordinal == TPM_ORD_LoadKey2) {
++      offset = 4;
++  }
++  if (rsp->paramSize - offset > 0) {
++      sha1_update(&sha1, rsp->param + offset, rsp->paramSize - offset);
++  }
+   sha1_final(&sha1, rsp->auth1->digest);
+   if (rsp->auth2 != NULL) memcpy(rsp->auth2->digest, 
+     rsp->auth1->digest, sizeof(rsp->auth1->digest));
 diff -uprN tpm_emulator/tpm/tpm_data.c vtpm/tpm/tpm_data.c
---- tpm_emulator/tpm/tpm_data.c        2006-12-08 12:51:29.000000000 -0800
-+++ vtpm/tpm/tpm_data.c        2006-12-13 16:38:52.000000000 -0800
+--- tpm_emulator/tpm/tpm_data.c        2008-02-27 16:35:41.000000000 -0500
++++ vtpm/tpm/tpm_data.c        2008-02-27 16:35:40.000000000 -0500
 @@ -1,6 +1,7 @@
  /* Software-Based Trusted Platform Module (TPM) Emulator for Linux
   * Copyright (C) 2004 Mario Strasser <mast@xxxxxxx>,

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-3.2-testing] TPM emulator: HMAC calculation fix for response from TPM_LoadKey2, Xen patchbot-3.2-testing <=