简体   繁体   English

Windows 10忽略我的设置文件上的Authenticode

[英]Windows 10 ignores Authenticode on my setups files

Being on the "Fast Ring" of Windows 10, I got a strange behaviour on my own setup executables: 在Windows 10的“快速响铃”上,我在自己的安装可执行文件中遇到了一个奇怪的行为:

I'm SHA-1 signing them with Authenticode since years the same way and never had any problems. 我是SHA-1用Authenticode签署他们多年以同样的方式,从来没有任何问题。

Recently Windows 10 does not recognize my (valid) signatures. 最近,Windows 10无法识别我的(有效)签名。

When downloading a setup.exe from my website and executing it, the Windows SmartScreen message box appears and tells me: 从我的网站下载setup.exe并执行它时,会出现Windows SmartScreen消息框并告诉我:

... ...
Publisher: unknown 出版社:未知
... ...

When viewing the properties of the just downloaded setup executable, it shows the signature, and tells me that the signature is valid. 查看刚下载的安装程序可执行文件的属性时,它会显示签名,并告诉我签名有效。

In addition, the whole certificate chain is valid. 此外,整个证书链是有效的。

I'm signing it with something like this: 我用这样的东西签名:

SignTool.exe sign /v /t http://timestamp.verisign.com/scripts/timstamp.dll 
    /f "my-authenticode.pfx" /p "my-password" "my-setup.exe"

(Line-breaks added for readability) (为了便于阅读,添加了换行符)

My question: 我的问题:

Is anyone aware of a possible reason (and fix) for this? 是否有人知道可能的原因(并修复)?

More Information : 更多信息

I can think of possible reasons: 我可以想到可能的原因:

  • Signing with Windows 10 Fast Ring is buggy . 使用Windows 10 Fast Ring进行签名是错误的 (I've signed on Windows Server 2008 R2 with the same behaviour). (我已使用相同的行为在Windows Server 2008 R2上签名)。
  • Running the downloaded setup executable within Windows 10 Fast Ring is buggy. 在Windows 10 Fast Ring中运行下载的安装程序可执行文件是错误的。

Update 1: 更新1:

I've found a MSDN blog article back from 2013 that seems to talk about something similar as I discover, but I still cannot see whether this really applies. 从2013年发现了一篇MSDN博客文章,似乎在谈论类似于我发现的东西 ,但我仍然无法看到这是否真的适用。

More strange: Older downloads from our website, signed with the same Authenticode certificate do not trigger the warning. 更奇怪的是:使用相同的Authenticode证书签名的旧网站下载不会触发警告。

Maybe SmartScreen compares the timestamp and behaves differently for newer signatures/setup executables? 也许SmartScreen会比较时间戳,并且对于较新的签名/设置可执行文件的行为会有所不同?

Maybe I would need to add additional/different parameters when calling SignTool.exe? 也许我需要在调用SignTool.exe时添加其他/不同的参数?

Update 2: 更新2:

On a non-Fast Ring Windows 10, the SmartScreen warning is not displayed. 在非快速环Windows 10上, 显示SmartScreen警告。

In addition, there is also a similar SO posting which didn't help me further. 此外, 还有类似的SO帖子 ,这对我没有帮助。

Plus, there is a Symantec posting, that claims : 此外, 有赛门铁克的帖子声称

For Windows Vista 64-bit and Windows 7 the signing process has changed. 对于Windows Vista 64位和Windows 7,签名过程已更改。 The code cannot simply be signed, it also needs to be "cross-signed" with a certificate provided by Microsoft. 代码不能简单地签名,它还需要与Microsoft提供的证书“交叉签名”。

This is strange to me since my signing procedure worked successfully until recently. 这对我来说很奇怪,因为我的签名程序直到最近成功运作。

They further link to their own instructions which talk about kernel mode software only. 他们进一步链接到他们自己的指令 ,只谈论内核模式软件。

Update 3: 更新3:

User GSerg pointed me to " Windows Enforcement of Authenticode Code Signing and Timestamping " on Microsoft TechNet. 用户GSerg向我指出了Microsoft TechNet上的“ Windows执行Authenticode代码签名和时间戳 ”。

This seems to go into the right direction. 这似乎正朝着正确的方向发展。

I've seen that my current certificate is SHA-1. 我已经看到我目前的证书是SHA-1。 I've just updated it to SHA-2/SHA-256 by re-issuing it from Thawte. 我刚刚从Thawte重新发布它,将它更新为SHA-2 / SHA-256。

Now, I still get a SmartScreen warning on my local Windows 10 Fast Ring PC but at least it now prints the publisher. 现在,我仍然在我的本地Windows 10 Fast Ring PC上收到SmartScreen警告,但至少它现在打印出版商。

在此输入图像描述

I'll no purchase a code signing cert from DigiCert since I believe that the certificate chain also has influence on how the SmartScreen filter sees my application. 我不会从DigiCert购买代码签名证书,因为我相信证书链也会影响SmartScreen筛选器如何看待我的应用程序。 I do hope it is an improvement compared to the Thawte certificate I'm currently using. 我希望与我目前正在使用的Thawte证书相比,这是一项改进。

If you plan to sign for Windows Vista, please note that there was a problem with SHA-256 signed files . 如果您打算签署Windows Vista,请注意SHA-256签名文件存在问题 The linked TechNet article talks about dual signing to overcome this. 链接的TechNet文章讨论了双重签名以克服这个问题。

Update 4: 更新4:

See also this SO answer that deals about passing the SmartScreen warning with signed applications. 另请参阅此SO答案该答案涉及通过签名应用程序传递SmartScreen警告。

If this DigiCert certificate plus waiting to get enough reputation still does not help, I'll probably have to swallow the bitter pill and buy an extended validation (EV) code signing certificate (which requires a hardware token and is more expensive). 如果这个DigiCert证书加上等待获得足够的声誉仍然没有帮助,我可能不得不吞下苦药并购买扩展验证(EV)代码签名证书 (这需要硬件令牌并且更昂贵)。

Update 5: 更新5:

After approx. 大约一会儿 one day, SmartScreen seems to not show any warnings anymore. 有一天,SmartScreen似乎不再显示任何警告。

Seems that my now dual-signed setup executables (SHA-1 plus SHA-256) already got enough reputation to successfully pass the SmartScreen tests. 似乎我现在的双重签名安装可执行文件(SHA-1加上SHA-256)已经获得了足够的声誉,无法成功通过SmartScreen测试。

在此输入图像描述

My certification path/chain now looks like this: 我的认证路径/链现在看起来像这样:

在此输入图像描述

What looks a bit strange to me is that the root certificate "thawte" still uses SHA-1. 对我来说有点奇怪的是根证书“thawte”仍然使用SHA-1。

I would have expected that this still causes SmartScreen worries, but it seems it doesn't. 我原以为这仍然会引起SmartScreen的担忧,但似乎没有。

Update 6: 更新6:

The article " Do You Need SHA-2 Signed Root Certificates? " explains why you do not need a SHA-256 root certificate. 文章“ 您是否需要SHA-2签名根证书? ”解释了为什么你不需要一个SHA-256根证书。

In the meantime I've also received my Authenticode certificate from DigiCert. 与此同时,我还收到了DigiCert的Authenticode证书。 I'm using it in some setups already. 我已经在一些设置中使用它了。

It only took about one single day until the SmartScreen filter did pick it up and not warn about it anymore. 它只花了大约一天,直到SmartScreen过滤器确实接收它并且不再警告它。

So I'm now having a Thawte Authenticode code signing certificate and a DigiCert Authenticode code signing certificate. 所以我现在有一个Thawte Authenticode代码签名证书和一个DigiCert Authenticode代码签名证书。

If I understood the SHA-256 implications earlier, I could have saved the money for the DigiCert certificate. 如果我之前了解SHA-256的含义,我本可以节省DigiCert证书的费用。

As user GSerg pointed out , the reason for the error in my initial question was that I'm using SHA-1 only which is " deprecated " by Microsoft since 2016. 正如用户GSerg指出的那样 ,我最初的问题出错的原因是我使用的是SHA-1,这是自2016年以来微软“ 弃用 ”的。

After dual-signing my setup executable both with SHA-1 and SHA-256 (and waiting some days), the SmartScreen filter does not complain anymore. 使用SHA-1和SHA-256双重签名我的设置可执行文件(并等待几天)后,SmartScreen筛选器不再抱怨。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM