summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2016-04-12 17:37:28 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2016-04-13 07:57:56 +0000
commit3dcd271f7e62e6d175cb187dbb2bbd099f5ca28e (patch)
tree662fb2614eac1b89abe4bfeff839d0f0389b89dc
parent5304b948781e1f8a1bf5249a260db738e4113079 (diff)
Upgrade libxmlsec to 1.2.20
Obsoletes xmlsec1-update-config.guess.patch.1. Also update xmlsec1-ooxml.patch.1 as it was upstreamed at the end (with improved error checks, etc), which wasn't possible before without loads of conflicts. Change-Id: I6fee428f73f8908289d87cc262ad323ec62e65cf Reviewed-on: https://gerrit.libreoffice.org/24032 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
-rw-r--r--download.lst2
-rw-r--r--external/libxmlsec/UnpackedTarball_xmlsec.mk1
-rw-r--r--external/libxmlsec/xmlsec1-configure.patch.124
-rw-r--r--external/libxmlsec/xmlsec1-customkeymanage.patch.120
-rw-r--r--external/libxmlsec/xmlsec1-mingw-keymgr-mscrypto.patch.112
-rw-r--r--external/libxmlsec/xmlsec1-ooxml.patch.1946
-rw-r--r--external/libxmlsec/xmlsec1-update-config.guess.patch.1672
7 files changed, 576 insertions, 1101 deletions
diff --git a/download.lst b/download.lst
index 21c95b18a11c..c76e00a53578 100644
--- a/download.lst
+++ b/download.lst
@@ -92,7 +92,7 @@ export LIBEXTTEXTCAT_TARBALL := 10d61fbaa6a06348823651b1bd7940fe-libexttextcat-3
export LIBGLTF_MD5SUM := d63a9f47ab048f5009d90693d6aa6424
export LIBGLTF_TARBALL := libgltf-0.0.2.tar.bz2
export LIBLANGTAG_TARBALL := aa899eff126216dafe721149fbdb511b-liblangtag-0.5.8.tar.bz2
-export LIBXMLSEC_TARBALL := fe664ba5f01ebfaeb0ab5deeb0b2249e-xmlsec1-1.2.19.tar.gz
+export LIBXMLSEC_TARBALL := ce12af00283eb90d9281956524250d6e-xmlsec1-1.2.20.tar.gz
export LIBXML_TARBALL := daece17e045f1c107610e137ab50c179-libxml2-2.9.3.tar.gz
export LIBXSLT_TARBALL := 9667bf6f9310b957254fdcf6596600b7-libxslt-1.1.28.tar.gz
export LPSOLVE_TARBALL := 26b3e95ddf3d9c077c480ea45874b3b8-lp_solve_5.5.tar.gz
diff --git a/external/libxmlsec/UnpackedTarball_xmlsec.mk b/external/libxmlsec/UnpackedTarball_xmlsec.mk
index 67913b7ad939..81600b96b719 100644
--- a/external/libxmlsec/UnpackedTarball_xmlsec.mk
+++ b/external/libxmlsec/UnpackedTarball_xmlsec.mk
@@ -17,7 +17,6 @@ xmlsec_patches += xmlsec1-mingw-keymgr-mscrypto.patch.1
xmlsec_patches += xmlsec1-vc.patch.1
xmlsec_patches += xmlsec1-1.2.14_fix_extern_c.patch.1
xmlsec_patches += xmlsec1-customkeymanage.patch.1
-xmlsec_patches += xmlsec1-update-config.guess.patch.1
# Upstreamed as <https://github.com/lsh123/xmlsec/commit/7069e2b0ab49679008abedd6d223fb95538b0684>.
xmlsec_patches += xmlsec1-ooxml.patch.1
diff --git a/external/libxmlsec/xmlsec1-configure.patch.1 b/external/libxmlsec/xmlsec1-configure.patch.1
index 323177fff1ac..91ffb9a20970 100644
--- a/external/libxmlsec/xmlsec1-configure.patch.1
+++ b/external/libxmlsec/xmlsec1-configure.patch.1
@@ -29,10 +29,10 @@ index 669f996..0cf0798 100644
bin_SCRIPTS = xmlsec1-config
diff --git a/Makefile.in b/Makefile.in
-index 25e6087..f9aa108 100644
+index 9b252ff..c42b984 100644
--- a/Makefile.in
+++ b/Makefile.in
-@@ -372,8 +372,9 @@ top_builddir = @top_builddir@
+@@ -452,8 +452,9 @@ top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
NULL =
SAFE_VERSION = @XMLSEC_VERSION_SAFE@
@@ -45,10 +45,10 @@ index 25e6087..f9aa108 100644
bin_SCRIPTS = xmlsec1-config
pkgconfig_DATA = xmlsec1.pc @XMLSEC_CRYPTO_PC_FILES_LIST@
diff --git a/configure.in b/configure.in
-index 1b46a92..92c4cc2 100644
+index 7690e7a..f2c98e3 100644
--- a/configure.in
+++ b/configure.in
-@@ -185,8 +185,8 @@ dnl find libxml
+@@ -188,8 +188,8 @@ dnl find libxml
dnl ==========================================================================
LIBXML_MIN_VERSION="2.7.4"
LIBXML_CONFIG="xml2-config"
@@ -59,7 +59,7 @@ index 1b46a92..92c4cc2 100644
LIBXML_FOUND="no"
AC_ARG_WITH(libxml,
[ --with-libxml=[PFX] libxml2 location]
-@@ -195,6 +195,8 @@ AC_ARG_WITH(libxml-src,
+@@ -198,6 +198,8 @@ AC_ARG_WITH(libxml-src,
[ --with-libxml-src=[PFX] not installed yet libxml2 location]
)
@@ -68,7 +68,7 @@ index 1b46a92..92c4cc2 100644
if test "z$with_libxml" = "zno" -o "z$with_libxml_src" = "zno"; then
AC_MSG_CHECKING(for libxml2 libraries >= $LIBXML_MIN_VERSION)
AC_MSG_ERROR(libxml2 >= $LIBXML_MIN_VERSION is required for $XMLSEC_PACKAGE)
-@@ -243,6 +245,8 @@ if test "z$LIBXML_FOUND" = "zno" ; then
+@@ -246,6 +248,8 @@ if test "z$LIBXML_FOUND" = "zno" ; then
fi
fi
@@ -77,7 +77,7 @@ index 1b46a92..92c4cc2 100644
AC_SUBST(LIBXML_CFLAGS)
AC_SUBST(LIBXML_LIBS)
AC_SUBST(LIBXML_CONFIG)
-@@ -551,12 +555,26 @@ dnl ==========================================================================
+@@ -570,12 +574,26 @@ dnl ==========================================================================
XMLSEC_NO_NSS="1"
SEAMONKEY_MIN_VERSION="1.0"
MOZILLA_MIN_VERSION="1.4"
@@ -106,7 +106,7 @@ index 1b46a92..92c4cc2 100644
NSS_CRYPTO_LIB="$XMLSEC_PACKAGE-nss"
NSS_FOUND="no"
NSPR_PACKAGE=mozilla-nspr
-@@ -583,6 +601,16 @@ elif test "z$with_nss" = "z" -a "z$with_nspr" = "z" -a "z$with_mozilla_ver" = "z
+@@ -602,6 +620,16 @@ elif test "z$with_nss" = "z" -a "z$with_nspr" = "z" -a "z$with_mozilla_ver" = "z
dnl We are going to try all options
dnl
if test "z$NSS_FOUND" = "zno" ; then
@@ -123,7 +123,7 @@ index 1b46a92..92c4cc2 100644
PKG_CHECK_MODULES(NSS, seamonkey-nspr >= $NSPR_MIN_VERSION seamonkey-nss >= $SEAMONKEY_MIN_VERSION,
[NSS_FOUND=yes NSPR_PACKAGE=seamonkey-nspr NSS_PACKAGE=seamonkey-nss],
[NSS_FOUND=no])
-@@ -614,8 +642,8 @@ if test "z$NSS_FOUND" = "zno" ; then
+@@ -633,8 +661,8 @@ if test "z$NSS_FOUND" = "zno" ; then
ac_mozilla_name=mozilla-$MOZILLA_MIN_VERSION
fi
@@ -134,7 +134,7 @@ index 1b46a92..92c4cc2 100644
AC_MSG_CHECKING(for nspr libraries >= $NSPR_MIN_VERSION)
NSPR_INCLUDES_FOUND="no"
-@@ -636,21 +664,21 @@ if test "z$NSS_FOUND" = "zno" ; then
+@@ -655,21 +683,21 @@ if test "z$NSS_FOUND" = "zno" ; then
NSPR_PRINIT_H="$with_nspr/include/prinit.h"
else
for dir in $ac_nss_inc_dir ; do
@@ -160,7 +160,7 @@ index 1b46a92..92c4cc2 100644
dnl do not add -L/usr/lib because compiler does it anyway
if test "z$dir" = "z/usr/lib" ; then
NSPR_LIBS="$NSPR_LIBS_LIST"
-@@ -721,7 +749,7 @@ if test "z$NSS_FOUND" = "zno" ; then
+@@ -740,7 +768,7 @@ if test "z$NSS_FOUND" = "zno" ; then
done
for dir in $ac_nss_lib_dir ; do
@@ -169,7 +169,7 @@ index 1b46a92..92c4cc2 100644
dnl do not add -L/usr/lib because compiler does it anyway
if test "z$dir" = "z/usr/lib" ; then
NSS_LIBS="$NSS_LIBS_LIST"
-@@ -740,7 +768,7 @@ if test "z$NSS_FOUND" = "zno" ; then
+@@ -759,7 +787,7 @@ if test "z$NSS_FOUND" = "zno" ; then
if test "z$NSS_INCLUDES_FOUND" = "zyes" -a "z$NSS_LIBS_FOUND" = "zyes" ; then
OLD_CPPFLAGS=$CPPFLAGS
diff --git a/external/libxmlsec/xmlsec1-customkeymanage.patch.1 b/external/libxmlsec/xmlsec1-customkeymanage.patch.1
index 53780840f1ce..852d513aea11 100644
--- a/external/libxmlsec/xmlsec1-customkeymanage.patch.1
+++ b/external/libxmlsec/xmlsec1-customkeymanage.patch.1
@@ -57,10 +57,10 @@ index 18dff94..44837b6 100644
certkeys.h \
crypto.h \
diff --git a/include/xmlsec/mscrypto/Makefile.in b/include/xmlsec/mscrypto/Makefile.in
-index 235bc0c..d57481b 100644
+index 411681d..3ed3f5b 100644
--- a/include/xmlsec/mscrypto/Makefile.in
+++ b/include/xmlsec/mscrypto/Makefile.in
-@@ -307,6 +307,7 @@ top_srcdir = @top_srcdir@
+@@ -379,6 +379,7 @@ top_srcdir = @top_srcdir@
NULL =
xmlsecmscryptoincdir = $(includedir)/xmlsec1/xmlsec/mscrypto
xmlsecmscryptoinc_HEADERS = \
@@ -160,10 +160,10 @@ index e352162..997ca7f 100644
install-exec-hook:
diff --git a/include/xmlsec/nss/Makefile.in b/include/xmlsec/nss/Makefile.in
-index 8f7952d..a344a55 100644
+index 92f2d19..c190177 100644
--- a/include/xmlsec/nss/Makefile.in
+++ b/include/xmlsec/nss/Makefile.in
-@@ -314,6 +314,9 @@ bignum.h \
+@@ -386,6 +386,9 @@ bignum.h \
keysstore.h \
pkikeys.h \
x509.h \
@@ -765,10 +765,10 @@ index 8cd8586..a14199e 100644
if SHAREDLIB_HACK
diff --git a/src/nss/Makefile.in b/src/nss/Makefile.in
-index e799b8e..d9c4a27 100644
+index e43ac73..5622923 100644
--- a/src/nss/Makefile.in
+++ b/src/nss/Makefile.in
-@@ -81,7 +81,8 @@ am__DEPENDENCIES_1 =
+@@ -126,7 +126,8 @@ am__DEPENDENCIES_1 =
am__libxmlsec1_nss_la_SOURCES_DIST = app.c bignum.c ciphers.c crypto.c \
digests.c hmac.c pkikeys.c signatures.c symkeys.c x509.c \
x509vfy.c keysstore.c keytrans.c kw_des.c kw_aes.c globals.h \
@@ -778,7 +778,7 @@ index e799b8e..d9c4a27 100644
am__objects_1 =
@SHAREDLIB_HACK_TRUE@am__objects_2 = libxmlsec1_nss_la-strings.lo
am_libxmlsec1_nss_la_OBJECTS = libxmlsec1_nss_la-app.lo \
-@@ -92,6 +93,8 @@ am_libxmlsec1_nss_la_OBJECTS = libxmlsec1_nss_la-app.lo \
+@@ -137,6 +138,8 @@ am_libxmlsec1_nss_la_OBJECTS = libxmlsec1_nss_la-app.lo \
libxmlsec1_nss_la-x509.lo libxmlsec1_nss_la-x509vfy.lo \
libxmlsec1_nss_la-keysstore.lo libxmlsec1_nss_la-keytrans.lo \
libxmlsec1_nss_la-kw_des.lo libxmlsec1_nss_la-kw_aes.lo \
@@ -787,7 +787,7 @@ index e799b8e..d9c4a27 100644
$(am__objects_1) $(am__objects_2)
libxmlsec1_nss_la_OBJECTS = $(am_libxmlsec1_nss_la_OBJECTS)
AM_V_lt = $(am__v_lt_@AM_V@)
-@@ -370,6 +373,7 @@ libxmlsec1_nss_la_CPPFLAGS = \
+@@ -446,6 +449,7 @@ libxmlsec1_nss_la_CPPFLAGS = \
libxmlsec1_nss_la_SOURCES = app.c bignum.c ciphers.c crypto.c \
digests.c hmac.c pkikeys.c signatures.c symkeys.c x509.c \
x509vfy.c keysstore.c keytrans.c kw_des.c kw_aes.c globals.h \
@@ -795,7 +795,7 @@ index e799b8e..d9c4a27 100644
$(NULL) $(am__append_1)
libxmlsec1_nss_la_LIBADD = \
$(NSS_LIBS) \
-@@ -476,6 +480,8 @@ distclean-compile:
+@@ -557,6 +561,8 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libxmlsec1_nss_la-symkeys.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libxmlsec1_nss_la-x509.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libxmlsec1_nss_la-x509vfy.Plo@am__quote@
@@ -804,7 +804,7 @@ index e799b8e..d9c4a27 100644
.c.o:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@@ -505,6 +511,20 @@ libxmlsec1_nss_la-app.lo: app.c
+@@ -586,6 +592,20 @@ libxmlsec1_nss_la-app.lo: app.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libxmlsec1_nss_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libxmlsec1_nss_la-app.lo `test -f 'app.c' || echo '$(srcdir)/'`app.c
diff --git a/external/libxmlsec/xmlsec1-mingw-keymgr-mscrypto.patch.1 b/external/libxmlsec/xmlsec1-mingw-keymgr-mscrypto.patch.1
index 6added33798b..c570fc89c0a7 100644
--- a/external/libxmlsec/xmlsec1-mingw-keymgr-mscrypto.patch.1
+++ b/external/libxmlsec/xmlsec1-mingw-keymgr-mscrypto.patch.1
@@ -23,10 +23,10 @@ index 5cea654..3dc6452 100644
if SHAREDLIB_HACK
diff --git a/src/mscrypto/Makefile.in b/src/mscrypto/Makefile.in
-index 83c8f03..866e996 100644
+index 2697d86..56c28ef 100644
--- a/src/mscrypto/Makefile.in
+++ b/src/mscrypto/Makefile.in
-@@ -81,7 +81,8 @@ am__DEPENDENCIES_1 =
+@@ -126,7 +126,8 @@ am__DEPENDENCIES_1 =
am__libxmlsec1_mscrypto_la_SOURCES_DIST = globals.h private.h app.c \
certkeys.c ciphers.c crypto.c digests.c hmac.c keysstore.c \
kw_aes.c kw_des.c kt_rsa.c signatures.c symkeys.c x509.c \
@@ -36,7 +36,7 @@ index 83c8f03..866e996 100644
am__objects_1 =
@SHAREDLIB_HACK_TRUE@am__objects_2 = \
@SHAREDLIB_HACK_TRUE@ libxmlsec1_mscrypto_la-strings.lo
-@@ -98,7 +99,8 @@ am_libxmlsec1_mscrypto_la_OBJECTS = libxmlsec1_mscrypto_la-app.lo \
+@@ -143,7 +144,8 @@ am_libxmlsec1_mscrypto_la_OBJECTS = libxmlsec1_mscrypto_la-app.lo \
libxmlsec1_mscrypto_la-signatures.lo \
libxmlsec1_mscrypto_la-symkeys.lo \
libxmlsec1_mscrypto_la-x509.lo \
@@ -46,7 +46,7 @@ index 83c8f03..866e996 100644
$(am__objects_2)
libxmlsec1_mscrypto_la_OBJECTS = $(am_libxmlsec1_mscrypto_la_OBJECTS)
AM_V_lt = $(am__v_lt_@AM_V@)
-@@ -378,6 +380,7 @@ libxmlsec1_mscrypto_la_CPPFLAGS = \
+@@ -454,6 +456,7 @@ libxmlsec1_mscrypto_la_CPPFLAGS = \
libxmlsec1_mscrypto_la_SOURCES = globals.h private.h app.c certkeys.c \
ciphers.c crypto.c digests.c hmac.c keysstore.c kw_aes.c \
kw_des.c kt_rsa.c signatures.c symkeys.c x509.c x509vfy.c \
@@ -54,7 +54,7 @@ index 83c8f03..866e996 100644
csp_calg.h csp_oid.h xmlsec-mingw.h $(NULL) $(am__append_1)
libxmlsec1_mscrypto_la_LIBADD = \
$(MSCRYPTO_LIBS) \
-@@ -484,6 +487,7 @@ distclean-compile:
+@@ -565,6 +568,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libxmlsec1_mscrypto_la-symkeys.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libxmlsec1_mscrypto_la-x509.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libxmlsec1_mscrypto_la-x509vfy.Plo@am__quote@
@@ -62,7 +62,7 @@ index 83c8f03..866e996 100644
.c.o:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@@ -513,6 +517,13 @@ libxmlsec1_mscrypto_la-app.lo: app.c
+@@ -594,6 +598,13 @@ libxmlsec1_mscrypto_la-app.lo: app.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libxmlsec1_mscrypto_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libxmlsec1_mscrypto_la-app.lo `test -f 'app.c' || echo '$(srcdir)/'`app.c
diff --git a/external/libxmlsec/xmlsec1-ooxml.patch.1 b/external/libxmlsec/xmlsec1-ooxml.patch.1
index bc7123c83c87..81d250f8e765 100644
--- a/external/libxmlsec/xmlsec1-ooxml.patch.1
+++ b/external/libxmlsec/xmlsec1-ooxml.patch.1
@@ -1,85 +1,106 @@
-From 114dad4467a2834d11ba463251cf766928dbb757 Mon Sep 17 00:00:00 2001
+From c0a2ea2b84e6dc954125ea6f2f57e9ddc29a3d5a Mon Sep 17 00:00:00 2001
From: Miklos Vajna <vmiklos@collabora.co.uk>
-Date: Mon, 25 Jan 2016 09:50:03 +0100
-Subject: [PATCH] OOXML Relationship Transform
+Date: Sun, 14 Feb 2016 22:12:57 +0100
+Subject: [PATCH] Implement OOXML Relationships Transform Algorithm
-Conflicts:
- include/xmlsec/transforms.h
+Reference: ISO/IEC 29500-2:2012(E), section 13.2.4.24
---
- include/xmlsec/strings.h | 3 +
- include/xmlsec/transforms.h | 4 +
- src/strings.c | 3 +
- src/transforms.c | 11 +
- src/xpath.c | 542 ++++++++++++++++++++++++++++++++++++++++++++
- 5 files changed, 563 insertions(+)
+ include/xmlsec/strings.h | 12 +
+ include/xmlsec/transforms.h | 9 +
+ src/strings.c | 12 +
+ src/transforms.c | 10 +
+ src/xpath.c | 671 ++++++++++++++++++++++++++++++++++++++++++++
+ 5 files changed, 714 insertions(+)
diff --git a/include/xmlsec/strings.h b/include/xmlsec/strings.h
-index 5e3f6a1..b386fc4 100644
+index 5e3f6a1..5a92014 100644
--- a/include/xmlsec/strings.h
+++ b/include/xmlsec/strings.h
-@@ -588,6 +588,9 @@ XMLSEC_EXPORT_VAR const xmlChar xmlSecXPath2FilterUnion[];
- XMLSEC_EXPORT_VAR const xmlChar xmlSecNameXPointer[];
- XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeXPointer[];
+@@ -590,6 +590,18 @@ XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeXPointer[];
+ /*************************************************************************
+ *
++ * RelationshipTransform strings
++ *
++ ************************************************************************/
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNameRelationship[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecHrefRelationship[];
++XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeRelationship[];
++XMLSEC_EXPORT_VAR const xmlChar xmlSecNodeRelationshipReference[];
++XMLSEC_EXPORT_VAR const xmlChar xmlSecRelationshipsNs[];
++XMLSEC_EXPORT_VAR const xmlChar xmlSecRelationshipReferenceNs[];
+
- /*************************************************************************
- *
++/*************************************************************************
++ *
* Xslt strings
+ *
+ ************************************************************************/
diff --git a/include/xmlsec/transforms.h b/include/xmlsec/transforms.h
-index f0c70c9..5bdb1b9 100644
+index f0c70c9..0d876f1 100644
--- a/include/xmlsec/transforms.h
+++ b/include/xmlsec/transforms.h
-@@ -949,6 +949,10 @@ XMLSEC_EXPORT int xmlSecTransformXPointerSetExpr (xmlSecT
+@@ -949,6 +949,15 @@ XMLSEC_EXPORT int xmlSecTransformXPointerSetExpr (xmlSecT
const xmlChar* expr,
xmlSecNodeSetType nodeSetType,
xmlNodePtr hereNode);
-+
-+#define xmlSecTransformRelationshipId xmlSecTransformRelationshipGetKlass()
-+XMLSEC_EXPORT xmlSecTransformId xmlSecTransformRelationshipGetKlass (void);
++/**
++ * xmlSecTransformRelationshipId:
++ *
++ * The Relationship transform klass.
++ */
++#define xmlSecTransformRelationshipId \
++ xmlSecTransformRelationshipGetKlass()
++XMLSEC_EXPORT xmlSecTransformId xmlSecTransformRelationshipGetKlass (void);
+
#ifndef XMLSEC_NO_XSLT
#include <libxslt/security.h>
diff --git a/src/strings.c b/src/strings.c
-index f746f4d..048b0a6 100644
+index f746f4d..1e8516f 100644
--- a/src/strings.c
+++ b/src/strings.c
-@@ -579,6 +579,9 @@ const xmlChar xmlSecXPath2FilterUnion[] = "union";
- const xmlChar xmlSecNameXPointer[] = "xpointer";
- const xmlChar xmlSecNodeXPointer[] = "XPointer";
+@@ -581,6 +581,18 @@ const xmlChar xmlSecNodeXPointer[] = "XPointer";
-+const xmlChar xmlSecNameRelationship[] = "relationship";
-+const xmlChar xmlSecHrefRelationship[] = "http://schemas.openxmlformats.org/package/2006/RelationshipTransform";
-+
/*************************************************************************
*
++ * Relationship strings
++ *
++ ************************************************************************/
++const xmlChar xmlSecNameRelationship[] = "relationship";
++const xmlChar xmlSecHrefRelationship[] = "http://schemas.openxmlformats.org/package/2006/RelationshipTransform";
++const xmlChar xmlSecNodeRelationship[] = "Relationship";
++const xmlChar xmlSecNodeRelationshipReference[] = "RelationshipReference";
++const xmlChar xmlSecRelationshipsNs[] = "http://schemas.openxmlformats.org/package/2006/relationships";
++const xmlChar xmlSecRelationshipReferenceNs[] = "http://schemas.openxmlformats.org/package/2006/digital-signature";
++
++/*************************************************************************
++ *
* Xslt strings
+ *
+ ************************************************************************/
diff --git a/src/transforms.c b/src/transforms.c
-index 8a2ded2..0371b82 100644
+index 8a2ded2..8a32629 100644
--- a/src/transforms.c
+++ b/src/transforms.c
-@@ -281,6 +281,17 @@ xmlSecTransformIdsRegisterDefault(void) {
+@@ -281,6 +281,16 @@ xmlSecTransformIdsRegisterDefault(void) {
return(-1);
}
-+ if (xmlSecTransformIdsRegister(xmlSecTransformRelationshipId) < 0)
-+ {
-+ xmlSecError(XMLSEC_ERRORS_HERE,
-+ NULL,
-+ "xmlSecTransformIdsRegister",
-+ XMLSEC_ERRORS_R_XMLSEC_FAILED,
-+ "name=%s",
-+ xmlSecErrorsSafeString(xmlSecTransformKlassGetName(xmlSecTransformRelationshipId)));
-+ return -1;
++ if(xmlSecTransformIdsRegister(xmlSecTransformRelationshipId) < 0) {
++ xmlSecError(XMLSEC_ERRORS_HERE,
++ NULL,
++ "xmlSecTransformIdsRegister",
++ XMLSEC_ERRORS_R_XMLSEC_FAILED,
++ "name=%s",
++ xmlSecErrorsSafeString(xmlSecTransformKlassGetName(xmlSecTransformRelationshipId)));
++ return(-1);
+ }
+
#ifndef XMLSEC_NO_XSLT
if(xmlSecTransformIdsRegister(xmlSecTransformXsltId) < 0) {
xmlSecError(XMLSEC_ERRORS_HERE,
diff --git a/src/xpath.c b/src/xpath.c
-index e67631e..0fef1fe 100644
+index e67631e..748c9da 100644
--- a/src/xpath.c
+++ b/src/xpath.c
@@ -17,6 +17,7 @@
@@ -90,57 +111,73 @@ index e67631e..0fef1fe 100644
#include <xmlsec/xmlsec.h>
#include <xmlsec/xmltree.h>
-@@ -1161,5 +1162,546 @@ xmlSecTransformVisa3DHackExecute(xmlSecTransformPtr transform, int last,
- return(0);
- }
+@@ -1163,3 +1164,673 @@ xmlSecTransformVisa3DHackExecute(xmlSecTransformPtr transform, int last,
-+/* OOXML Relationship Transform. */
-+typedef struct _xmlSecRelationshipCtx xmlSecRelationshipCtx, *xmlSecRelationshipCtxPtr;
-+struct _xmlSecRelationshipCtx
-+{
-+ xmlSecPtrListPtr sourceIdList;
+
+
++/******************************************************************************
++ *
++ * Relationship transform
++ *
++ *****************************************************************************/
++typedef struct _xmlSecRelationshipCtx xmlSecRelationshipCtx,
++ *xmlSecRelationshipCtxPtr;
++struct _xmlSecRelationshipCtx {
++ xmlSecPtrListPtr sourceIdList;
+};
-+#define xmlSecRelationshipSize (sizeof(xmlSecTransform) + sizeof(xmlSecRelationshipCtx))
-+#define xmlSecRelationshipGetCtx(transform) ((xmlSecRelationshipCtxPtr)(((xmlSecByte*)(transform)) + sizeof(xmlSecTransform)))
-+
-+static int xmlSecRelationshipInitialize (xmlSecTransformPtr transform);
-+static void xmlSecRelationshipFinalize (xmlSecTransformPtr transform);
-+static int xmlSecTransformRelationshipPopBin(xmlSecTransformPtr transform, xmlSecByte* data, xmlSecSize maxDataSize, xmlSecSize* dataSize, xmlSecTransformCtxPtr transformCtx);
-+static int xmlSecTransformRelationshipPushXml(xmlSecTransformPtr transform, xmlSecNodeSetPtr nodes, xmlSecTransformCtxPtr transformCtx);
-+static int xmlSecRelationshipReadNode(xmlSecTransformPtr transform, xmlNodePtr node, xmlSecTransformCtxPtr transformCtx);
-+
-+static xmlSecTransformKlass xmlSecRelationshipKlass =
-+{
++#define xmlSecRelationshipSize \
++ (sizeof(xmlSecTransform) + sizeof(xmlSecRelationshipCtx))
++#define xmlSecRelationshipGetCtx(transform) \
++ ((xmlSecRelationshipCtxPtr)(((xmlSecByte*)(transform)) + sizeof(xmlSecTransform)))
++
++static int xmlSecRelationshipInitialize (xmlSecTransformPtr transform);
++static void xmlSecRelationshipFinalize (xmlSecTransformPtr transform);
++static int xmlSecTransformRelationshipPopBin (xmlSecTransformPtr transform,
++ xmlSecByte* data,
++ xmlSecSize maxDataSize,
++ xmlSecSize* dataSize,
++ xmlSecTransformCtxPtr transformCtx);
++static int xmlSecTransformRelationshipPushXml(xmlSecTransformPtr transform,
++ xmlSecNodeSetPtr nodes,
++ xmlSecTransformCtxPtr transformCtx);
++static int xmlSecRelationshipReadNode (xmlSecTransformPtr transform,
++ xmlNodePtr node,
++ xmlSecTransformCtxPtr transformCtx);
++
++static xmlSecTransformKlass xmlSecRelationshipKlass = {
+ /* klass/object sizes */
-+ sizeof(xmlSecTransformKlass), /* xmlSecSize klassSize */
-+ xmlSecRelationshipSize, /* xmlSecSize objSize */
-+ xmlSecNameRelationship, /* const xmlChar* name; */
-+ xmlSecHrefRelationship, /* const xmlChar* href; */
-+ xmlSecTransformUsageDSigTransform, /* xmlSecAlgorithmUsage usage; */
-+ xmlSecRelationshipInitialize, /* xmlSecTransformInitializeMethod initialize; */
-+ xmlSecRelationshipFinalize, /* xmlSecTransformFinalizeMethod finalize; */
-+ xmlSecRelationshipReadNode, /* xmlSecTransformNodeReadMethod readNode; */
-+ NULL, /* xmlSecTransformNodeWriteMethod writeNode; */
-+ NULL, /* xmlSecTransformSetKeyReqMethod setKeyReq; */
-+ NULL, /* xmlSecTransformSetKeyMethod setKey; */
-+ NULL, /* xmlSecTransformValidateMethod validate; */
-+ xmlSecTransformDefaultGetDataType, /* xmlSecTransformGetDataTypeMethod getDataType; */
-+ NULL, /* xmlSecTransformPushBinMethod pushBin; */
-+ xmlSecTransformRelationshipPopBin, /* xmlSecTransformPopBinMethod popBin; */
-+ xmlSecTransformRelationshipPushXml, /* xmlSecTransformPushXmlMethod pushXml; */
-+ NULL, /* xmlSecTransformPopXmlMethod popXml; */
-+ NULL, /* xmlSecTransformExecuteMethod execute; */
-+ NULL, /* void* reserved0; */
-+ NULL, /* void* reserved1; */
++ sizeof(xmlSecTransformKlass), /* xmlSecSize klassSize */
++ xmlSecRelationshipSize, /* xmlSecSize objSize */
++
++ xmlSecNameRelationship, /* const xmlChar* name; */
++ xmlSecHrefRelationship, /* const xmlChar* href; */
++ xmlSecTransformUsageDSigTransform, /* xmlSecTransformUsage usage; */
++
++ xmlSecRelationshipInitialize, /* xmlSecTransformInitializeMethod initialize; */
++ xmlSecRelationshipFinalize, /* xmlSecTransformFinalizeMethod finalize; */
++ xmlSecRelationshipReadNode, /* xmlSecTransformNodeReadMethod readNode; */
++ NULL, /* xmlSecTransformNodeWriteMethod writeNode; */
++ NULL, /* xmlSecTransformSetKeyReqMethod setKeyReq; */
++ NULL, /* xmlSecTransformSetKeyMethod setKey; */
++ NULL, /* xmlSecTransformValidateMethod validate; */
++ xmlSecTransformDefaultGetDataType, /* xmlSecTransformGetDataTypeMethod getDataType; */
++ NULL, /* xmlSecTransformPushBinMethod pushBin; */
++ xmlSecTransformRelationshipPopBin, /* xmlSecTransformPopBinMethod popBin; */
++ xmlSecTransformRelationshipPushXml, /* xmlSecTransformPushXmlMethod pushXml; */
++ NULL, /* xmlSecTransformPopXmlMethod popXml; */
++ NULL, /* xmlSecTransformExecuteMethod execute; */
++
++ NULL, /* void* reserved0; */
++ NULL, /* void* reserved1; */
+};
+
-+xmlSecTransformId xmlSecTransformRelationshipGetKlass(void)
-+{
-+ return &xmlSecRelationshipKlass;
++xmlSecTransformId
++xmlSecTransformRelationshipGetKlass(void) {
++ return(&xmlSecRelationshipKlass);
+}
+
-+static int xmlSecRelationshipInitialize(xmlSecTransformPtr transform)
-+{
++static int
++xmlSecRelationshipInitialize(xmlSecTransformPtr transform) {
+ xmlSecRelationshipCtxPtr ctx;
+ int ret;
+
@@ -154,21 +191,19 @@ index e67631e..0fef1fe 100644
+ memset(ctx, 0, sizeof(xmlSecRelationshipCtx));
+
+ ctx->sourceIdList = xmlSecPtrListCreate(xmlSecStringListId);
-+ if (!ctx->sourceIdList)
-+ {
++ if(ctx->sourceIdList == NULL) {
+ xmlSecError(XMLSEC_ERRORS_HERE,
+ xmlSecErrorsSafeString(xmlSecTransformGetName(transform)),
+ "xmlSecPtrListCreate",
-+ XMLSEC_ERRORS_R_XMLSEC_FAILED,
-+ XMLSEC_ERRORS_NO_MESSAGE);
-+ return -1;
++ XMLSEC_ERRORS_R_XMLSEC_FAILED,
++ XMLSEC_ERRORS_NO_MESSAGE);
++ return(-1);
+ }
-+
-+ return 0;
++ return(0);
+}
+
-+static void xmlSecRelationshipFinalize(xmlSecTransformPtr transform)
-+{
++static void
++xmlSecRelationshipFinalize(xmlSecTransformPtr transform) {
+ xmlSecRelationshipCtxPtr ctx;
+
+ xmlSecAssert(xmlSecTransformCheckId(transform, xmlSecTransformRelationshipId));
@@ -177,14 +212,15 @@ index e67631e..0fef1fe 100644
+ ctx = xmlSecRelationshipGetCtx(transform);
+ xmlSecAssert(ctx != NULL);
+
-+ if (ctx->sourceIdList)
-+ xmlSecPtrListDestroy(ctx->sourceIdList);
++ if(ctx->sourceIdList != NULL) {
++ xmlSecPtrListDestroy(ctx->sourceIdList);
++ }
+
+ memset(ctx, 0, sizeof(xmlSecRelationshipCtx));
+}
+
-+static int xmlSecRelationshipReadNode(xmlSecTransformPtr transform, xmlNodePtr node, xmlSecTransformCtxPtr transformCtx)
-+{
++static int
++xmlSecRelationshipReadNode(xmlSecTransformPtr transform, xmlNodePtr node, xmlSecTransformCtxPtr transformCtx) {
+ xmlSecRelationshipCtxPtr ctx;
+ xmlNodePtr cur;
+ int ret;
@@ -197,238 +233,372 @@ index e67631e..0fef1fe 100644
+ xmlSecAssert2(ctx != NULL, -1);
+
+ cur = node->children;
-+ while (cur)
-+ {
-+ if (xmlSecCheckNodeName(cur, "RelationshipReference", "http://schemas.openxmlformats.org/package/2006/digital-signature"))
-+ {
++ while(cur != NULL) {
++ if(xmlSecCheckNodeName(cur, xmlSecNodeRelationshipReference, xmlSecRelationshipReferenceNs)) {
+ xmlChar* sourceId;
+ xmlChar* tmp;
+
+ sourceId = xmlGetProp(cur, "SourceId");
-+ if (sourceId == NULL)
-+ {
++ if(sourceId == NULL) {
+ xmlSecError(XMLSEC_ERRORS_HERE,
-+ NULL,
++ "xmlGetProp",
+ xmlSecErrorsSafeString("SourceId"),
+ XMLSEC_ERRORS_R_INVALID_NODE_ATTRIBUTE,
+ "node=%s",
+ xmlSecErrorsSafeString(xmlSecNodeGetName(node)));
-+ return -1;
++ return(-1);
+ }
+
+ tmp = xmlStrdup(sourceId);
-+ if (!tmp)
-+ {
++ if(tmp == NULL) {
+ xmlSecError(XMLSEC_ERRORS_HERE,
+ xmlSecErrorsSafeString(xmlSecTransformGetName(transform)),
-+ NULL,
++ "xmlStrdup",
+ XMLSEC_ERRORS_R_STRDUP_FAILED,
+ "len=%d", xmlStrlen(sourceId));
-+ return -1;
++ return(-1);
+ }
+
+ ret = xmlSecPtrListAdd(ctx->sourceIdList, tmp);
-+ if (ret < 0)
-+ {
++ if(ret < 0) {
+ xmlSecError(XMLSEC_ERRORS_HERE,
+ xmlSecErrorsSafeString(xmlSecTransformGetName(transform)),
+ "xmlSecPtrListAdd",
+ XMLSEC_ERRORS_R_XMLSEC_FAILED,
+ XMLSEC_ERRORS_NO_MESSAGE);
+ xmlFree(tmp);
-+ return -1;
++ return(-1);
+ }
-+
+ }
+
+ cur = cur->next;
+ }
+
-+ return 0;
++ return(0);
+}
+
-+int xmlSecTransformRelationshipProcessElementNode(xmlSecTransformPtr transform, xmlOutputBufferPtr buf, xmlNodePtr cur)
-+{
-+ xmlAttrPtr attr;
-+ int foundTargetMode = 0;
-+
-+ xmlOutputBufferWriteString(buf, "<");
-+ xmlOutputBufferWriteString(buf, (const char *)cur->name);
++/* Sorts Relationship elements by Id value in lexicographical order. */
++static int
++xmlSecTransformRelationshipCompare(xmlNodePtr node1, xmlNodePtr node2) {
++ xmlChar* id1;
++ xmlChar* id2;
+
-+ if (cur->nsDef)
-+ {
-+ xmlOutputBufferWriteString(buf, " xmlns=\"");
-+ if (cur->nsDef->href)
-+ xmlOutputBufferWriteString(buf, cur->nsDef->href);
-+ xmlOutputBufferWriteString(buf, "\"");
++ if(node1 == node2) {
++ return(0);
+ }
-+
-+ for (attr = cur->properties; attr; attr = attr->next)
-+ {
-+ xmlOutputBufferWriteString(buf, " ");
-+ xmlOutputBufferWriteString(buf, (const char *)attr->name);
-+ if (strcmp(attr->name, "TargetMode") == 0)
-+ foundTargetMode = 1;
-+ xmlOutputBufferWriteString(buf, "=\"");
-+ xmlOutputBufferWriteString(buf, (const char *)xmlGetProp(cur, attr->name));
-+ xmlOutputBufferWriteString(buf, "\"");
++ if(node1 == NULL) {
++ return(-1);
++ }
++ if(node2 == NULL) {
++ return(1);
+ }
+
-+ if (strcmp(cur->name, "Relationship") == 0 && !foundTargetMode)
-+ xmlOutputBufferWriteString(buf, " TargetMode=\"Internal\"");
-+
-+ xmlOutputBufferWriteString(buf, ">");
++ id1 = xmlGetProp(node1, "Id");
++ id2 = xmlGetProp(node2, "Id");
+
-+ if (cur->children)
-+ {
-+ int ret = xmlSecTransformRelationshipProcessNodeList(transform, buf, cur->children);
-+ if (ret < 0)
-+ return -1;
++ if(id1 == NULL) {
++ return(-1);
+ }
+
-+ xmlOutputBufferWriteString(buf, "</");
-+ xmlOutputBufferWriteString(buf, (const char *)cur->name);
-+ xmlOutputBufferWriteString(buf, ">");
++ if(id2 == NULL) {
++ return(1);
++ }
+
-+ return 0;
++ return(xmlStrcmp(id1, id2));
+}
+
-+int xmlSecTransformRelationshipProcessNode(xmlSecTransformPtr transform, xmlOutputBufferPtr buf, xmlNodePtr cur)
-+{
++static int
++xmlSecTransformRelationshipProcessElementNode(xmlSecTransformPtr transform, xmlOutputBufferPtr buf, xmlNodePtr cur);
++
++static int
++xmlSecTransformRelationshipProcessNode(xmlSecTransformPtr transform, xmlOutputBufferPtr buf, xmlNodePtr cur) {
+ int ret;
+
-+ switch (cur->type)
-+ {
-+ case XML_ELEMENT_NODE:
-+ if (xmlSecCheckNodeName(cur, "Relationship", "http://schemas.openxmlformats.org/package/2006/relationships"))
-+ {
-+ xmlChar* id = xmlGetProp(cur, "Id");
-+ if (id)
-+ {
-+ int i;
-+ int found = 0;
-+ xmlSecRelationshipCtxPtr ctx;
-+
-+ ctx = xmlSecRelationshipGetCtx(transform);
-+ for (i = 0; i < xmlSecPtrListGetSize(ctx->sourceIdList); ++i)
-+ {
-+ if (strcmp(xmlSecPtrListGetItem(ctx->sourceIdList, i), id) == 0)
-+ {
-+ found = 1;
-+ break;
-+ }
-+ }
-+
-+ if (!found)
-+ return 0;
++ if(xmlSecCheckNodeName(cur, xmlSecNodeRelationship, xmlSecRelationshipsNs)) {
++ xmlChar* id = xmlGetProp(cur, "Id");
++ if(id == NULL) {
++ xmlSecError(XMLSEC_ERRORS_HERE,
++ xmlSecErrorsSafeString(xmlSecTransformGetName(transform)),
++ "xmlGetProp",
++ XMLSEC_ERRORS_R_XML_FAILED,
++ "name=Id");
++ return(-1);
++ }
++
++ int i;
++ int found = -1;
++ xmlSecRelationshipCtxPtr ctx;
++
++ ctx = xmlSecRelationshipGetCtx(transform);
++ for(i = 0; i < xmlSecPtrListGetSize(ctx->sourceIdList); ++i) {
++ if(xmlStrcmp(xmlSecPtrListGetItem(ctx->sourceIdList, i), id) == 0) {
++ found = 1;
++ break;
+ }
+ }
+
-+ ret = xmlSecTransformRelationshipProcessElementNode(transform, buf, cur);
-+ if (ret < 0)
-+ return -1;
-+ break;
++ if(found < 0) {
++ return(0);
++ }
+ }
+
-+ return 0;
-+}
-+
-+/* Sorts Relationship elements by Id value in lexicographical order. */
-+static int xmlSecTransformRelationshipCompare(xmlNodePtr node1, xmlNodePtr node2)
-+{
-+ xmlChar* id1;
-+ xmlChar* id2;
-+
-+ if (node1 == node2)
-+ return 0;
-+ if (!node1)
-+ return -1;
-+ if (!node2)
-+ return 1;
-
-+ id1 = xmlGetProp(node1, "Id");
-+ id2 = xmlGetProp(node2, "Id");
-
-+ if (!id1)
-+ return -1;
-+ if (!id2)
-+ return 1;
++ ret = xmlSecTransformRelationshipProcessElementNode(transform, buf, cur);
++ if(ret < 0) {
++ xmlSecError(XMLSEC_ERRORS_HERE,
++ xmlSecErrorsSafeString(xmlSecTransformGetName(transform)),
++ "xmlSecTransformRelationshipProcessElementNode",
++ XMLSEC_ERRORS_R_XMLSEC_FAILED,
++ XMLSEC_ERRORS_NO_MESSAGE);
++ return(-1);
++ }
+
-+ return xmlStrcmp(id1, id2);
++ return(0);
+}
+
-+int xmlSecTransformRelationshipProcessNodeList(xmlSecTransformPtr transform, xmlOutputBufferPtr buf, xmlNodePtr cur)
-+{
++static int
++xmlSecTransformRelationshipProcessNodeList(xmlSecTransformPtr transform, xmlOutputBufferPtr buf, xmlNodePtr cur) {
+ xmlListPtr list;
+ int ret;
+
+ list = xmlListCreate(NULL, (xmlListDataCompare)xmlSecTransformRelationshipCompare);
-+ if (!list)
-+ return -1;
-+
-+ for (; cur; cur = cur->next)
-+ {
-+ if (strcmp(cur->name, "Relationship") == 0)
-+ xmlListInsert(list, cur);
-+ else
-+ {
++ if(list == NULL) {
++ xmlSecError(XMLSEC_ERRORS_HERE,
++ xmlSecErrorsSafeString(xmlSecTransformGetName(transform)),
++ "xmlListCreate",
++ XMLSEC_ERRORS_R_XMLSEC_FAILED,
++ XMLSEC_ERRORS_NO_MESSAGE);
++ return(-1);
++ }
++
++ for(; cur; cur = cur->next) {
++ if(xmlStrcmp(cur->name, xmlSecNodeRelationship) == 0) {
++ if(xmlListInsert(list, cur) != 0) {
++ xmlSecError(XMLSEC_ERRORS_HERE,
++ xmlSecErrorsSafeString(xmlSecTransformGetName(transform)),
++ "xmlListInsert",
++ XMLSEC_ERRORS_R_XMLSEC_FAILED,
++ XMLSEC_ERRORS_NO_MESSAGE);
++ return(-1);
++ }
++ } else {
+ ret = xmlSecTransformRelationshipProcessNode(transform, buf, cur);
-+ if (ret < 0)
-+ {
++ if(ret < 0) {
++ xmlSecError(XMLSEC_ERRORS_HERE,
++ xmlSecErrorsSafeString(xmlSecTransformGetName(transform)),
++ "xmlSecTransformRelationshipProcessNode",
++ XMLSEC_ERRORS_R_XMLSEC_FAILED,
++ XMLSEC_ERRORS_NO_MESSAGE);
+ xmlListDelete(list);
-+ return -1;
++ return(-1);
+ }
+ }
+ }
+
-+ if (!xmlListEmpty(list))
-+ {
++ if(!xmlListEmpty(list)) {
+ int size;
+ int i;
+
+ xmlListSort(list);
+ size = xmlListSize(list);
-+ for (i = 0; i < size; ++i)
-+ {
++ for(i = 0; i < size; ++i) {
+ xmlLinkPtr link = xmlListFront(list);
+ xmlNodePtr node = (xmlNodePtr)xmlLinkGetData(link);
+
+ ret = xmlSecTransformRelationshipProcessNode(transform, buf, node);
-+ if (ret < 0)
-+ {
++ if(ret < 0) {
++ xmlSecError(XMLSEC_ERRORS_HERE,
++ xmlSecErrorsSafeString(xmlSecTransformGetName(transform)),
++ "xmlSecTransformRelationshipProcessNode",
++ XMLSEC_ERRORS_R_XMLSEC_FAILED,
++ XMLSEC_ERRORS_NO_MESSAGE);
+ xmlListDelete(list);
-+ return -1;
++ return(-1);
+ }
+
+ xmlListPopFront(list);
+ }
-+
+ }
+
+ xmlListDelete(list);
-+ return 0;
++ return(0);
+}
+
-+int xmlSecTransformRelationshipExecute(xmlSecTransformPtr transform, xmlOutputBufferPtr buf, xmlDocPtr doc)
-+{
-+ if (doc->children != NULL)
-+ {
++static int
++xmlSecTransformRelationshipProcessElementNode(xmlSecTransformPtr transform, xmlOutputBufferPtr buf, xmlNodePtr cur) {
++ xmlAttrPtr attr;
++ int foundTargetMode = 0;
++
++ if(xmlOutputBufferWriteString(buf, "<") < 0) {
++ xmlSecError(XMLSEC_ERRORS_HERE,
++ xmlSecErrorsSafeString(xmlSecTransformGetName(transform)),
++ "xmlOutputBufferWriteString",
++ XMLSEC_ERRORS_R_XMLSEC_FAILED,
++ XMLSEC_ERRORS_NO_MESSAGE);
++ return(-1);
++ }
++ if(xmlOutputBufferWriteString(buf, (const char *)cur->name) < 0) {
++ xmlSecError(XMLSEC_ERRORS_HERE,
++ xmlSecErrorsSafeString(xmlSecTransformGetName(transform)),
++ "xmlOutputBufferWriteString",
++ XMLSEC_ERRORS_R_XMLSEC_FAILED,
++ XMLSEC_ERRORS_NO_MESSAGE);
++ return(-1);
++ }
++
++ if(cur->nsDef != NULL) {
++ if(xmlOutputBufferWriteString(buf, " xmlns=\"") < 0) {
++ xmlSecError(XMLSEC_ERRORS_HERE,
++ xmlSecErrorsSafeString(xmlSecTransformGetName(transform)),
++ "xmlOutputBufferWriteString",
++ XMLSEC_ERRORS_R_XMLSEC_FAILED,
++ XMLSEC_ERRORS_NO_MESSAGE);
++ return(-1);
++ }
++ if(cur->nsDef->href != NULL) {
++ if(xmlOutputBufferWriteString(buf, cur->nsDef->href) < 0) {
++ xmlSecError(XMLSEC_ERRORS_HERE,
++ xmlSecErrorsSafeString(xmlSecTransformGetName(transform)),
++ "xmlOutputBufferWriteString",
++ XMLSEC_ERRORS_R_XMLSEC_FAILED,
++ XMLSEC_ERRORS_NO_MESSAGE);
++ return(-1);
++ }
++ }
++ if(xmlOutputBufferWriteString(buf, "\"") < 0) {
++ xmlSecError(XMLSEC_ERRORS_HERE,
++ xmlSecErrorsSafeString(xmlSecTransformGetName(transform)),
++ "xmlOutputBufferWriteString",
++ XMLSEC_ERRORS_R_XMLSEC_FAILED,
++ XMLSEC_ERRORS_NO_MESSAGE);
++ return(-1);
++ }
++ }
++
++ for(attr = cur->properties; attr; attr = attr->next) {
++ if(xmlOutputBufferWriteString(buf, " ") < 0) {
++ xmlSecError(XMLSEC_ERRORS_HERE,
++ xmlSecErrorsSafeString(xmlSecTransformGetName(transform)),
++ "xmlOutputBufferWriteString",
++ XMLSEC_ERRORS_R_XMLSEC_FAILED,
++ XMLSEC_ERRORS_NO_MESSAGE);
++ return(-1);
++ }
++ if(xmlOutputBufferWriteString(buf, (const char *)attr->name) < 0) {
++ xmlSecError(XMLSEC_ERRORS_HERE,
++ xmlSecErrorsSafeString(xmlSecTransformGetName(transform)),
++ "xmlOutputBufferWriteString",
++ XMLSEC_ERRORS_R_XMLSEC_FAILED,
++ XMLSEC_ERRORS_NO_MESSAGE);
++ return(-1);
++ }
++ if(xmlStrcmp(attr->name, "TargetMode") == 0) {
++ foundTargetMode = 1;
++ }
++ if(xmlOutputBufferWriteString(buf, "=\"") < 0) {
++ xmlSecError(XMLSEC_ERRORS_HERE,
++ xmlSecErrorsSafeString(xmlSecTransformGetName(transform)),
++ "xmlOutputBufferWriteString",
++ XMLSEC_ERRORS_R_XMLSEC_FAILED,
++ XMLSEC_ERRORS_NO_MESSAGE);
++ return(-1);
++ }
++ if(xmlOutputBufferWriteString(buf, (const char *)xmlGetProp(cur, attr->name)) < 0) {
++ xmlSecError(XMLSEC_ERRORS_HERE,
++ xmlSecErrorsSafeString(xmlSecTransformGetName(transform)),
++ "xmlOutputBufferWriteString",
++ XMLSEC_ERRORS_R_XMLSEC_FAILED,
++ XMLSEC_ERRORS_NO_MESSAGE);
++ return(-1);
++ }
++ if(xmlOutputBufferWriteString(buf, "\"") < 0) {
++ xmlSecError(XMLSEC_ERRORS_HERE,
++ xmlSecErrorsSafeString(xmlSecTransformGetName(transform)),
++ "xmlOutputBufferWriteString",
++ XMLSEC_ERRORS_R_XMLSEC_FAILED,
++ XMLSEC_ERRORS_NO_MESSAGE);
++ return(-1);
++ }
++ }
++
++ if(xmlStrcmp(cur->name, xmlSecNodeRelationship) == 0 && !foundTargetMode) {
++ if(xmlOutputBufferWriteString(buf, " TargetMode=\"Internal\"") < 0) {
++ xmlSecError(XMLSEC_ERRORS_HERE,
++ xmlSecErrorsSafeString(xmlSecTransformGetName(transform)),
++ "xmlOutputBufferWriteString",
++ XMLSEC_ERRORS_R_XMLSEC_FAILED,
++ XMLSEC_ERRORS_NO_MESSAGE);
++ return(-1);
++ }
++ }
++
++ if(xmlOutputBufferWriteString(buf, ">") < 0) {
++ xmlSecError(XMLSEC_ERRORS_HERE,
++ xmlSecErrorsSafeString(xmlSecTransformGetName(transform)),
++ "xmlOutputBufferWriteString",
++ XMLSEC_ERRORS_R_XMLSEC_FAILED,
++ XMLSEC_ERRORS_NO_MESSAGE);
++ return(-1);
++ }
++
++ if(cur->children != NULL) {
++ int ret = xmlSecTransformRelationshipProcessNodeList(transform, buf, cur->children);
++ if(ret < 0) {
++ xmlSecError(XMLSEC_ERRORS_HERE,
++ xmlSecErrorsSafeString(xmlSecTransformGetName(transform)),
++ "xmlSecTransformRelationshipProcessNodeList",
++ XMLSEC_ERRORS_R_XMLSEC_FAILED,
++ XMLSEC_ERRORS_NO_MESSAGE);
++ return(-1);
++ }
++ }
++
++ if(xmlOutputBufferWriteString(buf, "</") < 0) {
++ xmlSecError(XMLSEC_ERRORS_HERE,
++ xmlSecErrorsSafeString(xmlSecTransformGetName(transform)),
++ "xmlOutputBufferWriteString",
++ XMLSEC_ERRORS_R_XMLSEC_FAILED,
++ XMLSEC_ERRORS_NO_MESSAGE);
++ return(-1);
++ }
++ if(xmlOutputBufferWriteString(buf, (const char *)cur->name) < 0) {
++ xmlSecError(XMLSEC_ERRORS_HERE,
++ xmlSecErrorsSafeString(xmlSecTransformGetName(transform)),
++ "xmlOutputBufferWriteString",
++ XMLSEC_ERRORS_R_XMLSEC_FAILED,
++ XMLSEC_ERRORS_NO_MESSAGE);
++ return(-1);
++ }
++ if(xmlOutputBufferWriteString(buf, ">") < 0) {
++ xmlSecError(XMLSEC_ERRORS_HERE,
++ xmlSecErrorsSafeString(xmlSecTransformGetName(transform)),
++ "xmlOutputBufferWriteString",
++ XMLSEC_ERRORS_R_XMLSEC_FAILED,
++ XMLSEC_ERRORS_NO_MESSAGE);
++ return(-1);
++ }
++
++ return(0);
++}
++
++static int
++xmlSecTransformRelationshipExecute(xmlSecTransformPtr transform, xmlOutputBufferPtr buf, xmlDocPtr doc) {
++ if(doc->children != NULL) {
+ int ret = xmlSecTransformRelationshipProcessNodeList(transform, buf, doc->children);
-+ if (ret < 0)
-+ {
++ if(ret < 0) {
+ xmlSecError(XMLSEC_ERRORS_HERE,
+ xmlSecErrorsSafeString(xmlSecTransformGetName(transform)),
+ "xmlSecTransformRelationshipProcessNodeList",
+ XMLSEC_ERRORS_R_XMLSEC_FAILED,
+ XMLSEC_ERRORS_NO_MESSAGE);
-+ return -1;
++ return(-1);
+ }
+ }
+
-+ return 0;
++ return(0);
+}
+
-+static int xmlSecTransformRelationshipPushXml(xmlSecTransformPtr transform, xmlSecNodeSetPtr nodes, xmlSecTransformCtxPtr transformCtx)
++static int
++xmlSecTransformRelationshipPushXml(xmlSecTransformPtr transform, xmlSecNodeSetPtr nodes, xmlSecTransformCtxPtr transformCtx)
+{
+ xmlOutputBufferPtr buf;
+ xmlSecRelationshipCtxPtr ctx;
@@ -442,79 +612,72 @@ index e67631e..0fef1fe 100644
+ xmlSecAssert2(ctx != NULL, -1);
+
+ /* check/update current transform status */
-+ switch(transform->status)
-+ {
++ switch(transform->status) {
+ case xmlSecTransformStatusNone:
-+ transform->status = xmlSecTransformStatusWorking;
-+ break;
++ transform->status = xmlSecTransformStatusWorking;
++ break;
+ case xmlSecTransformStatusWorking:
+ case xmlSecTransformStatusFinished:
-+ return(0);
++ return(0);
+ default:
-+ xmlSecError(XMLSEC_ERRORS_HERE,
-+ xmlSecErrorsSafeString(xmlSecTransformGetName(transform)),
-+ NULL,
-+ XMLSEC_ERRORS_R_INVALID_STATUS,
-+ "status=%d", transform->status);
-+ return(-1);
++ xmlSecError(XMLSEC_ERRORS_HERE,
++ xmlSecErrorsSafeString(xmlSecTransformGetName(transform)),
++ NULL,
++ XMLSEC_ERRORS_R_INVALID_STATUS,
++ "status=%d", transform->status);
++ return(-1);
+ }
+ xmlSecAssert2(transform->status == xmlSecTransformStatusWorking, -1);
+
+ /* prepare output buffer: next transform or ourselves */
-+ if(transform->next != NULL)
-+ {
-+ buf = xmlSecTransformCreateOutputBuffer(transform->next, transformCtx);
-+ if(buf == NULL)
-+ {
-+ xmlSecError(XMLSEC_ERRORS_HERE,
-+ xmlSecErrorsSafeString(xmlSecTransformGetName(transform)),
-+ "xmlSecTransformCreateOutputBuffer",
-+ XMLSEC_ERRORS_R_XMLSEC_FAILED,
-+ XMLSEC_ERRORS_NO_MESSAGE);
-+ return(-1);
-+ }
-+ } else
-+ {
-+ buf = xmlSecBufferCreateOutputBuffer(&(transform->outBuf));
-+ if (buf == NULL)
-+ {
-+ xmlSecError(XMLSEC_ERRORS_HERE,
-+ xmlSecErrorsSafeString(xmlSecTransformGetName(transform)),
-+ "xmlSecBufferCreateOutputBuffer",
-+ XMLSEC_ERRORS_R_XMLSEC_FAILED,
-+ XMLSEC_ERRORS_NO_MESSAGE);
-+ return(-1);
-+ }
++ if(transform->next != NULL) {
++ buf = xmlSecTransformCreateOutputBuffer(transform->next, transformCtx);
++ if(buf == NULL) {
++ xmlSecError(XMLSEC_ERRORS_HERE,
++ xmlSecErrorsSafeString(xmlSecTransformGetName(transform)),
++ "xmlSecTransformCreateOutputBuffer",
++ XMLSEC_ERRORS_R_XMLSEC_FAILED,
++ XMLSEC_ERRORS_NO_MESSAGE);
++ return(-1);
++ }
++ } else {
++ buf = xmlSecBufferCreateOutputBuffer(&(transform->outBuf));
++ if(buf == NULL) {
++ xmlSecError(XMLSEC_ERRORS_HERE,
++ xmlSecErrorsSafeString(xmlSecTransformGetName(transform)),
++ "xmlSecBufferCreateOutputBuffer",
++ XMLSEC_ERRORS_R_XMLSEC_FAILED,
++ XMLSEC_ERRORS_NO_MESSAGE);
++ return(-1);
++ }
+ }
+
+ ret = xmlSecTransformRelationshipExecute(transform, buf, nodes->doc);
-+ if (ret < 0)
-+ {
-+ xmlSecError(XMLSEC_ERRORS_HERE,
-+ xmlSecErrorsSafeString(xmlSecTransformGetName(transform)),
-+ "xmlC14NExecute",
-+ XMLSEC_ERRORS_R_XMLSEC_FAILED,
-+ XMLSEC_ERRORS_NO_MESSAGE);
-+ xmlOutputBufferClose(buf);
-+ return(-1);
++ if(ret < 0) {
++ xmlSecError(XMLSEC_ERRORS_HERE,
++ xmlSecErrorsSafeString(xmlSecTransformGetName(transform)),
++ "xmlC14NExecute",
++ XMLSEC_ERRORS_R_XMLSEC_FAILED,
++ XMLSEC_ERRORS_NO_MESSAGE);
++ xmlOutputBufferClose(buf);
++ return(-1);
+ }
+
+ ret = xmlOutputBufferClose(buf);
-+ if (ret < 0)
-+ {
-+ xmlSecError(XMLSEC_ERRORS_HERE,
-+ xmlSecErrorsSafeString(xmlSecTransformGetName(transform)),
-+ "xmlOutputBufferClose",
-+ XMLSEC_ERRORS_R_XML_FAILED,
-+ XMLSEC_ERRORS_NO_MESSAGE);
-+ return(-1);
++ if(ret < 0) {
++ xmlSecError(XMLSEC_ERRORS_HERE,
++ xmlSecErrorsSafeString(xmlSecTransformGetName(transform)),
++ "xmlOutputBufferClose",
++ XMLSEC_ERRORS_R_XML_FAILED,
++ XMLSEC_ERRORS_NO_MESSAGE);
++ return(-1);
+ }
+ transform->status = xmlSecTransformStatusFinished;
+ return(0);
+}
+
-+static int xmlSecTransformRelationshipPopBin(xmlSecTransformPtr transform, xmlSecByte* data, xmlSecSize maxDataSize, xmlSecSize* dataSize, xmlSecTransformCtxPtr transformCtx)
-+{
++static int
++xmlSecTransformRelationshipPopBin(xmlSecTransformPtr transform, xmlSecByte* data, xmlSecSize maxDataSize, xmlSecSize* dataSize, xmlSecTransformCtxPtr transformCtx) {
+ xmlSecBufferPtr out;
+ int ret;
+
@@ -523,120 +686,105 @@ index e67631e..0fef1fe 100644
+ xmlSecAssert2(transformCtx != NULL, -1);
+
+ out = &(transform->outBuf);
-+ if (transform->status == xmlSecTransformStatusNone)
-+ {
-+ xmlOutputBufferPtr buf;
-+
-+ xmlSecAssert2(transform->inNodes == NULL, -1);
-+
-+ /* todo: isn't it an error? */
-+ if (transform->prev == NULL)
-+ {
-+ (*dataSize) = 0;
-+ transform->status = xmlSecTransformStatusFinished;
-+ return(0);
-+ }
-+
-+ /* get xml data from previous transform */
-+ ret = xmlSecTransformPopXml(transform->prev, &(transform->inNodes), transformCtx);
-+ if (ret < 0)
-+ {
-+ xmlSecError(XMLSEC_ERRORS_HERE,
-+ xmlSecErrorsSafeString(xmlSecTransformGetName(transform)),
-+ "xmlSecTransformPopXml",
-+ XMLSEC_ERRORS_R_XMLSEC_FAILED,
-+ XMLSEC_ERRORS_NO_MESSAGE);
-+ return(-1);
-+ }
-+
-+ /* dump everything to internal buffer */
-+ buf = xmlSecBufferCreateOutputBuffer(out);
-+ if (buf == NULL)
-+ {
-+ xmlSecError(XMLSEC_ERRORS_HERE,
-+ xmlSecErrorsSafeString(xmlSecTransformGetName(transform)),
-+ "xmlSecBufferCreateOutputBuffer",
-+ XMLSEC_ERRORS_R_XMLSEC_FAILED,
-+ XMLSEC_ERRORS_NO_MESSAGE);
-+ return(-1);
-+ }
-+
-+ ret = xmlC14NExecute(transform->inNodes->doc, (xmlC14NIsVisibleCallback)xmlSecNodeSetContains, transform->inNodes, XML_C14N_1_0, NULL, 0, buf);
-+ if (ret < 0)
-+ {
++ if(transform->status == xmlSecTransformStatusNone) {
++ xmlOutputBufferPtr buf;
++
++ xmlSecAssert2(transform->inNodes == NULL, -1);
++
++ if(transform->prev == NULL) {
++ (*dataSize) = 0;
++ transform->status = xmlSecTransformStatusFinished;
++ return(0);
++ }
++
++ /* get xml data from previous transform */
++ ret = xmlSecTransformPopXml(transform->prev, &(transform->inNodes), transformCtx);
++ if(ret < 0) {
++ xmlSecError(XMLSEC_ERRORS_HERE,
++ xmlSecErrorsSafeString(xmlSecTransformGetName(transform)),
++ "xmlSecTransformPopXml",
++ XMLSEC_ERRORS_R_XMLSEC_FAILED,
++ XMLSEC_ERRORS_NO_MESSAGE);
++ return(-1);
++ }
++
++ /* dump everything to internal buffer */
++ buf = xmlSecBufferCreateOutputBuffer(out);
++ if(buf == NULL) {
++ xmlSecError(XMLSEC_ERRORS_HERE,
++ xmlSecErrorsSafeString(xmlSecTransformGetName(transform)),
++ "xmlSecBufferCreateOutputBuffer",
++ XMLSEC_ERRORS_R_XMLSEC_FAILED,
++ XMLSEC_ERRORS_NO_MESSAGE);
++ return(-1);
++ }
++
++ ret = xmlC14NExecute(transform->inNodes->doc, (xmlC14NIsVisibleCallback)xmlSecNodeSetContains, transform->inNodes, XML_C14N_1_0, NULL, 0, buf);
++ if(ret < 0) {
+ xmlSecError(XMLSEC_ERRORS_HERE,
-+ xmlSecErrorsSafeString(xmlSecTransformGetName(transform)),
-+ "xmlSecTransformC14NExecute",
-+ XMLSEC_ERRORS_R_XMLSEC_FAILED,
-+ XMLSEC_ERRORS_NO_MESSAGE);
-+ xmlOutputBufferClose(buf);
-+ return(-1);
-+ }
-+ ret = xmlOutputBufferClose(buf);
-+ if (ret < 0)
-+ {
-+ xmlSecError(XMLSEC_ERRORS_HERE,
-+ xmlSecErrorsSafeString(xmlSecTransformGetName(transform)),
-+ "xmlOutputBufferClose",
-+ XMLSEC_ERRORS_R_XML_FAILED,
-+ XMLSEC_ERRORS_NO_MESSAGE);
-+ return(-1);
-+ }
-+ transform->status = xmlSecTransformStatusWorking;
++ xmlSecErrorsSafeString(xmlSecTransformGetName(transform)),
++ "xmlSecTransformC14NExecute",
++ XMLSEC_ERRORS_R_XMLSEC_FAILED,
++ XMLSEC_ERRORS_NO_MESSAGE);
++ xmlOutputBufferClose(buf);
++ return(-1);
++ }
++
++ ret = xmlOutputBufferClose(buf);
++ if(ret < 0) {
++ xmlSecError(XMLSEC_ERRORS_HERE,
++ xmlSecErrorsSafeString(xmlSecTransformGetName(transform)),
++ "xmlOutputBufferClose",
++ XMLSEC_ERRORS_R_XML_FAILED,
++ XMLSEC_ERRORS_NO_MESSAGE);
++ return(-1);
++ }
++ transform->status = xmlSecTransformStatusWorking;
+ }
+
-+ if (transform->status == xmlSecTransformStatusWorking)
-+ {
-+ xmlSecSize outSize;
-+
-+ /* return chunk after chunk */
-+ outSize = xmlSecBufferGetSize(out);
-+ if (outSize > maxDataSize)
-+ {
-+ outSize = maxDataSize;
-+ }
-+ if (outSize > XMLSEC_TRANSFORM_BINARY_CHUNK)
-+ {
-+ outSize = XMLSEC_TRANSFORM_BINARY_CHUNK;
-+ }
-+ if (outSize > 0)
-+ {
-+ xmlSecAssert2(xmlSecBufferGetData(&(transform->outBuf)), -1);
-+
-+ memcpy(data, xmlSecBufferGetData(&(transform->outBuf)), outSize);
-+ ret = xmlSecBufferRemoveHead(&(transform->outBuf), outSize);
-+ if (ret < 0)
-+ {
-+ xmlSecError(XMLSEC_ERRORS_HERE,
-+ xmlSecErrorsSafeString(xmlSecTransformGetName(transform)),
-+ "xmlSecBufferRemoveHead",
-+ XMLSEC_ERRORS_R_XMLSEC_FAILED,
-+ "size=%d", outSize);
-+ return(-1);
-+ }
-+ }
-+ else if (xmlSecBufferGetSize(out) == 0)
-+ transform->status = xmlSecTransformStatusFinished;
-+ (*dataSize) = outSize;
-+ }
-+ else if (transform->status == xmlSecTransformStatusFinished)
-+ {
-+ /* the only way we can get here is if there is no output */
-+ xmlSecAssert2(xmlSecBufferGetSize(out) == 0, -1);
-+ (*dataSize) = 0;
-+ }
-+ else
-+ {
-+ xmlSecError(XMLSEC_ERRORS_HERE,
-+ xmlSecErrorsSafeString(xmlSecTransformGetName(transform)),
-+ NULL,
-+ XMLSEC_ERRORS_R_INVALID_STATUS,
-+ "status=%d", transform->status);
-+ return(-1);
++ if(transform->status == xmlSecTransformStatusWorking) {
++ xmlSecSize outSize;
++
++ /* return chunk after chunk */
++ outSize = xmlSecBufferGetSize(out);
++ if(outSize > maxDataSize) {
++ outSize = maxDataSize;
++ }
++ if(outSize > XMLSEC_TRANSFORM_BINARY_CHUNK) {
++ outSize = XMLSEC_TRANSFORM_BINARY_CHUNK;
++ }
++ if(outSize > 0) {
++ xmlSecAssert2(xmlSecBufferGetData(&(transform->outBuf)), -1);
++
++ memcpy(data, xmlSecBufferGetData(&(transform->outBuf)), outSize);
++ ret = xmlSecBufferRemoveHead(&(transform->outBuf), outSize);
++ if(ret < 0) {
++ xmlSecError(XMLSEC_ERRORS_HERE,
++ xmlSecErrorsSafeString(xmlSecTransformGetName(transform)),
++ "xmlSecBufferRemoveHead",
++ XMLSEC_ERRORS_R_XMLSEC_FAILED,
++ "size=%d", outSize);
++ return(-1);
++ }
++ } else if(xmlSecBufferGetSize(out) == 0) {
++ transform->status = xmlSecTransformStatusFinished;
++ }
++ (*dataSize) = outSize;
++ } else if(transform->status == xmlSecTransformStatusFinished) {
++ /* the only way we can get here is if there is no output */
++ xmlSecAssert2(xmlSecBufferGetSize(out) == 0, -1);
++ (*dataSize) = 0;
++ } else {
++ xmlSecError(XMLSEC_ERRORS_HERE,
++ xmlSecErrorsSafeString(xmlSecTransformGetName(transform)),
++ NULL,
++ XMLSEC_ERRORS_R_INVALID_STATUS,
++ "status=%d", transform->status);
++ return(-1);
+ }
+
+ return(0);
+}
--
-2.6.2
+2.6.6
diff --git a/external/libxmlsec/xmlsec1-update-config.guess.patch.1 b/external/libxmlsec/xmlsec1-update-config.guess.patch.1
deleted file mode 100644
index f92cfd2566c4..000000000000
--- a/external/libxmlsec/xmlsec1-update-config.guess.patch.1
+++ /dev/null
@@ -1,672 +0,0 @@
-From f8e7b18d6e4302e848606ac04f96aa55b79dbef8 Mon Sep 17 00:00:00 2001
-From: David Tardon <dtardon@redhat.com>
-Date: Tue, 13 May 2014 16:35:04 +0200
-Subject: [PATCH] update config.* to support ppc64le
-
-Conflicts:
- config.guess
- config.sub
----
- config.guess | 184 ++++++++++++++++++++++++++++++++++-------------------------
- config.sub | 108 ++++++++++++++++++++---------------
- 2 files changed, 169 insertions(+), 123 deletions(-)
-
-diff --git a/config.guess b/config.guess
-index d622a44..b79252d 100755
---- a/config.guess
-+++ b/config.guess
-@@ -1,14 +1,12 @@
- #! /bin/sh
- # Attempt to guess a canonical system name.
--# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
--# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
--# 2011, 2012 Free Software Foundation, Inc.
-+# Copyright 1992-2013 Free Software Foundation, Inc.
-
--timestamp='2012-02-10'
-+timestamp='2013-06-10'
-
- # This file is free software; you can redistribute it and/or modify it
- # under the terms of the GNU General Public License as published by
--# the Free Software Foundation; either version 2 of the License, or
-+# the Free Software Foundation; either version 3 of the License, or
- # (at your option) any later version.
- #
- # This program is distributed in the hope that it will be useful, but
-@@ -22,19 +20,17 @@ timestamp='2012-02-10'
- # As a special exception to the GNU General Public License, if you
- # distribute this file as part of a program that contains a
- # configuration script generated by Autoconf, you may include it under
--# the same distribution terms that you use for the rest of that program.
--
--
--# Originally written by Per Bothner. Please send patches (context
--# diff format) to <config-patches@gnu.org> and include a ChangeLog
--# entry.
-+# the same distribution terms that you use for the rest of that
-+# program. This Exception is an additional permission under section 7
-+# of the GNU General Public License, version 3 ("GPLv3").
- #
--# This script attempts to guess a canonical system name similar to
--# config.sub. If it succeeds, it prints the system name on stdout, and
--# exits with 0. Otherwise, it exits with 1.
-+# Originally written by Per Bothner.
- #
- # You can get the latest version of this script from:
- # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
-+#
-+# Please send patches with a ChangeLog entry to config-patches@gnu.org.
-+
-
- me=`echo "$0" | sed -e 's,.*/,,'`
-
-@@ -54,9 +50,7 @@ version="\
- GNU config.guess ($timestamp)
-
- Originally written by Per Bothner.
--Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
--2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
--Free Software Foundation, Inc.
-+Copyright 1992-2013 Free Software Foundation, Inc.
-
- This is free software; see the source for copying conditions. There is NO
- warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
-@@ -138,6 +132,27 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
- UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
- UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
-
-+case "${UNAME_SYSTEM}" in
-+Linux|GNU|GNU/*)
-+ # If the system lacks a compiler, then just pick glibc.
-+ # We could probably try harder.
-+ LIBC=gnu
-+
-+ eval $set_cc_for_build
-+ cat <<-EOF > $dummy.c
-+ #include <features.h>
-+ #if defined(__UCLIBC__)
-+ LIBC=uclibc
-+ #elif defined(__dietlibc__)
-+ LIBC=dietlibc
-+ #else
-+ LIBC=gnu
-+ #endif
-+ EOF
-+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
-+ ;;
-+esac
-+
- # Note: order is significant - the case branches are not exclusive.
-
- case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
-@@ -200,6 +215,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
- # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
- echo "${machine}-${os}${release}"
- exit ;;
-+ *:Bitrig:*:*)
-+ UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
-+ echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
-+ exit ;;
- *:OpenBSD:*:*)
- UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
- echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
-@@ -302,7 +321,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
- arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
- echo arm-acorn-riscix${UNAME_RELEASE}
- exit ;;
-- arm:riscos:*:*|arm:RISCOS:*:*)
-+ arm*:riscos:*:*|arm*:RISCOS:*:*)
- echo arm-unknown-riscos
- exit ;;
- SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
-@@ -801,6 +820,9 @@ EOF
- i*:CYGWIN*:*)
- echo ${UNAME_MACHINE}-pc-cygwin
- exit ;;
-+ *:MINGW64*:*)
-+ echo ${UNAME_MACHINE}-pc-mingw64
-+ exit ;;
- *:MINGW*:*)
- echo ${UNAME_MACHINE}-pc-mingw32
- exit ;;
-@@ -852,21 +874,21 @@ EOF
- exit ;;
- *:GNU:*:*)
- # the GNU system
-- echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
-+ echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
- exit ;;
- *:GNU/*:*:*)
- # other systems with GNU libc and userland
-- echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
-+ echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
- exit ;;
- i*86:Minix:*:*)
- echo ${UNAME_MACHINE}-pc-minix
- exit ;;
- aarch64:Linux:*:*)
-- echo ${UNAME_MACHINE}-unknown-linux-gnu
-+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
- exit ;;
- aarch64_be:Linux:*:*)
- UNAME_MACHINE=aarch64_be
-- echo ${UNAME_MACHINE}-unknown-linux-gnu
-+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
- exit ;;
- alpha:Linux:*:*)
- case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
-@@ -879,59 +901,54 @@ EOF
- EV68*) UNAME_MACHINE=alphaev68 ;;
- esac
- objdump --private-headers /bin/sh | grep -q ld.so.1
-- if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
-- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
-+ if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
-+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
-+ exit ;;
-+ arc:Linux:*:* | arceb:Linux:*:*)
-+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
- exit ;;
- arm*:Linux:*:*)
- eval $set_cc_for_build
- if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
- | grep -q __ARM_EABI__
- then
-- echo ${UNAME_MACHINE}-unknown-linux-gnu
-+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
- else
- if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
- | grep -q __ARM_PCS_VFP
- then
-- echo ${UNAME_MACHINE}-unknown-linux-gnueabi
-+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
- else
-- echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
-+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
- fi
- fi
- exit ;;
- avr32*:Linux:*:*)
-- echo ${UNAME_MACHINE}-unknown-linux-gnu
-+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
- exit ;;
- cris:Linux:*:*)
-- echo ${UNAME_MACHINE}-axis-linux-gnu
-+ echo ${UNAME_MACHINE}-axis-linux-${LIBC}
- exit ;;
- crisv32:Linux:*:*)
-- echo ${UNAME_MACHINE}-axis-linux-gnu
-+ echo ${UNAME_MACHINE}-axis-linux-${LIBC}
- exit ;;
- frv:Linux:*:*)
-- echo ${UNAME_MACHINE}-unknown-linux-gnu
-+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
- exit ;;
- hexagon:Linux:*:*)
-- echo ${UNAME_MACHINE}-unknown-linux-gnu
-+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
- exit ;;
- i*86:Linux:*:*)
-- LIBC=gnu
-- eval $set_cc_for_build
-- sed 's/^ //' << EOF >$dummy.c
-- #ifdef __dietlibc__
-- LIBC=dietlibc
-- #endif
--EOF
-- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
-- echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
-+ echo ${UNAME_MACHINE}-pc-linux-${LIBC}
- exit ;;
- ia64:Linux:*:*)
-- echo ${UNAME_MACHINE}-unknown-linux-gnu
-+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
- exit ;;
- m32r*:Linux:*:*)
-- echo ${UNAME_MACHINE}-unknown-linux-gnu
-+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
- exit ;;
- m68*:Linux:*:*)
-- echo ${UNAME_MACHINE}-unknown-linux-gnu
-+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
- exit ;;
- mips:Linux:*:* | mips64:Linux:*:*)
- eval $set_cc_for_build
-@@ -950,54 +967,63 @@ EOF
- #endif
- EOF
- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
-- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
-+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
- ;;
-+ or1k:Linux:*:*)
-+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
-+ exit ;;
- or32:Linux:*:*)
-- echo ${UNAME_MACHINE}-unknown-linux-gnu
-+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
- exit ;;
- padre:Linux:*:*)
-- echo sparc-unknown-linux-gnu
-+ echo sparc-unknown-linux-${LIBC}
- exit ;;
- parisc64:Linux:*:* | hppa64:Linux:*:*)
-- echo hppa64-unknown-linux-gnu
-+ echo hppa64-unknown-linux-${LIBC}
- exit ;;
- parisc:Linux:*:* | hppa:Linux:*:*)
- # Look for CPU level
- case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
-- PA7*) echo hppa1.1-unknown-linux-gnu ;;
-- PA8*) echo hppa2.0-unknown-linux-gnu ;;
-- *) echo hppa-unknown-linux-gnu ;;
-+ PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
-+ PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
-+ *) echo hppa-unknown-linux-${LIBC} ;;
- esac
- exit ;;
- ppc64:Linux:*:*)
-- echo powerpc64-unknown-linux-gnu
-+ echo powerpc64-unknown-linux-${LIBC}
- exit ;;
- ppc:Linux:*:*)
-- echo powerpc-unknown-linux-gnu
-+ echo powerpc-unknown-linux-${LIBC}
-+ exit ;;
-+ ppc64le:Linux:*:*)
-+ echo powerpc64le-unknown-linux-${LIBC}
-+ exit ;;
-+ ppcle:Linux:*:*)
-+ echo powerpcle-unknown-linux-${LIBC}
- exit ;;
- s390:Linux:*:* | s390x:Linux:*:*)
-- echo ${UNAME_MACHINE}-ibm-linux
-+ echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
- exit ;;
- sh64*:Linux:*:*)
-- echo ${UNAME_MACHINE}-unknown-linux-gnu
-+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
- exit ;;
- sh*:Linux:*:*)
-- echo ${UNAME_MACHINE}-unknown-linux-gnu
-+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
- exit ;;
- sparc:Linux:*:* | sparc64:Linux:*:*)
-- echo ${UNAME_MACHINE}-unknown-linux-gnu
-+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
- exit ;;
- tile*:Linux:*:*)
-- echo ${UNAME_MACHINE}-unknown-linux-gnu
-+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
- exit ;;
- vax:Linux:*:*)
-- echo ${UNAME_MACHINE}-dec-linux-gnu
-+ echo ${UNAME_MACHINE}-dec-linux-${LIBC}
- exit ;;
- x86_64:Linux:*:*)
-- echo ${UNAME_MACHINE}-unknown-linux-gnu
-+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
- exit ;;
- xtensa*:Linux:*:*)
-- echo ${UNAME_MACHINE}-unknown-linux-gnu
-+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
- exit ;;
- i*86:DYNIX/ptx:4*:*)
- # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
-@@ -1201,6 +1227,9 @@ EOF
- BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
- echo i586-pc-haiku
- exit ;;
-+ x86_64:Haiku:*:*)
-+ echo x86_64-unknown-haiku
-+ exit ;;
- SX-4:SUPER-UX:*:*)
- echo sx4-nec-superux${UNAME_RELEASE}
- exit ;;
-@@ -1227,19 +1256,21 @@ EOF
- exit ;;
- *:Darwin:*:*)
- UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
-- case $UNAME_PROCESSOR in
-- i386)
-- eval $set_cc_for_build
-- if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
-- if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
-- (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
-- grep IS_64BIT_ARCH >/dev/null
-- then
-- UNAME_PROCESSOR="x86_64"
-- fi
-- fi ;;
-- unknown) UNAME_PROCESSOR=powerpc ;;
-- esac
-+ eval $set_cc_for_build
-+ if test "$UNAME_PROCESSOR" = unknown ; then
-+ UNAME_PROCESSOR=powerpc
-+ fi
-+ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
-+ if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
-+ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
-+ grep IS_64BIT_ARCH >/dev/null
-+ then
-+ case $UNAME_PROCESSOR in
-+ i386) UNAME_PROCESSOR=x86_64 ;;
-+ powerpc) UNAME_PROCESSOR=powerpc64 ;;
-+ esac
-+ fi
-+ fi
- echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
- exit ;;
- *:procnto*:*:* | *:QNX:[0123456789]*:*)
-@@ -1256,7 +1287,7 @@ EOF
- NEO-?:NONSTOP_KERNEL:*:*)
- echo neo-tandem-nsk${UNAME_RELEASE}
- exit ;;
-- NSE-?:NONSTOP_KERNEL:*:*)
-+ NSE-*:NONSTOP_KERNEL:*:*)
- echo nse-tandem-nsk${UNAME_RELEASE}
- exit ;;
- NSR-?:NONSTOP_KERNEL:*:*)
-@@ -1330,9 +1361,6 @@ EOF
- exit ;;
- esac
-
--#echo '(No uname command or uname output not recognized.)' 1>&2
--#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
--
- eval $set_cc_for_build
- cat >$dummy.c <<EOF
- #ifdef _SEQUENT_
-diff --git a/config.sub b/config.sub
-index c894da4..d2a9613 100755
---- a/config.sub
-+++ b/config.sub
-@@ -1,24 +1,18 @@
- #! /bin/sh
- # Configuration validation subroutine script.
--# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
--# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
--# 2011, 2012 Free Software Foundation, Inc.
-+# Copyright 1992-2013 Free Software Foundation, Inc.
-
--timestamp='2012-02-10'
-+timestamp='2013-08-10'
-
--# This file is (in principle) common to ALL GNU software.
--# The presence of a machine in this file suggests that SOME GNU software
--# can handle that machine. It does not imply ALL GNU software can.
--#
--# This file is free software; you can redistribute it and/or modify
--# it under the terms of the GNU General Public License as published by
--# the Free Software Foundation; either version 2 of the License, or
-+# This file is free software; you can redistribute it and/or modify it
-+# under the terms of the GNU General Public License as published by
-+# the Free Software Foundation; either version 3 of the License, or
- # (at your option) any later version.
- #
--# This program is distributed in the hope that it will be useful,
--# but WITHOUT ANY WARRANTY; without even the implied warranty of
--# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
--# GNU General Public License for more details.
-+# This program is distributed in the hope that it will be useful, but
-+# WITHOUT ANY WARRANTY; without even the implied warranty of
-+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+# General Public License for more details.
- #
- # You should have received a copy of the GNU General Public License
- # along with this program; if not, see <http://www.gnu.org/licenses/>.
-@@ -26,11 +20,12 @@ timestamp='2012-02-10'
- # As a special exception to the GNU General Public License, if you
- # distribute this file as part of a program that contains a
- # configuration script generated by Autoconf, you may include it under
--# the same distribution terms that you use for the rest of that program.
-+# the same distribution terms that you use for the rest of that
-+# program. This Exception is an additional permission under section 7
-+# of the GNU General Public License, version 3 ("GPLv3").
-
-
--# Please send patches to <config-patches@gnu.org>. Submit a context
--# diff and a properly formatted GNU ChangeLog entry.
-+# Please send patches with a ChangeLog entry to config-patches@gnu.org.
- #
- # Configuration subroutine to validate and canonicalize a configuration type.
- # Supply the specified configuration type as an argument.
-@@ -73,9 +68,7 @@ Report bugs and patches to <config-patches@gnu.org>."
- version="\
- GNU config.sub ($timestamp)
-
--Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
--2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
--Free Software Foundation, Inc.
-+Copyright 1992-2013 Free Software Foundation, Inc.
-
- This is free software; see the source for copying conditions. There is NO
- warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
-@@ -123,7 +116,7 @@ esac
- maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
- case $maybe_os in
- nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
-- linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
-+ linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
- knetbsd*-gnu* | netbsd*-gnu* | \
- kopensolaris*-gnu* | \
- storm-chaos* | os2-emx* | rtmk-nova*)
-@@ -156,7 +149,7 @@ case $os in
- -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
- -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
- -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
-- -apple | -axis | -knuth | -cray | -microblaze)
-+ -apple | -axis | -knuth | -cray | -microblaze*)
- os=
- basic_machine=$1
- ;;
-@@ -225,6 +218,12 @@ case $os in
- -isc*)
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
-+ -lynx*178)
-+ os=-lynxos178
-+ ;;
-+ -lynx*5)
-+ os=-lynxos5
-+ ;;
- -lynx*)
- os=-lynxos
- ;;
-@@ -253,10 +252,12 @@ case $basic_machine in
- | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
- | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
- | am33_2.0 \
-- | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
-- | be32 | be64 \
-+ | arc | arceb \
-+ | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
-+ | avr | avr32 \
-+ | be32 | be64 \
- | bfin \
-- | c4x | clipper \
-+ | c4x | c8051 | clipper \
- | d10v | d30v | dlx | dsp16xx \
- | epiphany \
- | fido | fr30 | frv \
-@@ -267,7 +268,7 @@ case $basic_machine in
- | le32 | le64 \
- | lm32 \
- | m32c | m32r | m32rle | m68000 | m68k | m88k \
-- | maxq | mb | microblaze | mcore | mep | metag \
-+ | maxq | mb | microblaze | microblazeel | mcore | mep | metag \
- | mips | mipsbe | mipseb | mipsel | mipsle \
- | mips16 \
- | mips64 | mips64el \
-@@ -285,16 +286,17 @@ case $basic_machine in
- | mipsisa64r2 | mipsisa64r2el \
- | mipsisa64sb1 | mipsisa64sb1el \
- | mipsisa64sr71k | mipsisa64sr71kel \
-+ | mipsr5900 | mipsr5900el \
- | mipstx39 | mipstx39el \
- | mn10200 | mn10300 \
- | moxie \
- | mt \
- | msp430 \
- | nds32 | nds32le | nds32be \
-- | nios | nios2 \
-+ | nios | nios2 | nios2eb | nios2el \
- | ns16k | ns32k \
- | open8 \
-- | or32 \
-+ | or1k | or32 \
- | pdp10 | pdp11 | pj | pjl \
- | powerpc | powerpc64 | powerpc64le | powerpcle \
- | pyramid \
-@@ -364,13 +366,13 @@ case $basic_machine in
- | aarch64-* | aarch64_be-* \
- | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
- | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
-- | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
-+ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
- | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
- | avr-* | avr32-* \
- | be32-* | be64-* \
- | bfin-* | bs2000-* \
- | c[123]* | c30-* | [cjt]90-* | c4x-* \
-- | clipper-* | craynv-* | cydra-* \
-+ | c8051-* | clipper-* | craynv-* | cydra-* \
- | d10v-* | d30v-* | dlx-* \
- | elxsi-* \
- | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
-@@ -383,7 +385,8 @@ case $basic_machine in
- | lm32-* \
- | m32c-* | m32r-* | m32rle-* \
- | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
-- | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
-+ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
-+ | microblaze-* | microblazeel-* \
- | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
- | mips16-* \
- | mips64-* | mips64el-* \
-@@ -401,12 +404,13 @@ case $basic_machine in
- | mipsisa64r2-* | mipsisa64r2el-* \
- | mipsisa64sb1-* | mipsisa64sb1el-* \
- | mipsisa64sr71k-* | mipsisa64sr71kel-* \
-+ | mipsr5900-* | mipsr5900el-* \
- | mipstx39-* | mipstx39el-* \
- | mmix-* \
- | mt-* \
- | msp430-* \
- | nds32-* | nds32le-* | nds32be-* \
-- | nios-* | nios2-* \
-+ | nios-* | nios2-* | nios2eb-* | nios2el-* \
- | none-* | np1-* | ns16k-* | ns32k-* \
- | open8-* \
- | orion-* \
-@@ -782,11 +786,15 @@ case $basic_machine in
- basic_machine=ns32k-utek
- os=-sysv
- ;;
-- microblaze)
-+ microblaze*)
- basic_machine=microblaze-xilinx
- ;;
-+ mingw64)
-+ basic_machine=x86_64-pc
-+ os=-mingw64
-+ ;;
- mingw32)
-- basic_machine=i386-pc
-+ basic_machine=i686-pc
- os=-mingw32
- ;;
- mingw32ce)
-@@ -822,7 +830,7 @@ case $basic_machine in
- basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
- ;;
- msys)
-- basic_machine=i386-pc
-+ basic_machine=i686-pc
- os=-msys
- ;;
- mvs)
-@@ -998,7 +1006,7 @@ case $basic_machine in
- ;;
- ppc64) basic_machine=powerpc64-unknown
- ;;
-- ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
-+ ppc64-* | ppc64p7-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- ppc64le | powerpc64little | ppc64-le | powerpc64-little)
- basic_machine=powerpc64le-unknown
-@@ -1013,7 +1021,11 @@ case $basic_machine in
- basic_machine=i586-unknown
- os=-pw32
- ;;
-- rdos)
-+ rdos | rdos64)
-+ basic_machine=x86_64-pc
-+ os=-rdos
-+ ;;
-+ rdos32)
- basic_machine=i386-pc
- os=-rdos
- ;;
-@@ -1340,21 +1352,21 @@ case $os in
- -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
- | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
- | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
-- | -sym* | -kopensolaris* \
-+ | -sym* | -kopensolaris* | -plan9* \
- | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
- | -aos* | -aros* \
- | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
- | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
- | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
-- | -openbsd* | -solidbsd* \
-+ | -bitrig* | -openbsd* | -solidbsd* \
- | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
- | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
- | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
- | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
- | -chorusos* | -chorusrdb* | -cegcc* \
- | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
-- | -mingw32* | -linux-gnu* | -linux-android* \
-- | -linux-newlib* | -linux-uclibc* \
-+ | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
-+ | -linux-newlib* | -linux-musl* | -linux-uclibc* \
- | -uxpv* | -beos* | -mpeix* | -udk* \
- | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
- | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
-@@ -1486,9 +1498,6 @@ case $os in
- -aros*)
- os=-aros
- ;;
-- -kaos*)
-- os=-kaos
-- ;;
- -zvmoe)
- os=-zvmoe
- ;;
-@@ -1537,6 +1546,12 @@ case $basic_machine in
- c4x-* | tic4x-*)
- os=-coff
- ;;
-+ c8051-*)
-+ os=-elf
-+ ;;
-+ hexagon-*)
-+ os=-elf
-+ ;;
- tic54x-*)
- os=-coff
- ;;
-@@ -1577,6 +1592,9 @@ case $basic_machine in
- mips*-*)
- os=-elf
- ;;
-+ or1k-*)
-+ os=-elf
-+ ;;
- or32-*)
- os=-coff
- ;;
---
-2.6.2
-