Kaydet (Commit) bc4e43dd authored tarafından Miklos Vajna's avatar Miklos Vajna

xmlsecurity: check for the libxmlsec version runtime, not build-time

For the general benefit of --with-system-xmlsec usage scenarios (where
LO may be built against an old version of xmlsec and run against a new
one).

Change-Id: I4ae582771dbc8eec149a706cfa5ccc0ec0859704
Reviewed-on: https://gerrit.libreoffice.org/55446Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarMiklos Vajna <vmiklos@collabora.co.uk>
üst 5708534b
...@@ -158,41 +158,44 @@ XSECXMLSEC_DLLPUBLIC int xmlEnableStreamInputCallbacks() ...@@ -158,41 +158,44 @@ XSECXMLSEC_DLLPUBLIC int xmlEnableStreamInputCallbacks()
xmlSecIOCleanupCallbacks() ; xmlSecIOCleanupCallbacks() ;
// Newer xmlsec wants the callback order in the opposite direction. // Newer xmlsec wants the callback order in the opposite direction.
#if XMLSEC_VERSION_MAJOR > 1 || (XMLSEC_VERSION_MAJOR == 1 && XMLSEC_VERSION_MINOR > 2) || (XMLSEC_VERSION_MAJOR == 1 && XMLSEC_VERSION_MINOR == 2 && XMLSEC_VERSION_SUBMINOR >= 26) if (xmlSecCheckVersionExt(1, 2, 26, xmlSecCheckVersionABICompatible))
//Register the default callbacks. {
//Notes: the error will cause xmlsec working problems. //Register the default callbacks.
int cbs = xmlSecIORegisterDefaultCallbacks() ; //Notes: the error will cause xmlsec working problems.
if( cbs < 0 ) { int cbs = xmlSecIORegisterDefaultCallbacks() ;
return -1 ; if( cbs < 0 ) {
} return -1 ;
}
//Register my classbacks.
cbs = xmlSecIORegisterCallbacks( //Register my classbacks.
xmlStreamMatch, cbs = xmlSecIORegisterCallbacks(
xmlStreamOpen, xmlStreamMatch,
xmlStreamRead, xmlStreamOpen,
xmlStreamClose ) ; xmlStreamRead,
if( cbs < 0 ) { xmlStreamClose ) ;
return -1 ; if( cbs < 0 ) {
} return -1 ;
#else }
//Register my classbacks.
int cbs = xmlSecIORegisterCallbacks(
xmlStreamMatch,
xmlStreamOpen,
xmlStreamRead,
xmlStreamClose ) ;
if( cbs < 0 ) {
return -1 ;
} }
else
//Register the default callbacks. {
//Notes: the error will cause xmlsec working problems. //Register my classbacks.
cbs = xmlSecIORegisterDefaultCallbacks() ; int cbs = xmlSecIORegisterCallbacks(
if( cbs < 0 ) { xmlStreamMatch,
return -1 ; xmlStreamOpen,
xmlStreamRead,
xmlStreamClose ) ;
if( cbs < 0 ) {
return -1 ;
}
//Register the default callbacks.
//Notes: the error will cause xmlsec working problems.
cbs = xmlSecIORegisterDefaultCallbacks() ;
if( cbs < 0 ) {
return -1 ;
}
} }
#endif
enableXmlStreamIO |= XMLSTREAMIO_INITIALIZED ; enableXmlStreamIO |= XMLSTREAMIO_INITIALIZED ;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment