Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29253 Discussions

Licensing system that uses date for verification

Brian_Allison
Beginner
561 Views
If i use a licensing system for my program that uses the date for verification, how would I code it to check to see if the date has been changed?
0 Kudos
3 Replies
Ron_Green
Moderator
561 Views
I've thought about this for a day and don't have a good solution. The only thought was to try to hide a file somewhere on the system and time stamp it at install, and maybe every so often, reading it to see if time ever goes "backwards". Perhaps a file with a dot in the name, and a name that seem unrelated to this activity, maybe something like ".catalog". And try to place it away from where you install the software - in /var/log (if that is writeable at your permissions level), /tmp (may get erased from there though), /opt.

One thing we've learned in our compiler licensing - If you are checking this at the start of each program invocation you want it to be a FAST check. People notice delays in start up. For example, if the compiler's license check is more than a second, say 3-4 seconds, it's quite noticable. Take an application with thousands of source files, and each source compiles in around 1 second - that's a BIG impact. We've had such issues in the past, and every now and then we run into a customer with a lot of old license files in /opt/intel/licenses that take a long time to read through before finding the right license ( good thing to know - clean up old licenses, they do slow down your software. )

There may be some clever way to detect if the system time was set backwards to thwart your license effort. I don't know of any, save parsing through /var/log/messages.*.

ron
0 Kudos
Steven_L_Intel1
Employee
561 Views
The licensing systems I am familiar with keep a record of the date last seen and look to see if the clock has been set backwards. As Ron says, this means you need to have some persistent storage that is protected against tampering.

There are quite a few commercial licensing packages on the market - do you really need to "roll your own"?
0 Kudos
Brian_Allison
Beginner
561 Views
We have a licensing software program for our Windows version of the code that we compile, but we need something for Linux and Mac. Everything that I have found so far the company's want 3-5 thousand a year and they control the licensing.
If you know of some licensing software that lets you create your own licensing for linux and Mac let me know.
0 Kudos
Reply