mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-02-03 01:50:10 -05:00
Replace signtool with osslsigncode
This commit is contained in:
parent
f257145ee0
commit
b457c8c1fa
18
release-tool
18
release-tool
@ -303,10 +303,10 @@ checkTransifexCommandExists() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
checkSigntoolCommandExists() {
|
checkOsslsigncodeCommandExists() {
|
||||||
command -v signtool > /dev/null
|
command -v osslsigncode > /dev/null
|
||||||
if [ 0 -ne $? ]; then
|
if [ 0 -ne $? ]; then
|
||||||
exitError "signtool command not found on the PATH! Please check that you have correctly installed the Windows SDK."
|
exitError "osslsigncode command not found on the PATH! Please install it using 'pacman -S mingw-w64-osslsigncode'."
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -851,7 +851,7 @@ appsign() {
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
checkSigntoolCommandExists
|
checkOsslsigncodeCommandExists
|
||||||
|
|
||||||
if [[ ! -f "${signtool_key}" ]]; then
|
if [[ ! -f "${signtool_key}" ]]; then
|
||||||
exitError "Key file was not found!"
|
exitError "Key file was not found!"
|
||||||
@ -862,12 +862,18 @@ appsign() {
|
|||||||
|
|
||||||
for f in "${sign_files[@]}"; do
|
for f in "${sign_files[@]}"; do
|
||||||
if [[ ${f: -4} == '.exe' ]]; then
|
if [[ ${f: -4} == '.exe' ]]; then
|
||||||
logInfo "Signing file '${f}' using signtool..."
|
logInfo "Signing file '${f}' using osslsigncode..."
|
||||||
signtool sign -f "${signtool_key}" -p "${password}" -v -t "http://timestamp.comodoca.com/authenticode" "${f}"
|
# output a signed exe; we have to use a different name due to osslsigntool limitations
|
||||||
|
osslsigncode sign -pkcs12 "${signtool_key}" -pass "${password}" \
|
||||||
|
-t "http://timestamp.comodoca.com/authenticode" -in "${f}" -out "${f}.signed"
|
||||||
|
|
||||||
if [ 0 -ne $? ]; then
|
if [ 0 -ne $? ]; then
|
||||||
|
rm -f "${f}.signed"
|
||||||
exitError "Signing failed!"
|
exitError "Signing failed!"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# overwrite the original exe with the signed exe
|
||||||
|
mv -f "${f}.signed" "${f}"
|
||||||
else
|
else
|
||||||
logInfo "Skipping non-EXE file '${f}'..."
|
logInfo "Skipping non-EXE file '${f}'..."
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user