如何对可再发行控件库实施许可?
如果您有一个 WPF 控件库想要授权给开发人员,如何强制执行许可证限制,以便该库可以在自己的应用程序中使用和分发,同时防止最终用户重复使用该 .dll?
我是从严格的业务角度来处理这个问题的,所以我试图找到一种解决方案,不允许不加区别的用户做一些简单的事情,比如用密钥传递 .dll 并能够共享它。
对此的任何想法都是绝对受欢迎的,并且可以随意发表哲学观点。
If you have a WPF control library which you wanted to license to developers, how do enforce license restrictions such that the library could be used and distributed in their own applications and yet prevent the end-users from reusing that .dll?
I'm approaching this from a strict business perspective, so I'm trying to find a solution that wouldn't allow indiscriminating users to do something as simple as pass the .dll around with the key and be able to share it.
Any thoughts on this are absolutely welcome and feel free to wax philosophical.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
严格来说,这类问题确实很难完全解决,而且无论你做什么,都有可能(尽管可能足够难)更改验证许可证的 IL 代码并完全绕过检查。 但是,如果您真的对此感到满意,您可以强制您的客户将其应用程序的编译版本提交给您,以为其应用强名称(使用您的私钥)。 这样,您可以根据只有您拥有的特定密钥来检查调用程序集的公钥令牌。 我绝不建议将这种方法用于通用用途,但如果确实有必要这样做,那么这是可行的。 请记住,可能需要几个小时才能在程序集中找到许可证检查代码并将其完全删除。 这将使任何许可证限制变得毫无用处!
Strictly speaking, these kind of problems are really hard to solve completely, and whatever you do, it WILL be possible (though it might be hard enough) to alter the IL code that validates the license and bypass the check completely. However, if you're really comfortable with it, you could force your clients to submit the compiled version of their application to you to apply a strong name to it (using your private key). This way, you can check the public key token of the calling assembly against a specific key that only you own. By no means I suggest such a method for generic use, but if it's REALLY THAT NECESSARY to do so, this could work. Just keep in mind that it would probably take a few hours to find the license checking code in your assembly and removing it altogether. This will render any license restriction useless!