osslsigncode/tests/recipes/52_sign_jp_medium
olszomal 00290bc363 Test improvements (#14)
* removed pvk keys tests
* new 11_sign_nest test
* improved verify_signature()
* new tests of timestamping with the add command
2019-07-20 12:54:46 +02:00

32 lines
877 B
Bash

#!/bin/sh
# Signing a CAB file with "jp medium" option
# There is no implementation:
# https://github.com/mtrojnar/osslsigncode/blob/0bea1ac8f6d61ed42dd154305a4d5b8c27478ad0/osslsigncode.c#L2555-L2562
. $(dirname $0)/../test_library
# PE file
#
# CAB file
test_name="521. Signing a CAB file with jp medium option"
printf "\n%s\n" "$test_name"
if [ -s "test.ex_" ]
then
faketime -f '@2019-01-01 00:00:00' /bin/bash -c '
script_path=$(pwd)
../../osslsigncode sign -h sha256 \
-jp medium \
-certs "${script_path}/../certs/cert.pem" -key "${script_path}/../certs/key.pem" \
-in "test.ex_" -out "test_521.ex_"'
verify_signature "$?" "521" "ex_" "UNUSED_PATTERN" "UNUSED_PATTERN" "HEX" "3006030200013000" "UNUSED_PATTERN"
test_result "$?" "$test_name"
else
printf "Test skipped\n"
fi
# MSI file
#
exit 0