Change the policy test prints
Signed-off-by: Patrick Uiterwijk <patrick@puiterwijk.org>
This commit is contained in:
parent
ef0489d9d5
commit
e7bc7a628b
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
cargo build || (echo "Failed to build"; exit 1)
|
cargo build || (echo "Failed to build"; exit 1)
|
||||||
echo "Working: Policy" | ./target/debug/clevis-pin-tpm2 encrypt '{"policy_pubkey_path":"./tests/policy_pubkey.json", "policy_ref": "", "policy_path": "./tests/policy_working.json"}' | ./target/debug/clevis-pin-tpm2 decrypt
|
echo "Working: with Policy" | ./target/debug/clevis-pin-tpm2 encrypt '{"policy_pubkey_path":"./tests/policy_pubkey.json", "policy_ref": "", "policy_path": "./tests/policy_working.json"}' | ./target/debug/clevis-pin-tpm2 decrypt
|
||||||
# Negative test (non-valid policy)
|
# Negative test (non-valid policy)
|
||||||
token=$(echo Failed | ./target/debug/clevis-pin-tpm2 encrypt '{"policy_pubkey_path":"./tests/policy_pubkey.json", "policy_ref": "", "policy_path": "./tests/policy_broken.json"}')
|
token=$(echo Failed | ./target/debug/clevis-pin-tpm2 encrypt '{"policy_pubkey_path":"./tests/policy_pubkey.json", "policy_ref": "", "policy_path": "./tests/policy_broken.json"}')
|
||||||
res=$(echo "$token" | ./target/debug/clevis-pin-tpm2 decrypt 2>/dev/null)
|
res=$(echo "$token" | ./target/debug/clevis-pin-tpm2 decrypt 2>/dev/null)
|
||||||
|
@ -14,5 +14,5 @@ then
|
||||||
echo "Something went wrong"
|
echo "Something went wrong"
|
||||||
exit 1
|
exit 1
|
||||||
else
|
else
|
||||||
echo "Working: with policy"
|
echo "Working: with policy with invalid digest"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue