Protection! Framework - Protection! Process
Protection! Process consists of the following steps:
Protection!'s license support subsystem is responsible for locating, reading and validating the license, providing access to the license file and firing notifications during the license load process (e.g. when the license is valid, missing or invalid).
License reading is performed using the following simple steps:
- Locating the License. If it is determined that the required license is missing, the developer can call the Resolver mechanism in order to attempt to resolve the missing license issue. If Resolver does provide a valid license, then the process of locating the license is repeated from step 1.
- Reading and Decoding the License. If the license is corrupted, the developer can call the Resolver mechanism in order to attempt to fix the corrupted license issue. If Resolver does provide a valid license, then the process of license Reading and Decoding is repeated starting from step 1.
The following steps are only performed if the license was discovered and read successfully:
- Verify that the license was issued for the correct product. Default implementation assumes that the license is valid only if the product's identifier is equal to the product's identifier within the license file.
- Check that major and minor version within the license file are valid for the product. Default implementation assumes that the license is valid if the major version for the product stored within the license is equal to the product's major version. Minor version is ignored within default implementation.
- Check product's features embedded within the license. Default implementation always assumes that any feature set is valid. However, application developers are always able to add their own checking and verifications.
- Check that the license has not expired. If the license is an evaluation license, additional checking is performed to verify that the license did not expire earlier using the value obtained from the Secret Storage. If it is determined that the license is expired, the developer can call the Resolver mechanism in order to attempt to resolve an expired license issue. If Resolver does provide a valid license, then the process is repeated starting from step 1 of Reading a License.
- Check that the license is activated. If the license is not activated, the developer can call the Resolver mechanism in order to try to activate the license. If the Resolver successfully activates the license, then the process is repeated starting from step 1 of Reading a License.
- Check that the user has accepted the terms of the License Agreement
- Check the number of running copies over the network (Professional Edition only)
- Save the earliest expiration time for the evaluation license and the License Agreement acceptance flag to the Secret Storage.
During license checking and validation, Protection! Licensing Toolkit provides detailed feedback about the process status and its results back to the application. This feedback is provided by firing appropriate sets of events. It is the responsibility of the application developer to decide which action should be taken in response to a particular Protection! event. Default implementation assumes no actions for any such events provided by Protection! Licensing Toolkit. For example: when it is determined by Protection! that the license file is invalid, the application can either exit or the application could disable all or part of its functionality. Such a decision is the responsibility of the application developer (there is no default behavior provided by Protection! Licensing Toolkit). In addition to the event based analysis/action, it is always possible to get the current status of the license at anytime during an application run to see whether it is valid.
While default implementation of the license checking mechanism provides functionality that would be enough for the majority of the applications, developers can easily override/extend any license reading/validating steps stated above to get the desired results.
The Integrity verification subsystem allows for checking and validation that the designated key classes/resources/files of the product have not been changed. This type of check is done by comparing the generated digest of those classes/resources/files with the original value stored somewhere in the product code, resources or files. The Integrity subsystem significantly increases the time and effort needed to diagnose and locate specific parts of the protection system in order to attempt to break it.
In addition to the core Protection! responsibilities such as license discovery, license reading and validation, Protection! Licensing Toolkit provides developers with various helper classes and a default implementation of the set of listeners, which provides users with feedback information regarding the Protection! license checking process and its results. Such helper classes and listeners allow the following functionalities:
- Ability to pop up a message window and/or Licensing Assistant Wizard if the license file was not found, or is corrupted, invalid or expired
- Ability to prompt the end-user to accept the terms of the license agreement using the License Acceptance dialog
- Ability to show the About Dialog with license information, application name and version, feedback information, a hyperlink to the developer's website, License type, Issue and Expiration Dates, License Number, Licensee information and a hyperlink to view the license agreement.
Ability to check Integrity for desired classes/resources in order to avoid malicious application patching.