Commit graph

6 commits

Author SHA1 Message Date
Patrick Uiterwijk 2313184c9e Add sha1 pcr tests
Signed-off-by: Patrick Uiterwijk <patrick@puiterwijk.org>
2020-07-22 09:54:09 +02:00
Patrick Uiterwijk e7bc7a628b Change the policy test prints
Signed-off-by: Patrick Uiterwijk <patrick@puiterwijk.org>
2020-07-17 18:09:30 +02:00
Patrick Uiterwijk ef0489d9d5 Deserialize the RSA modulus with standard base64
It was decided to use standard base64 instead of base64-url because
that's what the Go implementation did by default for a []byte.

Signed-off-by: Patrick Uiterwijk <patrick@puiterwijk.org>
2020-07-17 11:55:51 +02:00
Patrick Uiterwijk 38fdf9b10d Update tests with PCR values that match most setups
Previously, the tests were searching for the specific PCR0 and 1 values
of my test machine.
The new policies are looking for the following values for PCR22:
Working: FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
Non-working: FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE

Signed-off-by: Patrick Uiterwijk <patrick@puiterwijk.org>
2020-07-17 11:54:33 +02:00
Patrick Uiterwijk 1b5c15a992 Use AES128 to be compatible with hardware TPMs
My hardware TPM only supports AES128, so let's use that for now to
be more compatible.

The tpm_sym_def function does take a mutable ctx borrow, so that in
the future it can automatically detect the best supported symdef.

Signed-off-by: Patrick Uiterwijk <patrick@puiterwijk.org>
2020-07-17 10:42:06 +02:00
Patrick Uiterwijk a2650d5234 Initial commit 2020-07-16 16:22:34 +02:00