licensius icon indicating copy to clipboard operation
licensius copied to clipboard

licence Not working if Play with PC Date

Open deekumar1211 opened this issue 6 years ago • 1 comments

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.

deekumar1211 avatar Sep 14 '18 16:09 deekumar1211

@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.

decebals avatar Sep 19 '18 13:09 decebals