Compare commits
	
		
			No commits in common. "4a3b0583c4e1756ea0d732c84bedde90f4ee5676" and "8df4ff53a954041be44a0d819ff031230404dc45" have entirely different histories.
		
	
	
		
			4a3b0583c4
			...
			8df4ff53a9
		
	
		
					 2 changed files with 4 additions and 4 deletions
				
			
		|  | @ -122,7 +122,7 @@ rm -f "$tmp_jwk_pub" "$tmp_jwk_priv" "$tmp_primary_context" | ||||||
| 
 | 
 | ||||||
| # Unseal the JWK from the TPM | # Unseal the JWK from the TPM | ||||||
| case "$tpm2tools_version" in | case "$tpm2tools_version" in | ||||||
|     4|5) jwk="$(tpm2_unseal -c "$tmp_load_context" ${pcr_spec:+-p pcr:$pcr_spec} 2>/dev/null)" || fail=$?;; |     4|5) jwk="$(tpm2_unseal -c "$tmp_load_context" ${pcr_spec:+-p pcr:$pcr_spec})" || fail=$?;; | ||||||
|     *) fail=1;; |     *) fail=1;; | ||||||
| esac | esac | ||||||
| if [ -n "$fail" ]; then | if [ -n "$fail" ]; then | ||||||
|  | @ -138,4 +138,4 @@ rm -f "$tmp_load_context" | ||||||
| (echo "$jwk$hdr."; /bin/cat) | jose jwe dec -k- -i- | (echo "$jwk$hdr."; /bin/cat) | jose jwe dec -k- -i- | ||||||
| 
 | 
 | ||||||
| # Exit with the status of the last command | # Exit with the status of the last command | ||||||
| exit $? | exit $? | ||||||
|  | @ -186,7 +186,7 @@ trap 'rm -f "$tmp_primary_context" "$tmp_pcr_policy" "$tmp_jwk_pub" "$tmp_jwk_pr | ||||||
| 
 | 
 | ||||||
| # Create the TPM2 object for the JWK | # Create the TPM2 object for the JWK | ||||||
| case "$tpm2tools_version" in | case "$tpm2tools_version" in | ||||||
| 	4|5) printf "%s" "$jwk" | tpm2_create -Q -g "$hash" -C "$tmp_primary_context" -u "$tmp_jwk_pub" -r "$tmp_jwk_priv" -a "$obj_attr" -L "${policy_options[@]}" -i- || fail=$?;; |     4|5) printf "%s" "$jwk" | tpm2_create -Q -g "$hash" -C "$tmp_primary_context" -u "$tmp_jwk_pub" -r "$tmp_jwk_priv" -a "$obj_attr" -L "$policy_options" -i- || fail=$?;; | ||||||
|     *) fail=1;; |     *) fail=1;; | ||||||
| esac | esac | ||||||
| if [ -n "$fail" ]; then | if [ -n "$fail" ]; then | ||||||
|  | @ -230,4 +230,4 @@ jwe="$(jose fmt -j "$jwe" -g protected -g zlevis -g tpm2 -q "$jwk_priv" -s jwk_p | ||||||
| (echo "$jwe$jwk$(/bin/cat)") | jose jwe enc -i- -k- -I- -c | (echo "$jwe$jwk$(/bin/cat)") | jose jwe enc -i- -k- -I- -c | ||||||
| 
 | 
 | ||||||
| # Exit with the status of the last command | # Exit with the status of the last command | ||||||
| exit $? | exit $? | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue