Hi,
First off, thank you so much for such a wonderful open-source project. It seems unique in this space--I haven't been able to find anything else quite like it.
Secondly, I have a few questions about how the project works. I've read through the documentation / Wiki, past Github issues, posts to this forum, but I just can't wrap my head around why / how it works in regard to a few points. Perhaps I've glossed over something crucial. I would greatly appreciate your clarification.
For reference, I'm intending on using this library to protect a single piece of C++ software (let's call this software Foo here) using hardware identification. I've been developing this software on Windows in Visual Studio. I successfully integrated the C API and static library into this application and I have had success in generating and checking licenses. My concern now lies in:
1. Reproducibility: I would like to be able to (A) Provide releases of the compiled open license manager lccgen.exe to other team members who may need to generate new licenses for Foo in the future, and (B) Re-compile this software at some point in the future if the releases no longer work, yet retain any important files/libs/keys that are required for being able to continue to generating new licenses for Foo.
--> My question here is: What, of all files that are generated on compiling lccgen.exe, are needed to continue generating licenses for Foo in the future? If I needed to re-compile this executable, what files would I need to "carry-over" (public + private keys, etc?).
2. Security. Obviously, this project has security at top of mind. Otherwise, what purpose would it serve? It appears to me that the only files that need to be included in Foo's Visual Studio project include licensecc.h, licensecc_properties.h, and datatypes.h. None of these files have sensitive or unique information from project to project, other than LCC_PROJECT_NAME. However, changing this value doesn't affect the loading of the license, so this makes me wonder:
--> What purpose does it serve to have the LCC_PROJECT_NAME macro defined in licensecc_properties.h?
I also wonder as to whether is anything unique about the static library licensecc_static.lib. This leads me to ask these questions:
--> Can this library be freely distributed and used by others without worry of it containing potentially sensitive baked information?
--> If I compiled lccgen.exe separately on two computers, could their licensecc_static.lib files be used interchangeably?
A separate question I have about terminology revolves around the definition of "Project." I see some conflicting definitions of this term in posted questions and documentation. According to your
glossary, a project is defined as follows (with my questions, comments interspersed):
"A project corresponds to one application where the licensing system need to be integrated."
- This leads me to believe that "Foo" could be considered one project.
- It also seems like Foo should have its own folder (with its own keys) in the open-license-manager/projects directory. The naming of this directory "projects" leads me to believe that a single compiled open-license-manager repository can store multiple projects. It seems like additional projects can be generated using the lccgen.exe project init command. It seems like multiple licenses can be generated for each of those projects using the same lccgen.exe executable by simply changing the project it is pointed to using the --project-folder option.
- The files generated by the lccgen.exe project init command include the private_key.rsa and public_key.h. The public key file contains a macro called "PRODUCT_NAME", which makes me wonder what the difference is between "project" and "product" here?
- The Wiki page titled "
Issue Licenses" contains the sentence
"You can re-configure the project with the LCC_PROJECT_NAME cmake variable to create a new project." This makes me wonder whether the
lccgen.exe contains any baked project name information?
"...Each project has its own private key and its own folder where licensecc is compiled."
- This directly conflicts with the logic above. It suggests that for each project like Foo, a different lccgen.exe must be compiled. Is this true?
"...Currently we support only one project per (build) machine. This is especially true in Windows, where the private key has the same name for all the projects."
- I still don't understand what this means.
I also have a question about using the environment variable LICENSE_DATA with a base64-encoded license. Currently, the license generator does not seem to support exporting a license as base64, even though it is an option. I have tried providing just the license's "sig" field as the value for this environment variable, but it doesn't seem to load it. I saw commits recently disabling this functionality because it conflicts with other functions. Is this true? If so, why?
Thanks so much. Apologies for all the questions. I'm just trying to wrap my head around this.
My best,
Ben