Managing features on a license basis for a C++ application

We are trying to offer a license mechanism for every feature our Linux application is running, and we are thinking of controlling it in a centralized way using a license server:

Our aim for licensing is:

  • Deny features the operator has not bought.
  • Offer trials (features which expire if they are not bought).
  • Activate features for periods of time, and make them available just for some period of time.
  • Is there any server license which allow us to do this (basically, we would use sockets to communicate with our application)? What else can we do (for example, use some open source software, read, etc.) to get started?


    Do you really need to "phone home"?

    I've seen a relatively painless license system, through which the user was provided an XML file that described the period the license was valid, an optional IP address, and the list of "unlocked" features. A digital signature was generated using the vendor's private key, which was reinserted into the license file. At startup, the application was reading the license, validating it, checking the IP and unlocking the features accordingly.

    The vendor can provide newer licenses to the client when needed.

    Although you could theoretically fool the license by changing the machine's local time and fudging with the IP address, in that case this would have made the application quite cumbersome to use, so this was not a problem.


    If you really want to use a license server then make sure that your application does not have to contact it all the time to authorise use - this will lead to no end of problems when people lose their Internet connection or your server goes down or crashes.

    I would suggest having something where a key is downloaded and stored locally, thus reducing round trips to the server all the time. The key can be encrypted based on the user's machine details so that keys cannot be shared.

    We've used the HASP hardware key in the past and while they defnitely work and provide a solution, I don't think they are what you want as they are programmed once and that's that. For example, you wouldn't be able to update the HASP key to close a trial period.


    有时候软件确实需要保护 - 在这里查看这些人 - 他们提供硬件和软件解决方案。

    链接地址: http://www.djcxy.com/p/81872.html

    上一篇: 使用许可证文件来保护DLL文件

    下一篇: 针对C ++应用程序的许可证管理功能