Jump to content

License Manager Plugin: Lisence Check Status


serge

Recommended Posts

Regarding the license manager plugin & "client trials" case,


at doing a lot of test, I can see the license "status" echo on client side can only be :
- "valid"   if valid
or
- "unknown"  if other than valid


And real cases like, "expired licence", "suspended", "invalid_location" (when being ticked in blesta licence module), are only giving at client side an "unknown" status


So in my script integration & my custom actions after license check, I'm only using "valid" case status or different of "valid" case status
          

Link to comment
Share on other sites

I think what I reported above is maybe in connection to:

 

in Blesta Table service_fields, for column "key" equal  "license_module_status"

 

- column "value" equal  "reissue....." after the Blesta general cron when the order/service passed to active status.

 

- column "value" equal  EMPTY  after the licence have been checked & validated by the licence check.

Link to comment
Share on other sites

  • 2 months later...

ok, thank to Vetal confirmation, I found strange no other found the same.

 

I even saw the place in the code where I think it's wrong, it's the way a conditional is doing, it's will be always giving  the default "unknown" answer when license Key is not "active" VS giving a detailed status like expired, etc..

Link to comment
Share on other sites

I think what I reported above is maybe in connection to:

 

in Blesta Table service_fields, for column "key" equal  "license_module_status"

 

- column "value" equal  "reissue....." after the Blesta general cron when the order/service passed to active status.

 

- column "value" equal  EMPTY  after the licence have been checked & validated by the licence check.

 

That is the desired behavior of the License Module. The license_module_status field will only contain "reissue" if the license is in a reissue state. If not in a reissue state, then it contains no data.

Link to comment
Share on other sites

ok, thank to Vetal confirmation, I found strange no other found the same.

 

I even saw the place in the code where I think it's wrong, it's the way a conditional is doing, it's will be always giving  the default "unknown" answer when license Key is not "active" VS giving a detailed status like expired, etc..

 

I think you are referring to LicenseManager::validate() on line 155 of license_manager.php. That method only returns a status of unknown if no license data is given, or the license data signature is invalid.

Link to comment
Share on other sites

Regarding the license manager plugin & "client trials" case,

at doing a lot of test, I can see the license "status" echo on client side can only be :

- "valid"   if valid

or

- "unknown"  if other than valid

And real cases like, "expired licence", "suspended", "invalid_location" (when being ticked in blesta licence module), are only giving at client side an "unknown" status

So in my script integration & my custom actions after license check, I'm only using "valid" case status or different of "valid" case status

          

 

The expired status will only be provided if the last call-home is date is more than $ttl seconds past. Where $ttl is passed into LicenseManager::validate().

 

You'll only receive a suspended status if the service for the license is suspended in Blesta, and the client makes a call-home to fetch this update. This is one reason why you should perform at least a daily call-home.

 

The invalid_location status is given if the IP, path, or domain of the client no longer matches the value stored in the encrypted license data stored on the client.

Link to comment
Share on other sites

Thanks for explanations.

 

All is matching to what I did observe, and for info, my TTL is matching to  1 day (in second unit). Licence data & Public Key & licence Key are stored on client side. With call home once a day.

 

From memory, only thing that do not match to what you describe is when location change I think it was the "unknow" status echoed at client side, so I will be re-testing that today

Link to comment
Share on other sites

 

From memory, only thing that do not match to what you describe is when location change I think it was the "unknow" status echoed at client side, so I will be re-testing that today

 

Just tested, and it's the "unknown" status returned client side when location changed

Link to comment
Share on other sites

Just tested, and it's the "unknown" status returned client side when location changed

 

Really not sure how you could get that. You should only get the unknown status if the local license data can not be decrypted.

 

When you receive the unknown status, what do you have stored for the license data on the client side? It should be the same data both before and after the client changes location before the next call home.

Link to comment
Share on other sites

ok, great explanation, thanks.

 

I was wrong in my today test, there were data (licence_data, license_key, public_key) stored client side, but as my script alway call home once after a no active status is get from local license_data passed through the license check function, I was no echoing the license status before the call home, but my script had ever this option I missed to enable today.

 

And when doing it, it's well returned the invalid_location status.

 

THANK YOU!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...