我可以从DLL中删除数字签名吗? [英] Can I remove a digital signature from a DLL?

查看:672
本文介绍了我可以从DLL中删除数字签名吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的安装程序在构建过程中使用代码签名证书构建标志DLL。

My installer build "signs" a DLL using a Code Signing certificate during the build process.

我注意到,如果我连续建立两次,第二次构建失败,因为DLL已经签名,所以signcode阻塞。显然,我可以通过在构建中签署DLL的副本来解决这个问题,但问题引起了我的兴趣:

I've noticed that if I try to build twice in succession, the second build fails because the DLL is already signed so signcode chokes. Obviously I can fix this by signing a copy of the DLL in the build, but the problem intrigued me:

是否可以取消一个DLL,如果没有,为什么不...?

Is it possible to "unsign" a DLL, and if not, why not...?

推荐答案

确实有可能,但不是微不足道。

Sure it's possible, but not trivial.

尽管保存预编译的DLL的副本会更容易。

Although it would be easier to save a copy of the presigned DLL.

此数字签名只是附加到PE文件。你可以编写一个删除签名的程序,如果你愿意的话。

This digital signature is little more than an extra section appended to the end of a PE file. You could write a program that deleted the signature, if you want.

截断文件并不简单;您必须删除对文件头中的签名的引用。如果DLL有多个签名,并且您只想删除一个签名,可能会变得复杂。

It's not quite as simple as truncating the file; you have to remove references to the signature in the file header. It could get complicated if the DLL has multiple signatures and you just want to remove one.

PE文件的格式是公开记录的这里

The format of a PE file is publicly documented here

这篇关于我可以从DLL中删除数字签名吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆