Fix build with bindings generated against tpm2-tss version 4

The tss-esapi-sys crate offers both pregenerated bindings (the default) and the ability to request binding generation at build time. The latter is needed to build tss-esapi-sys (and hence sequoia-tpm) on systems for which pregenerated bindings are not available.

Debian's package of the tss-esapi-sys crate is patched to automatically generate bindings if pre-generated bindings are not available for the current architecture.

tpm2-tss version 4 increased the size of the buffer in TPM2B_PRIVATE_KEY_RSA from "TPM2_MAX_RSA_KEY_BYTES/2" (aka 256) to "TPM2_MAX_RSA_KEY_BYTES/2 * 5" https://github.com/tpm2-software/tpm2-tss/commit/e5e1a81231b1ae6b5f9201e2778a38bcd126eb40

As a result of this is that trying to build sequoia-tpm with the bindings generated against tpm2-tss 4 fails with a size mismatch. This patch fixes the mismatch by avoiding creating a temporary array.

Fixes #3 (closed).

Merge request reports

Loading