mirror of
https://github.com/mtrojnar/osslsigncode.git
synced 2025-07-01 02:32:47 -05:00
CAB file tests
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
#!/bin/sh
|
||||
# Add an unauthenticated blob to the PE/MSI file.
|
||||
# Add an unauthenticated blob to the PE/CAB/MSI file.
|
||||
|
||||
. $(dirname $0)/../test_library
|
||||
script_path=$(pwd)
|
||||
@ -24,21 +24,37 @@ if test -s "test.exe"
|
||||
fi
|
||||
|
||||
# CAB file
|
||||
# Command is not supported for non-PE/non-MSI files
|
||||
test_name="362. Add an unauthenticated blob to the CAB file"
|
||||
printf "\n%s\n" "$test_name"
|
||||
if test -s "test.ex_"
|
||||
then
|
||||
../../osslsigncode sign -h sha256 \
|
||||
-st "1556668800" \
|
||||
-certs "${script_path}/../certs/cert.pem" -key "${script_path}/../certs/key.pem" \
|
||||
-in "test.ex_" -out "test_362_signed.ex_"
|
||||
../../osslsigncode add \
|
||||
-addUnauthenticatedBlob \
|
||||
-in "test_362_signed.ex_" -out "test_362.ex_"
|
||||
verify_signature "$?" "362" "ex_" "success" "@2019-09-01 12:00:00" \
|
||||
"UNUSED_PATTERN" "ASCII" "BEGIN_BLOB" "MODIFY"
|
||||
test_result "$?" "$test_name"
|
||||
else
|
||||
printf "Test skipped\n"
|
||||
fi
|
||||
|
||||
# MSI file
|
||||
test_name="362. Add an unauthenticated blob to the MSI file"
|
||||
test_name="363. Add an unauthenticated blob to the MSI file"
|
||||
printf "\n%s\n" "$test_name"
|
||||
if test -s "sample.msi"
|
||||
then
|
||||
../../osslsigncode sign -h sha256 \
|
||||
-st "1556668800" \
|
||||
-certs "${script_path}/../certs/cert.pem" -key "${script_path}/../certs/key.pem" \
|
||||
-in "sample.msi" -out "test_362_signed.msi"
|
||||
-in "sample.msi" -out "test_363_signed.msi"
|
||||
../../osslsigncode add \
|
||||
-addUnauthenticatedBlob \
|
||||
-in "test_362_signed.msi" -out "test_362.msi"
|
||||
verify_signature "$?" "362" "msi" "success" "@2019-09-01 12:00:00" \
|
||||
-in "test_363_signed.msi" -out "test_363.msi"
|
||||
verify_signature "$?" "363" "msi" "success" "@2019-09-01 12:00:00" \
|
||||
"UNUSED_PATTERN" "ASCII" "BEGIN_BLOB" "MODIFY"
|
||||
test_result "$?" "$test_name"
|
||||
else
|
||||
|
Reference in New Issue
Block a user