mirror of
https://github.com/mtrojnar/osslsigncode.git
synced 2025-07-16 17:17:28 -05:00
CAB file tests
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
#!/bin/sh
|
||||
# Attach the signature to the PE/MSI file.
|
||||
# Attach the signature to the PE/CAB/MSI file.
|
||||
|
||||
. $(dirname $0)/../test_library
|
||||
script_path=$(pwd)
|
||||
@ -21,18 +21,31 @@ if test -s "test.exe"
|
||||
fi
|
||||
|
||||
# CAB file
|
||||
# Command is not supported for non-PE/non-MSI files
|
||||
test_name="322. Attach the signature to the CAB file"
|
||||
printf "\n%s\n" "$test_name"
|
||||
if [ -s "test.ex_" ]
|
||||
then
|
||||
../../osslsigncode attach-signature -sigin "sign_cab.pem" \
|
||||
-CAfile "${script_path}/../certs/CACert.pem" \
|
||||
-CRLfile "${script_path}/../certs/CACertCRL.pem" \
|
||||
-in "test.ex_" -out "test_322.ex_"
|
||||
verify_signature "$?" "322" "ex_" "success" "@2019-09-01 12:00:00" \
|
||||
"sha256sum" "ASCII" "osslsigncode" "UNUSED_PATTERN"
|
||||
test_result "$?" "$test_name"
|
||||
else
|
||||
printf "Test skipped\n"
|
||||
fi
|
||||
|
||||
# MSI file
|
||||
test_name="322. Attach the signature to the MSI file"
|
||||
test_name="323. Attach the signature to the MSI file"
|
||||
printf "\n%s\n" "$test_name"
|
||||
if test -s "sample.msi"
|
||||
then
|
||||
../../osslsigncode attach-signature -sigin "sign_msi.pem" \
|
||||
-CAfile "${script_path}/../certs/CACert.pem" \
|
||||
-CRLfile "${script_path}/../certs/CACertCRL.pem" \
|
||||
-in "sample.msi" -out "test_322.msi"
|
||||
verify_signature "$?" "322" "msi" "success" "@2019-09-01 12:00:00" \
|
||||
-in "sample.msi" -out "test_323.msi"
|
||||
verify_signature "$?" "323" "msi" "success" "@2019-09-01 12:00:00" \
|
||||
"sha256sum" "ASCII" "osslsigncode" "UNUSED_PATTERN"
|
||||
test_result "$?" "$test_name"
|
||||
else
|
||||
|
Reference in New Issue
Block a user