updates
Browse files- scripts/sign.sh +3 -3
- scripts/verify.sh +1 -1
scripts/sign.sh
CHANGED
@@ -18,7 +18,7 @@ shift
|
|
18 |
|
19 |
TRUEPIC_CLI=/home/user/app/truepic
|
20 |
STEG_SCRIPTS=/home/user/app/scripts/
|
21 |
-
PRIVATE_KEY=/home/user/.truepic/
|
22 |
|
23 |
filename=$(basename "${MEDIA_FILE}")
|
24 |
extension="${filename##*.}"
|
@@ -35,7 +35,7 @@ fi
|
|
35 |
|
36 |
debug_echo -n "Signing media..."
|
37 |
signed_no_watermark=$(mktemp).${extension}
|
38 |
-
${TRUEPIC_CLI} sign $MEDIA_FILE "$@" --output ${signed_no_watermark} > /dev/null 2>&1
|
39 |
debug_echo " --> ${signed_no_watermark}"
|
40 |
|
41 |
debug_echo
|
@@ -126,7 +126,7 @@ debug_echo " --> ${watermarked_image}"
|
|
126 |
|
127 |
debug_echo
|
128 |
debug_echo -n "Re-signing the watermarked media..."
|
129 |
-
${TRUEPIC_CLI} sign ${watermarked_image} \
|
130 |
--ingredient-manifest-store ${no_watermark_manifest} \
|
131 |
--output output.${extension} \
|
132 |
--assertions-inline '{
|
|
|
18 |
|
19 |
TRUEPIC_CLI=/home/user/app/truepic
|
20 |
STEG_SCRIPTS=/home/user/app/scripts/
|
21 |
+
PRIVATE_KEY=/home/user/.truepic/truepic/private.key
|
22 |
|
23 |
filename=$(basename "${MEDIA_FILE}")
|
24 |
extension="${filename##*.}"
|
|
|
35 |
|
36 |
debug_echo -n "Signing media..."
|
37 |
signed_no_watermark=$(mktemp).${extension}
|
38 |
+
${TRUEPIC_CLI} sign --profile truepic $MEDIA_FILE "$@" --output ${signed_no_watermark} > /dev/null 2>&1
|
39 |
debug_echo " --> ${signed_no_watermark}"
|
40 |
|
41 |
debug_echo
|
|
|
126 |
|
127 |
debug_echo
|
128 |
debug_echo -n "Re-signing the watermarked media..."
|
129 |
+
${TRUEPIC_CLI} sign --profile steg ${watermarked_image} \
|
130 |
--ingredient-manifest-store ${no_watermark_manifest} \
|
131 |
--output output.${extension} \
|
132 |
--assertions-inline '{
|
scripts/verify.sh
CHANGED
@@ -156,7 +156,7 @@ timestamp=$(
|
|
156 |
)
|
157 |
public_key=$(
|
158 |
echo "${verification_json}" | \
|
159 |
-
jq -r '.manifest_store[]
|
160 |
base64 -d | \
|
161 |
openssl x509 -pubkey -noout
|
162 |
)
|
|
|
156 |
)
|
157 |
public_key=$(
|
158 |
echo "${verification_json}" | \
|
159 |
+
jq -r '.manifest_store[0].certificate.cert_der' | \
|
160 |
base64 -d | \
|
161 |
openssl x509 -pubkey -noout
|
162 |
)
|