Commit graph

17 commits

Author SHA1 Message Date
Patrick Uiterwijk
3811bffc67
fix: use hash for name oject hash alg
This makes sure we actually use the correct hash algorithm for name alg.

Fixes: #9
Signed-off-by: Patrick Uiterwijk <patrick@puiterwijk.org>
2021-11-03 10:25:49 +01:00
Patrick Uiterwijk
3465c80729
fix: stop assuming the payload is utf8
Previously, we were expecting that the input is always utf8 encoded
text.
Since we just convert it to bytes, and print it back out as bytes, we
can just skip the unicode parsing, and accept any provided input.

Fixes: #5
Signed-off-by: Patrick Uiterwijk <patrick@puiterwijk.org>
2021-09-29 13:46:49 +02:00
Patrick Uiterwijk
50babf9b9c Rebase on tss-esapi 5.0 and tpm2-policy 0.4
Signed-off-by: Patrick Uiterwijk <patrick@puiterwijk.org>
2021-04-06 09:45:14 +02:00
Patrick Uiterwijk
8ac7857957 Remove extern crate statements
Signed-off-by: Patrick Uiterwijk <patrick@puiterwijk.org>
2020-12-03 16:46:44 +00:00
Patrick Uiterwijk
3dcb2874e0 Add defaults for policy path and pubkey path
This should send people strongly to use the defaults, so that other
tools can easily determine whether policies are in use and what their
values are.
It still allows overriding them.

Signed-off-by: Patrick Uiterwijk <patrick@puiterwijk.org>
2020-12-03 16:42:52 +00:00
Patrick Uiterwijk
ec1770cdb5 Rebase on tss-esapi 4.0.10-alpha and tpm2-policy 0.3.0
Signed-off-by: Patrick Uiterwijk <patrick@puiterwijk.org>
2020-12-03 14:28:06 +00:00
Patrick Uiterwijk
d2aa6b3d9e Rebase to tss-esapi-4.0.6 and tpm2-policy-0.2.0
Signed-off-by: Patrick Uiterwijk <patrick@puiterwijk.org>
2020-08-13 10:42:18 +02:00
Patrick Uiterwijk
e10391c4fb Split some code into different files
Signed-off-by: Patrick Uiterwijk <patrick@puiterwijk.org>
2020-08-03 17:07:04 +02:00
Patrick Uiterwijk
387826aef7 Move tpm_objects functions to other module
Signed-off-by: Patrick Uiterwijk <patrick@puiterwijk.org>
2020-08-03 16:47:21 +02:00
Patrick Uiterwijk
98ae987519 Use the kernel TABRMD
Signed-off-by: Patrick Uiterwijk <patrick@puiterwijk.org>
2020-08-03 15:42:07 +02:00
Patrick Uiterwijk
cac6aacde4 Strip out the Policy components into a separate crate
Signed-off-by: Patrick Uiterwijk <patrick@puiterwijk.org>
2020-08-03 12:11:43 +02:00
Patrick Uiterwijk
76e880d806 Add a --help option
Signed-off-by: Patrick Uiterwijk <patrick@puiterwijk.org>
2020-08-03 11:03:36 +02:00
Patrick Uiterwijk
2a9a579033 Use the Device TCTI if there is no TPMRM
Signed-off-by: Patrick Uiterwijk <patrick@puiterwijk.org>
2020-08-03 10:57:12 +02:00
Patrick Uiterwijk
8c1524f1b9 Add --sumary and help for compatibility with old pin
Signed-off-by: Patrick Uiterwijk <patrick@puiterwijk.org>
2020-08-03 10:52:05 +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
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