使用electron-builder出现错误:Can’t sign app: The specified timestamp server either could not be reached or returned an invalid response.
解决方案:修改package.json为
{
"build":{
"win":{
"icon": "public/assets/icon.ico",
"signingHashAlgorithms": [
"sha256"
],
"signDlls": true,
"rfc3161TimeStampServer": "http://timestamp.digicert.com",
"certificateFile": 证书,
"certificatePassword": 密码,
}
}
}
注意signingHashAlgorithms一定只写sha256,才会应用rfc3161TimeStampServer。如果写sha1,就会应用timeStampServer
参考自:
https://github.com/electron-userland/electron-builder/issues/2795
https://www.electron.build/configuration/win