cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
sanatupadhyay
Level 2

Problem in License validation using C++ SDK with a valid license in trusted store.

Hello community members,

I am using a combination of FNE and FNO for my application. The front-end of my code successfully activates a license using FNO and places it in the trusted store of users' PC. The front-end is also able to successfully validate the license when needed.

Now I want to include a second layer of protection. Lets say I have a C++ created dll running at the back-end, and I want to validate my license that was created by the front-end in the dll as well. I use view.c in the examples of the C++ SDK as a starting point, to observe if I can access the license in the trusted storage.

I can do it successfully, and I get the following output (I am putting only relevant part here):

INFO: ==============================================
INFO: Features found in trusted storage:

INFO: 1: Feature_Name 1.0 10-aug-2024 1 HOSTID=ID_STRING=JH7BL45YGHE VENDOR_STRING="8344-j84j-4hfj-3jen-b485-48hf-bdh9-3jdp" ISSUED=24-jul-2024 START=10-jul-2024
INFO: Valid for acquisition

So the good news is that I can see that there is one available license which is valid for acquisition. View.c uses FlcFeatureGetValidStatusForAcquisition() function to check the validity. However, the problem arises when I try to actually validate the license using FlcAcquireLicense(), because I get an error. Here is the code and the output when I append the following code snippet in view.c

Code snippet:

DisplayInfoString(_T("Trying to acquire license!"));

if (!FlcAcquireLicense(licensing, &license, "Feature_Name", "1.0", error))
{
sDisplayErrorString(_T("acquiring the target"), error);
(void)sCleanup(&licensing, &error);
return -1;
}
sDisplayInfoString(_T("acquired target license"));

/*----------------------------------------------------------------------*/
/* return license */
/*----------------------------------------------------------------------*/
if (!FlcReturnLicense(licensing, &license, error))
{
sDisplayErrorString(_T("returning the target"), error);
(void)sCleanup(&licensing, &error);
return -1;
}

Addition of this code in view.c creates the following output.

INFO: Features found in trusted storage:

INFO: 1: Feature_Name 1.0 10-aug-2024 1 HOSTID=ID_STRING=JH7BL45YGHE VENDOR_STRING="8344-j84j-4hfj-3jen-b485-48hf-bdh9-3jdp" ISSUED=24-jul-2024 START=10-jul-2024
INFO: Valid for acquisition

INFO: Trying to acquire license!
ERROR: acquiring the target: [1,7E6,9,0[7000000B,0,702C7]]
Requested feature was not found.

 

I don't understand why the license cannot be acquired even when it is found to be valid! Could somebody please help me here.

0 Kudos
(2) Replies
jberthold
Revenera Moderator Revenera Moderator
Revenera Moderator

Hi @sanatupadhyay ,

Please submit a support ticket so that someone can work with you directly to resolve your issue.

Thanks,

Jim

0 Kudos

 Hi @jberthold,

Thanks for your directions!

0 Kudos