Hi,
[ CC'ing libxmlsec maintainer ]
On Fri, Jun 01, 2012 at 08:39:30PM +0200, Peter Poeschl wrote:
> When I start the taxbird program, it complains
>
> func=xmlSecCheckVersionExt:file=xmlsec.c:line=170:obj=unknown:subj=unknown:
> error=1:xmlsec library function failed:mode=abi compatible;
> expected minor version=2;real minor version=2;
> expected subminor version=18;real subminor version=14
> libgeier: loaded xmlsec library version is not compatible.
The actual bug is in xmlsec, not in geier. geier uses xmlSecCheckVersion()
include/xmlsec/xmlsec.h to verify that is is running against a good version.
xmlSecCheckVersion is defined as
#define xmlSecCheckVersion() \
xmlSecCheckVersionExt(XMLSEC_VERSION_MAJOR, XMLSEC_VERSION_MINOR,
XMLSEC_VERSION_SUBMINOR, xmlSecCheckVersionABICompatible)
This means that xmlSecCheckVersionExt is executed with the whole version
number xmlsec had at build-time of geier.
xmlSecCheckVersionExt is defined (in src/xmlsec.c) as
...
case xmlSecCheckVersionABICompatible:
if((minor < XMLSEC_VERSION_MINOR) ||
((minor == XMLSEC_VERSION_MINOR) &&
(subminor < XMLSEC_VERSION_SUBMINOR))) {
xmlSecError(XMLSEC_ERRORS_HERE,
...
with minor and subminor being the passed values and XMLSEC_VERSION_*
the version of xmlsec at xmlsec build-time.
What gives this when geier gets compiled with xmlsec 1.2.14 and run with
1.2.18? xmlSecCheckVersion() evaluated to
xmlSecCheckVersionExt(1, 2, 14, xmlSecCheckVersionABICompatible)
at compile time, and now it runs with 1.2.18:
(subminor < XMLSEC_VERSION_SUBMINOR))) {
gets
(14 < 18))) {
and boom.
I *think* the comparison should be the other way round:
minor > XMLSEC_VERSION_MINOR ||
(minor == XMLSEC_VERSION_MINOR && subminor > XMLSEC_VERSION_SUBMINOR):
error()
that way it means "it requested X, but I have only Y" (Y older X), not:
"it requested X, but I already have Y" (Y newer X) as it is now.
@John, what do you think? xmlsec bug here?
Regards
Evgeni
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]