-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The version number of the Modelica library is not passed to the SEMLA licence manager #10
Comments
It is unusual to hard-connect licenses to version numbers: there are so many instances when new versions are needed. Isn't a date a much better solution in general? I agree that a version umber could be useful, but please elaborate on your use case. |
in general i agree. Licenses connected to a date are the most common solution. the main use case for us is to phase out old versions (mainly old major versions). |
Sorry for the long delay, but I now understand your motivation. Thanks! |
We don't use this ourselves, but |
in my opinion, this is not a good approach. Renaming the toplevel package according to the version would mean that every version each class would have to be converted when updating the library at the customer side. |
We didn't mean renaming, we referred to file system naming per Modelica spec "18.8.3 Versions in the File System" but for encrypted library:
|
But doesn't that mean that the user can manipulate the version number by renaming the folder? |
No, if specified, the version number must match the version annotation in Modelica library code |
@iakovn I have tested it when the library folder contains a different version number than the one in the version annoation. But the library is still loaded. |
@niklwors Could you elaborate what you tested and what would be the expected outcome? |
I have a library that uses a version annotation, version="1.0.1". However, the folder name contains a different version 1.0.0. I have then encrypted it with the packagetool. But I can still load and use it in OMEdit. I have understood that this should not be possible. |
@niwokr Do you mean that you start with Library 1.0.1/package.mo, encrypt that, then test "tamper" by changing the name to Library 1.0.0? I would actually expect compiler to refuse to load that library, so something to talk about with OMEdit devs. On the default SEMLA side we currently do not include name of the top level directory into the encryption protection and we probably should. That would imply that the library decryption will fail after directory rename. |
I changed the annotation in the package.mo to 1.0.0 and used the folder Libarary 1.0.1/ for the packagetool.
Your suggestion was that you get the version number of the library from the library path that is passed to the SEMLA licensemanager constructor. That's why I asked that a user can manipulate the version number if he renames the folder.
It would be better if the version form the annoation is available in the SEMLA license manager.
|
For us it is very important that the version number of the Modelica library is also passed to the licence manager interface function
mlle_license_new(const char *libpath, struct mlle_error **error)
So that you can also check whether a licence is valid for a specific library version.
The text was updated successfully, but these errors were encountered: