Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

licence Not working if Play with PC Date #5

Open
deekumar1211 opened this issue Sep 14, 2018 · 1 comment
Open

licence Not working if Play with PC Date #5

deekumar1211 opened this issue Sep 14, 2018 · 1 comment

Comments

@deekumar1211
Copy link

I created a small application based on licences mechanishm where i sent public key and license file with tool. Here application have check like

if(autheticateLicense()) // should work till Sep 06 2018
imageLoad();
else
JOptionPane.showMessageDialog(new JFrame(), "License Not Valid", "Error", JOptionPane.ERROR_MESSAGE);

/**
 * Function to authenticate 
 */
private static boolean autheticateLicense() {
	boolean result=false;
	LicenseManager licenseManager = LicenseManager.getInstance();
	try 
	{
		License license = licenseManager.getLicense();
		result =  licenseManager.isValidLicense(license);
	}
	catch (Exception e)
	{
		e.printStackTrace();
	}
	return result;
}

The licences i have made is valid upto Sep 06 2018 and after this date application should not work as per above check. I got an issue where if i change the date of my computer to back date e.g. Sep 04 2018 tool start working.

@decebals
Copy link
Owner

@deekumar1211
I will try to take a look but I don't have too much time. I think that you can do it yourself.
Create a Test.java class with the code presented here in issue in main method, add license generated by you, change the computer's data and run the test from your IDE in debug mode with a breakpoint on licenseManager.isValidLicense(license) to see what it happens.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants