Project

Profile

Help

Bug #4279

closed

net.sf.saxon.trans.LicenseException: Invalid license file found.

Added by O'Neil Delpratt over 4 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Normal
Category:
Internals
Sprint/Milestone:
-
Start date:
2018-08-13
Due date:
% Done:

100%

Estimated time:
Legacy ID:
Applies to branch:
9.9, trunk
Fix Committed on Branch:
9.9, trunk
Fixed in Maintenance Release:
Platforms:

Description

This is a long standing issue which I am bringing to our attention again.

A users from Japan got the following exception when they tried to use the license they received:

Exception in thread "main" net.sf.saxon.trans.LicenseException: Invalid license file found
	at com.saxonica.config.Verifier.configure(Verifier.java:351)
	at com.saxonica.config.Verifier.readLicenseFile(Verifier.java:290)
	at com.saxonica.config.Verifier.loadLicense(Verifier.java:135)
	at com.saxonica.config.Verifier.loadPrimaryLicense(Verifier.java:100)
	at com.saxonica.config.ProfessionalConfiguration.loadLicense(ProfessionalConfiguration.java:486)
	at com.saxonica.config.ProfessionalConfiguration.isLicensedFeature(ProfessionalConfiguration.java:447)
	at com.saxonica.config.ProfessionalConfiguration.getXPath31FunctionSet(ProfessionalConfiguration.java:716)

The issue is when we verify the license it is failing to decode the Japanese letters. If we switching the encoding from 'windows-1252' to UTF-8 the license file verifies successfully.

Actions #2

Updated by O'Neil Delpratt over 4 years ago

  • Status changed from New to Resolved
  • Fix Committed on Branch 9.9, trunk added

Changed reading of license file to assume reading as UTF-8 encoding. Bug fixed and committed to subversion.

Actions #3

Updated by O'Neil Delpratt over 4 years ago

  • Status changed from Resolved to Closed
  • Fixed in Maintenance Release 9.9.1.5 added

Bug fix applied in the Saxon 9.9.1.5 maintenance release.

Actions #4

Updated by Øyvind Liland Gjesdal over 4 years ago

I run Saxon PE in a dedicated CI runner from a dockerfile, and set the key from environment variables, through base64 encoding and decoding.

When I run the latest saxon I receive this error message:

 [java] Transformation failed: Invalid license file found

I have an "Ø" letter in my name in the license file.

When I downgrade the version to 9-9-1-4 in the dockerfile I use for "https://github.com/OyvindLGjesdal/gitlab-ci-library/blob/master/xmldev-gci/PE/Dockerfile" Saxon runs without issue.

License was originally downloaded on a windows 10 PC with outlook.

I have tried workarounds without any luck:

  • downloading license file from web-client on linux machine
  • using iconv 1252 -> UTF8
  • Running the license file directly in server uploaded by scp without encoding/decoding after uploading.

I thought this might be related to this fix, so I didn't put it into a new issue.

Best regards, Øyvind

Actions #5

Updated by Michael Kay over 4 years ago

I'm sorry about this, Yes, I'm afraid we still have a problem here: it's a long-running saga.

Historically, we issued license files in Windows-1252 encoding and it was hard to change this because our general policy is that old licenses should work with new software and new licenses should work with old software. We seem to have solved the encoding issues: for a while now we've been successfully issuing and accepting licenses encoded in UTF-8. But we now seem to be hitting a problem with the digital signature on the license: although the license as issued is in UTF-8, and we're successfully reading it as UTF-8, we're getting a mismatch on the signature.

We did run some tests before committing the change but I'm not sure exactly what they were, and clearly they missed something. I think it could depend on how the data originates - perhaps it's something to do with Unicode normalization? But I've reproduced the failure both by editing your original license details and by submitting an evaluation request.

While we investigate this, I'll issue you a new license that sticks to ASCII characters in the data.

Actions #6

Updated by Michael Kay over 4 years ago

OK, I found the problem: we're decoding the license as UTF-8, but we're still verifying the signature as windows-1252. I can only imagine that we tested a patch that fixed both places and then only committed half of it.

Committing change to signature verification on both 9.9 and development branches

Actions #7

Updated by Michael Kay over 4 years ago

  • Status changed from Closed to Resolved
Actions #8

Updated by Øyvind Liland Gjesdal over 4 years ago

Thank you for the new license, I've got a working setup on latest now.

Actions #9

Updated by O'Neil Delpratt over 4 years ago

  • Status changed from Resolved to Closed
  • Fixed in Maintenance Release 9.9.1.6 added
  • Fixed in Maintenance Release deleted (9.9.1.5)

Patch committed to the Saxon 9.9.1.6 maintenance release.

Please register to edit this issue

Also available in: Atom PDF