Standard.Licensing
Standard.Licensing copied to clipboard
How to Right Valid lic file
var validationFailures = license.Validate()
.ExpirationDate(systemDateTime: DateTime.Now)
.When(lic => lic.Type == LicenseType.Trial)
.And()
.Signature(publicKey)
.AssertValidLicense();
if somehow cracker knows I was using this lib then he watches the real created .lic file to know what fields my app was checking. then he creates a .lic file using the same lib with his private key and passphrase and the same field structure. then I thought this fake .lic file would be accept in my app cause the above code would validate the fake one too!!!
Is there some misunderstood or something I need to change to make it right using the Lib?
@dellos - you are signing with your private key, but you validate the signature with your public key. They are a pair. So, even if someone uses the same library with the same fields, etc, to generate a license file, unless they also had your private key to sign with, their license file will fail when you validate the signature with your public key.
I can only advise not to spend so much time worrying about licensing. If someone wants to bypass it, they will. For example patching the Public Key with dnlib at runtime, it's that simple.
I can only advise not to spend so much time worrying about licensing. If someone wants to bypass it, they will. For example patching the Public Key with dnlib at runtime, it's that simple.
You are right. I was trying to invert dll to c# code the test app, and it makes sense that no matter what we do, there will be a
if ( valid) {run the app } in the code. If they can find out that point, they can patch it. So the way we're doing it here is just for the normal end user.