Project

Profile

Help

Bug #3726

open

Saxon License not being picked up relative to library file

Added by O'Neil Delpratt about 6 years ago. Updated about 1 year ago.

Status:
New
Priority:
Normal
Category:
Saxon-C Internals
Start date:
2018-03-26
Due date:
% Done:

0%

Estimated time:
Found in version:
1.1
Fixed in version:
Platforms:

Description

According to the documentation:

http://saxonica.com/saxon-c/index.xml#license

Location of the Saxon license file for commercial products: Saxon/C looks in the path relative to where the main library has been installed. For example, in '/usr/lib', if this is where libsaxon[EDITION]c.so has been installed. Alternatively, Saxon also looks for the license according to the environment variable SAXONC_HOME, if this has been set. 

After inspecting the code it seems to me that the license Verify class does not look in the directory relative to the main library. Therefore the license file can only be picked up either by the setting of the SAXONC_HOME environment variable or by placing the license file relative to the XSLT stylesheet.

Actions #1

Updated by O'Neil Delpratt about 1 year ago

  • Description updated (diff)

The text on the license file location is outdated: http://saxonica.com/saxon-c/index.xml#license

Actions #2

Updated by Debbie Lockett about 1 year ago

This bug was originally raised 5 years ago against Saxon/C 1.1. There were two public releases in this series: 1.1.0 on 2017-09-27, and 1.1.2 on 2019-02-21. The next release was the next major release 1.2.0 on 2019-10-16. I don't know where to look in the source code to see if this bug with the Verifier was fixed before the 1.1.2 or 1.2.0 releases.

Since 1.2, in the SaxonC documentation (as opposed to the "License" section of the saxon-c/index.xml webpage which has indeed been neglected, so it is no longer consistent with the documentation) we document that SaxonC looks for the license key: "in the path relative to where the main library has been installed"; "according to the environment variable SAXONC_HOME"; and "Alternatively the licenseFileLocation configuration property can be used to provide the license location".

Do we now run any tests to check that these mechanisms all work?

Actions #3

Updated by Debbie Lockett about 1 year ago

Comparing to the main Saxon documentation (https://www.saxonica.com/documentation12/index.html#!about/license/licensekey), I suggest that we update the SaxonC documentation at https://www.saxonica.com/saxon-c/documentation12/index.html#!starting/licensing as follows:

Location of the Saxon license file

SaxonC will search for the license key in the following locations:

  1. If you supply a Saxon configuration file, the location given in the licenseFileLocation attribute of the outermost configuration element in this file.

  2. The location specified using the configuration property licenseFileLocation.

When this configuration property is set, Saxon will immediately attempt to load the specified file, avoiding any subsequent attempt to search for it on the classpath and elsewhere.

See Configuration for more details about setting configuration properties with SaxonC. For example, to provide the licenseFileLocation in PHP:

$saxonProc = new Saxon\SaxonProcessor(true);
$saxonProc->setConfigurationProperty("http://saxon.sf.net/feature/licenseFileLocation", "/usr/lib/saxon-license.lic");
  1. The directory where the main SaxonC library has been installed.

For example on Linux, in /usr/lib if this is where libsaxon-[EDITION]c-[VERSION].so has been installed.

  1. The directory identified by the environment variable SAXONC_HOME.
Actions #10

Updated by Debbie Lockett about 1 year ago

SaxonC documentation update (in section starting/licensing, as suggested in #note-3) committed on saxon12 and main branches. The online SaxonC 12 documentation will be updated with the next maintenance release.

I have also added details relevant for SaxonC in the main Saxon documentation section about finding the license key (about/license/licensekey). Again, this Saxon 12 documentation will be updated online with the next maintenance release.

The "License" section on the SaxonC webpage (https://www.saxonica.com/saxon-c/index.xml#license) has also been updated and corrected to match this information in the documentation.

Please register to edit this issue

Also available in: Atom PDF