Skip to content
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

Question: Backward binary compatibility of licenses #26

Open
cliviu opened this issue Mar 23, 2022 · 6 comments
Open

Question: Backward binary compatibility of licenses #26

cliviu opened this issue Mar 23, 2022 · 6 comments

Comments

@cliviu
Copy link

cliviu commented Mar 23, 2022

Hi,

I have some licenses generated with this library:

    <groupId>de.schlichtherle.truelicense</groupId>
    <artifactId>truelicense-core</artifactId>
    <version>1.33</version>

are they still compatible (can the licenses still be verified) with the License Manager from

    <groupId>global.namespace.truelicense</groupId>
    <artifactId>truelicense-core</artifactId>
    <version>4.0.3</version>

``` ?
Thanks !
@cliviu
Copy link
Author

cliviu commented Mar 23, 2022

The reason why I'm asking this is that I always get this exception when trying to install an old license:
java.util.zip.ZipException: Not in GZIP format at java.base/java.util.zip.GZIPInputStream.readHeader(GZIPInputStream.java:165) at java.base/java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:79) at global.namespace.fun.io.bios.GZIPFilter.lambda$input$1(GZIPFilter.java:39) at global.namespace.fun.io.api.Socket.lambda$map$0(Socket.java:138) at global.namespace.fun.io.api.Socket.lambda$map$0(Socket.java:136) at global.namespace.fun.io.api.Socket.lambda$map$0(Socket.java:136) at global.namespace.truelicense.core.Filters$1.lambda$input$1(Filters.java:52) at global.namespace.fun.io.api.Socket.lambda$map$0(Socket.java:136) at global.namespace.fun.io.api.Socket.apply(Socket.java:123) at global.namespace.fun.io.bios.XMLCodec$1.decode(XMLCodec.java:62) at global.namespace.truelicense.core.TrueLicenseManagementContext$TrueLicenseManagerParameters$TrueLicenseManager.repositoryModel(TrueLicenseManagementContext.java:829) at global.namespace.truelicense.core.TrueLicenseManagementContext$TrueLicenseManagerParameters$TrueLicenseManager.repositoryController(TrueLicenseManagementContext.java:820) at global.namespace.truelicense.core.TrueLicenseManagementContext$TrueLicenseManagerParameters$TrueLicenseManager.authenticate(TrueLicenseManagementContext.java:813) at global.namespace.truelicense.core.TrueLicenseManagementContext$TrueLicenseManagerParameters$CachingLicenseManager.authenticate(TrueLicenseManagementContext.java:677) at global.namespace.truelicense.core.TrueLicenseManagementContext$TrueLicenseManagerParameters$TrueLicenseManager.decodeLicense(TrueLicenseManagementContext.java:808) at global.namespace.truelicense.core.TrueLicenseManagementContext$TrueLicenseManagerParameters$TrueLicenseManager.lambda$install$1(TrueLicenseManagementContext.java:757) at global.namespace.truelicense.core.TrueLicenseManagementContext.callChecked(TrueLicenseManagementContext.java:79) at global.namespace.truelicense.core.TrueLicenseManagementContext.access$800(TrueLicenseManagementContext.java:37) at global.namespace.truelicense.core.TrueLicenseManagementContext$TrueLicenseManagerParameters$TrueLicenseManager.install(TrueLicenseManagementContext.java:752) at global.namespace.truelicense.core.TrueLicenseManagementContext$TrueLicenseManagerParameters$CachingLicenseManager.install(TrueLicenseManagementContext.java:629)

@christian-schlichtherle
Copy link
Owner

It's possible if you configure the V1 license key format.

@christian-schlichtherle
Copy link
Owner

You can look the details up in the test code.

@cliviu
Copy link
Author

cliviu commented Mar 23, 2022

Sure, is already done <licenseKeyFormat>V1</licenseKeyFormat>. Then I had to set this also <pbeAlgorithm>PBEWithMD5AndDES</pbeAlgorithm> in order to compile the archetype.

But the problem occurs also with the V1 format set in the pom.xml of the archetype.

@cliviu
Copy link
Author

cliviu commented Mar 24, 2022

I still have the same problem ... The existing tests from the artifact are generating a license and then installing, loading, verifying and uninstalling.
But there is no test which uses a legacy license generated with the old version 1.XX of the truelicense to install/load ...
My test fails when using a legacy license generated with version 1.33.
Any ideas ?

@cliviu
Copy link
Author

cliviu commented Mar 29, 2022

Any updates on this? here is my test:

        public void myTestV1() throws Exception { 
              mycompany.keygen.LicenseManager[] licenseManagers = mycompany.keygen.LicenseManager.values();
              int allLicenseManagers = licenseManagers.length;

                for(int i = 0; i < allLicenseManagers; ++i) {
                        LicenseManager manager = licenseManagers[i];                        
                        String edition = manager.name();
                                                
                        File licenseKey = new File("/home/tmp/licenseV1.lic" );

                        String licenseKeyPath = licenseKey.getPath();
                        
                        mycompany.keymgr.Main.process(new String[]{"install", licenseKeyPath});

                        try {
                                mycompany.keymgr.Main.process(new String[]{"load"});
                                mycompany.keymgr.Main.process(new String[]{"verify"});
                        } finally {
                                mycompany.keymgr.Main.process(new String[]{"uninstall"});
                        }
                }

The test throws the exception from the previous post when using a version generated with version 1.33 of the license but is ok with a license generated with the latest program version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants