dnauck / Portable.Licensing

Portable.Licensing is a cross platform software licensing framework which allows you to implement licensing into your application or library. It provides you all tools to create and validate licenses for your software.
http://dev.nauck-it.de/projects/portable-licensing
MIT License
592 stars 173 forks source link

Ability to detect system clock change? #15

Open jzajac2 opened 9 years ago

jzajac2 commented 9 years ago

I should add that I realize this isn't an 'Issue', more of a feature request, and could be a large effort, especially since this is cross platform.

Am I at least able to add my own assertion if I come up with my own mechanics for detecting system clock change?

dnauck commented 9 years ago

At time this library was developed it was not possible to open a network socket in the PCL profile, so i was not abel to check the tie of a remote ntp server.

You've two options:

  1. just the the AssertThat() method to check with your own ntp client for time differences
  2. write your own extension, like any other in LicenseValidationExtensions.cs

But be aware that not every user has network access, ntp is a UDP protocol, etc. Do not annoy your users so much. Because if someone changes his system clock he has other problems like not working SSL websites, etc. So the user is not abel to open google, read his mail, etc.

So i don't know if it is value to write a ntp client to check time differences ;)

See also #11