Small fixes to make it work, using fixed javascript-opentimestamps

This commit is contained in:
kexkey
2019-08-14 15:44:16 -04:00
committed by kexkey
parent 8fc7d0f708
commit 8168bed0d5
4 changed files with 26 additions and 6 deletions

View File

@@ -91,6 +91,7 @@ verify() {
local result
local returncode
local message
local data
# Let's create the OTS file locally from the base64
@@ -147,13 +148,25 @@ verify() {
trace_rc ${returncode}
if [ "${returncode}" -eq "0" ]; then
# String found
data="${data}success\"}"
# "Success!" found
data="${data}success"
else
# String not found
data="${data}error\",\"error\":\"${result}\"}"
# "Success!" not found
echo "${result}" | grep "Pending" > /dev/null
returncode=$?
trace_rc ${returncode}
if [ "${returncode}" -eq "0" ]; then
# "Pending" found
data="${data}pending"
else
# "Pending" not found
data="${data}error"
fi
fi
data="${data}\",\"message\":\"${result}\"}"
trace "[verify] data=${data}"
echo "${data}"