This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- FlexNet Publisher
- :
- FlexNet Publisher Knowledge Base
- :
- Sample code to allow checkout based on license file and trusted storage model
Subscribe
- Mark as New
- Mark as Read
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
Sample code to allow checkout based on license file and trusted storage model
Sample code to allow checkout based on license file and trusted storage model
Seen below is a sample of modified lsvendor.c that contains a server side checkout filter. It uses a flag that will detect if the license that is being checked out is from the Server Trusted Storage or a License file and will deny/allow accordingly.
int TS_License_out()
{
char* feature;
CONFIG * conf;
ls_get_attr(LS_ATTR_FEATURE, &feature);
ls_log_asc_printf("outfilter check out for lic file\n");
conf = lc_get_config(lm_job, feature);
printf("license type is %d\n", conf->nTSFeatFlag); //Check if license is TS or Lic file
if (conf->nTSFeatFlag > 0) {
ls_log_asc_printf("Allow Checkout"); // Allow if > 0(TS)
return (1);
}
else {
ls_log_asc_printf("Deny Checkout"); // Deny if 0 (Lic File)
lc_set_errno(lm_job, -53);
return(0);
}
}
100% helpful
(1/1)
Comments
Oct 22, 2020
10:27 AM
- Mark as Read
- Mark as New
- Permalink
- Report Inappropriate Content
Oct 22, 2020
10:27 AM
Why not simply have a FNP library version when building to vendor daemon that simply doesn't support certificate at all?
Oct 23, 2020
12:00 AM
- Mark as Read
- Mark as New
- Permalink
- Report Inappropriate Content
Oct 23, 2020
12:00 AM
Yes that can be definitely one of the ways, but in this approach suggested above we are allowing the user to have an option to allow or deny checkout through certificate/TS depending on the requirement which might vary each time.