SoftwareShield System Feature Guide > License Recovery > Auto-Replace Main License File

Auto-Replace Main License File


Before reading the rest of this page, you should already understand the basics of license recovery. If not, please read License Recovery in this Feature Guide.

Auto-Replace Main License File is an option you can set in your license project before you compile it for distribution. The option can only be set if you also enable Auto-Recover. When set, in the case that an inconsistent state arises which could possibly be recovered from by replacing the entire Main License File with a copy of a Hidden Alias File, an attempt to do so is made.

If you enable this option, an attempt to Auto-Replace the Main License File will be made if:

  1. During the scope of the StartUp call, none of the Alias Files were found, but the Virgin Registry Data (if any) was found. This indicates that the Alias Files have been purposefully deleted, but the software had indeed been run on the machine before. This is an inconsistent state.

  2. During the scope of the StartUp call, all of the Alias Files were found, but at least one of them either did not corroborate (was out of sync) or had been internally altered (tampered with). This is an inconsistent state.

To best understand when and where a license will be Auto-Replaced during the scope of the StartUp call, please have a copy of the SoftwareShield ClientProtector Control Flow Charts on hand as you read the rest of this section.

Replacing the Main License File using this option is only possible if the license uses at least one Hidden Alias File and at least one of the Hidden License Files still exists on the machine in the correct location and has not been tampered with.

If one of the above inconsistent states arises and you have set the option to Auto-Replace the Main License File, the following occurs:

  1. All the hidden Alias Files that can be found for this license are checked for their internal date and time.

  2. If any one of them has a more recent internal date/time, then it is marked as the source for replacement. In the case that more than one has a more recent date/time, the most recent one is marked.

  3. If none of the Hidden Alias Files are marked more recent, then control passes to the Auto-Recover mechanism.

  4. If a more recent Hidden Alias File was marked, the entire contents of the Main License File is overwritten with a copy of the contents from the most recent Hidden Alias File.

  5. The license is forced to recover. See Auto-Recover.

Using the Auto-Replace Main License File option requires no user intervention if one of the above mentioned inconsistent states arises. While this is convenient for you and the user, it is not highly secure because a cracker may be able to make repeated attacks on your software to observe its behaviour without the need to contact you to recover it. It is important to consider the tradeoffs here and make a careful decision about its use.

More Information

For help on actually setting the Auto-Replace Main License File option in your license, see License Behaviour Tab in the SoftwareShield License Manager Reference.

For help on understanding the flow of control during the call to StartUp and how the logic behind Auto-Replace Main License File works, see SoftwareShield ClientProtector Control Flow-Charts in the ClientProtector Reference.

Related Topics