vtpmmgr: properly remove t_uint size dependency
authorDaniel De Graaf <dgdegra@tycho.nsa.gov>
Mon, 28 Apr 2014 23:29:10 +0000 (19:29 -0400)
committerIan Campbell <ian.campbell@citrix.com>
Fri, 2 May 2014 12:34:35 +0000 (13:34 +0100)
commitf0d9b32ae4e25a07f7ec17bd51971674b6a606f5
treea1c447260e82ea336d1deb3a53bbf303f1837f11
parent88527ccfefb6f43539e5e169a186cdc95e63cba2
vtpmmgr: properly remove t_uint size dependency

Rather than using the internal MPI format for the Diffie-Hellman group,
whose representation depends on the size of the t_uint type, store the
value as a big-endian integer and use mpi_read_binary to convert it in
an architecture-independent manner.  This patch also removes the
unnecessary range check on the exponent which ended up being different
between 32- and 64-bit code.

Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
stubdom/vtpmmgr/vtpm_cmd_handler.c