Windows Forms .NET 中的强命名程序集
好的,我已经阅读了这里有关强命名程序集的每个问题,只是想澄清一些事情。
首先,从我读到的内容来看,除了GAC之外,强命名程序集还可以防止恶意第三方一方更改并冒充您的代码。如果能提供一些现实世界中发生在强命名程序集之前的欺骗示例的链接,那就太好了。
如果安全性或 GAC 不是问题,那么似乎仍然建议使用强名称程序集,因为:
具有强名称程序集的客户端只能引用已签名的程序集。
没有强命名程序集的客户端可以引用您的程序集,无论它是否已签名。
没有强
这是一个公平的分析吗?
OK, I've read every question here about strong named assemblies and just want to clarify something.
First though, from what I've read, GAC aside, strong named assemblies prevent a malicious third party changing and impersonating your code. It'd be great to have some links to some real world examples of this kind of spoofing that happened pre strong named assemblies.
If security or the GAC are not a concern, it seems that it's still advisable to strong name assemblies because:
Clients who have strong named assemblies can only reference your assemblies if they are signed.
Clients who do not have strong named assemblies can reference your assembly whether it's signed or not.
Is that a fair analysis?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
警告
强名称不能防止程序集被篡改。您可以操作已签名的程序集并使用新的强名称将其退出。
但是,与任何公钥签名系统一样,您需要私钥来对被篡改的版本进行签名而不更改其强名称。
因此,强名称并不是确保某人无法更改您的代码或规避您的许可机制或类似内容的安全方法。
相关文章:可以强命名程序集可用于验证程序集作者吗?
是的,强命名程序集只能引用强命名程序集。没有强名称的程序集可以引用所有程序集。
Warning
Strong name does not prevent assemblies to be tampered with. You can manipulate a signed assembly and resign it with a new strong name.
However, like any public key signature system, you need the private key to sign the tampered version without changing its strong name.
Consequently, strong name is not a secure method to make sure someone can't change your code or circumvent your licensing mechanism or anything like that.
Related post: Can strong naming an assembly be used to verify the assembly author?
Yes, strong named assemblies can only reference strong named assemblies. Assemblies without strong name can reference all assemblies.