I dropped a few tokens on the ground and I forgot about them

This commit is contained in:
kexkey
2021-11-17 01:37:44 -05:00
parent b7c89ef759
commit 40a5ff828a
4 changed files with 7 additions and 8 deletions

View File

@@ -196,7 +196,6 @@ generate_token() {
trace 3 "[generate_token] d=${d}\n"
local p64=$(exec_in_test_container sh -c "echo -n '{\"id\":\"${id}\",\"exp\":${d}}' | basenc --base64url | tr -d '='")
trace 3 "[generate_token] p64=${p64}\n"
# local s=$(echo -n "${h64}.${p64}" | openssl dgst -hmac "${key}" -sha256 -r | cut -sd ' ' -f1)
local sig=$(exec_in_test_container sh -c "echo -n \"${h64}.${p64}\" | openssl dgst -hmac \"${key}\" -sha256 -r -binary | basenc --base64url | tr -d '='")
trace 3 "[generate_token] sig=${sig}\n"
local token="${h64}.${p64}.${sig}"