diff --git a/docs/schematic_simplified.svg b/docs/schematic_simplified.svg
index 6e4250a..8b9e802 100644
--- a/docs/schematic_simplified.svg
+++ b/docs/schematic_simplified.svg
@@ -1,4 +1,4 @@
-
\ No newline at end of file
+ HEADCommit#TimestampCommit#TimestampFiles V1TimestampLTV Metadata##Commit#Files V2#Commit#TimestampLTV Metadata###
\ No newline at end of file
diff --git a/hooks/timestamping b/hooks/timestamping
index ffe37e8..b1f1a45 100644
--- a/hooks/timestamping
+++ b/hooks/timestamping
@@ -204,11 +204,16 @@ request_token() {
local RESPONSE_STATUS=$(openssl ts -reply -in "$RESPONSE_FILE" -text 2> "$OUT_STREAM" | awk '/Status: /{print; exit}' | sed 's/Status: //' | sed 's/\.//')
if [ "$RESPONSE_STATUS" != "Granted" ]; then
echo "Error: Token request was not granted."
- local STATUS_INFO=$(openssl ts -reply -in "$RESPONSE_FILE" -text 2> "$OUT_STREAM" | awk '/Status info:/{f=1} f {print} /Failure info: /{exit}')
- echo "$STATUS_INFO"
- echo "Note: If rejection reason is unrecognized or unsupported algorithm, then this tsa cannot be used for this repository, since it uses --object-format=$ALGO"
- echo "The token request was:"
- openssl ts -query -in "$REQ_FILE" -text 2> "$OUT_STREAM"
+ if [ -z "$RESPONSE_STATUS" ]; then
+ cat "$RESPONSE_FILE"
+ echo ""
+ else
+ local STATUS_INFO=$(openssl ts -reply -in "$RESPONSE_FILE" -text 2> "$OUT_STREAM" | awk '/Status info:/{f=1} f {print} /Failure info: /{exit}')
+ echo "$STATUS_INFO"
+ echo "Note: If rejection reason is unrecognized or unsupported algorithm, then this tsa cannot be used for this repository, since it uses --object-format=$ALGO"
+ echo "The token request was:"
+ openssl ts -query -in "$REQ_FILE" -text 2> "$OUT_STREAM"
+ fi
return 1
fi
if ! openssl ts -reply -in "$RESPONSE_FILE" -token_out -out "$OUTPUT_FILE" &> "$OUT_STREAM"; then