[xmlsec] implementing c14n 1.1 transform + tests
- From: Aleksey Sanin <aleksey src gnome org>
- To: svn-commits-list gnome org
- Subject: [xmlsec] implementing c14n 1.1 transform + tests
- Date: Fri, 26 Jun 2009 05:03:54 +0000 (UTC)
commit ceb9eb27bb687df81e543e64993405a4f7ff171c
Author: Aleksey Sanin <aleksey aleksey com>
Date: Thu Jun 25 22:03:31 2009 -0700
implementing c14n 1.1 transform + tests
configure.in | 2 +-
include/xmlsec/strings.h | 6 +
include/xmlsec/transforms.h | 18 +++
src/c14n.c | 137 +++++++++++++++++++++-
src/strings.c | 7 +
src/transforms.c | 18 +++
tests/testDSig.sh | 101 ++++++++++++++++
tests/xmldsig2ed-tests/c14n11/xml-base-input.xml | 17 +++
tests/xmldsig2ed-tests/defCan-1.tmpl | 2 +
tests/xmldsig2ed-tests/defCan-1.xml | 2 +
tests/xmldsig2ed-tests/defCan-2.tmpl | 2 +
tests/xmldsig2ed-tests/defCan-2.xml | 2 +
tests/xmldsig2ed-tests/defCan-3.tmpl | 2 +
tests/xmldsig2ed-tests/defCan-3.xml | 2 +
tests/xmldsig2ed-tests/xpointer-1-SUN.xml | 21 ++++
tests/xmldsig2ed-tests/xpointer-2-SUN.xml | 21 ++++
tests/xmldsig2ed-tests/xpointer-3-SUN.xml | 21 ++++
tests/xmldsig2ed-tests/xpointer-4-SUN.xml | 21 ++++
tests/xmldsig2ed-tests/xpointer-5-SUN.xml | 21 ++++
tests/xmldsig2ed-tests/xpointer-6-SUN.xml | 21 ++++
20 files changed, 439 insertions(+), 5 deletions(-)
---
diff --git a/configure.in b/configure.in
index cc167b1..0195310 100644
--- a/configure.in
+++ b/configure.in
@@ -182,7 +182,7 @@ fi
dnl ==========================================================================
dnl find libxml
dnl ==========================================================================
-LIBXML_MIN_VERSION="2.6.12"
+LIBXML_MIN_VERSION="2.7.4"
LIBXML_CONFIG="xml2-config"
LIBXML_CFLAGS=""
LIBXML_LIBS=""
diff --git a/include/xmlsec/strings.h b/include/xmlsec/strings.h
index 50f8c20..07afb9d 100644
--- a/include/xmlsec/strings.h
+++ b/include/xmlsec/strings.h
@@ -263,6 +263,12 @@ XMLSEC_EXPORT_VAR const xmlChar xmlSecHrefC14N[];
XMLSEC_EXPORT_VAR const xmlChar xmlSecNameC14NWithComments[];
XMLSEC_EXPORT_VAR const xmlChar xmlSecHrefC14NWithComments[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNameC14N11[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecHrefC14N11[];
+
+XMLSEC_EXPORT_VAR const xmlChar xmlSecNameC14N11WithComments[];
+XMLSEC_EXPORT_VAR const xmlChar xmlSecHrefC14N11WithComments[];
+
XMLSEC_EXPORT_VAR const xmlChar xmlSecNameExcC14N[];
XMLSEC_EXPORT_VAR const xmlChar xmlSecHrefExcC14N[];
diff --git a/include/xmlsec/transforms.h b/include/xmlsec/transforms.h
index 599949b..6128e6e 100644
--- a/include/xmlsec/transforms.h
+++ b/include/xmlsec/transforms.h
@@ -887,6 +887,24 @@ XMLSEC_EXPORT xmlSecTransformId xmlSecTransformInclC14NGetKlass (void);
XMLSEC_EXPORT xmlSecTransformId xmlSecTransformInclC14NWithCommentsGetKlass(void);
/**
+ * xmlSecTransformInclC14N11Id:
+ *
+ * The regular (inclusive) C14N 1.1 without comments transform klass.
+ */
+#define xmlSecTransformInclC14N11Id \
+ xmlSecTransformInclC14N11GetKlass()
+XMLSEC_EXPORT xmlSecTransformId xmlSecTransformInclC14N11GetKlass (void);
+
+/**
+ * xmlSecTransformInclC14N11WithCommentsId:
+ *
+ * The regular (inclusive) C14N 1.1 with comments transform klass.
+ */
+#define xmlSecTransformInclC14N11WithCommentsId \
+ xmlSecTransformInclC14N11WithCommentsGetKlass()
+XMLSEC_EXPORT xmlSecTransformId xmlSecTransformInclC14N11WithCommentsGetKlass(void);
+
+/**
* xmlSecTransformExclC14NId
*
* The exclusive C14N without comments transform klass.
diff --git a/src/c14n.c b/src/c14n.c
index 09065d5..e52cfae 100644
--- a/src/c14n.c
+++ b/src/c14n.c
@@ -41,11 +41,15 @@
#define xmlSecTransformC14NCheckId(transform) \
(xmlSecTransformInclC14NCheckId((transform)) || \
+ xmlSecTransformInclC14N11CheckId((transform)) || \
xmlSecTransformExclC14NCheckId((transform)) || \
xmlSecTransformCheckId((transform), xmlSecTransformRemoveXmlTagsC14NId))
#define xmlSecTransformInclC14NCheckId(transform) \
(xmlSecTransformCheckId((transform), xmlSecTransformInclC14NId) || \
xmlSecTransformCheckId((transform), xmlSecTransformInclC14NWithCommentsId))
+#define xmlSecTransformInclC14N11CheckId(transform) \
+ (xmlSecTransformCheckId((transform), xmlSecTransformInclC14N11Id) || \
+ xmlSecTransformCheckId((transform), xmlSecTransformInclC14N11WithCommentsId))
#define xmlSecTransformExclC14NCheckId(transform) \
(xmlSecTransformCheckId((transform), xmlSecTransformExclC14NId) || \
xmlSecTransformCheckId((transform), xmlSecTransformExclC14NWithCommentsId) )
@@ -416,19 +420,27 @@ xmlSecTransformC14NExecute(xmlSecTransformId id, xmlSecNodeSetPtr nodes, xmlChar
if(id == xmlSecTransformInclC14NId) {
ret = xmlC14NExecute(nodes->doc,
(xmlC14NIsVisibleCallback)xmlSecNodeSetContains,
- nodes, 0, NULL, 0, buf);
+ nodes, XML_C14N_1_0, NULL, 0, buf);
} else if(id == xmlSecTransformInclC14NWithCommentsId) {
ret = xmlC14NExecute(nodes->doc,
(xmlC14NIsVisibleCallback)xmlSecNodeSetContains,
- nodes, 0, NULL, 1, buf);
+ nodes, XML_C14N_1_0, NULL, 1, buf);
+ } else if(id == xmlSecTransformInclC14N11Id) {
+ ret = xmlC14NExecute(nodes->doc,
+ (xmlC14NIsVisibleCallback)xmlSecNodeSetContains,
+ nodes, XML_C14N_1_1, NULL, 0, buf);
+ } else if(id == xmlSecTransformInclC14N11WithCommentsId) {
+ ret = xmlC14NExecute(nodes->doc,
+ (xmlC14NIsVisibleCallback)xmlSecNodeSetContains,
+ nodes, XML_C14N_1_1, NULL, 1, buf);
} else if(id == xmlSecTransformExclC14NId) {
ret = xmlC14NExecute(nodes->doc,
(xmlC14NIsVisibleCallback)xmlSecNodeSetContains,
- nodes, 1, nsList, 0, buf);
+ nodes, XML_C14N_EXCLUSIVE_1_0, nsList, 0, buf);
} else if(id == xmlSecTransformExclC14NWithCommentsId) {
ret = xmlC14NExecute(nodes->doc,
(xmlC14NIsVisibleCallback)xmlSecNodeSetContains,
- nodes, 1, nsList, 1, buf);
+ nodes, XML_C14N_EXCLUSIVE_1_0, nsList, 1, buf);
} else if(id == xmlSecTransformRemoveXmlTagsC14NId) {
ret = xmlSecNodeSetDumpTextNodes(nodes, buf);
} else {
@@ -453,6 +465,11 @@ xmlSecTransformC14NExecute(xmlSecTransformId id, xmlSecNodeSetPtr nodes, xmlChar
return(0);
}
+/***************************************************************************
+ *
+ * C14N
+ *
+ ***************************************************************************/
static xmlSecTransformKlass xmlSecTransformInclC14NKlass = {
/* klass/object sizes */
sizeof(xmlSecTransformKlass), /* xmlSecSize klassSize */
@@ -495,6 +512,11 @@ xmlSecTransformInclC14NGetKlass(void) {
return(&xmlSecTransformInclC14NKlass);
}
+/***************************************************************************
+ *
+ * C14N With Comments
+ *
+ ***************************************************************************/
static xmlSecTransformKlass xmlSecTransformInclC14NWithCommentsKlass = {
/* klass/object sizes */
sizeof(xmlSecTransformKlass), /* xmlSecSize klassSize */
@@ -538,6 +560,103 @@ xmlSecTransformInclC14NWithCommentsGetKlass(void) {
return(&xmlSecTransformInclC14NWithCommentsKlass);
}
+/***************************************************************************
+ *
+ * C14N v1.1
+ *
+ ***************************************************************************/
+static xmlSecTransformKlass xmlSecTransformInclC14N11Klass = {
+ /* klass/object sizes */
+ sizeof(xmlSecTransformKlass), /* xmlSecSize klassSize */
+ xmlSecTransformC14NSize, /* xmlSecSize objSize */
+
+ xmlSecNameC14N11, /* const xmlChar* name; */
+ xmlSecHrefC14N11, /* const xmlChar* href; */
+ xmlSecTransformUsageC14NMethod | xmlSecTransformUsageDSigTransform,
+ /* xmlSecAlgorithmUsage usage; */
+
+ xmlSecTransformC14NInitialize, /* xmlSecTransformInitializeMethod initialize; */
+ xmlSecTransformC14NFinalize, /* xmlSecTransformFinalizeMethod finalize; */
+ NULL, /* xmlSecTransformNodeReadMethod readNode; */
+ NULL, /* xmlSecTransformNodeWriteMethod writeNode; */
+ NULL, /* xmlSecTransformSetKeyReqMethod setKeyReq; */
+ NULL, /* xmlSecTransformSetKeyMethod setKey; */
+ NULL, /* xmlSecTransformValidateMethod validate; */
+ xmlSecTransformDefaultGetDataType, /* xmlSecTransformGetDataTypeMethod getDataType; */
+ NULL, /* xmlSecTransformPushBinMethod pushBin; */
+ xmlSecTransformC14NPopBin, /* xmlSecTransformPopBinMethod popBin; */
+ xmlSecTransformC14NPushXml, /* xmlSecTransformPushXmlMethod pushXml; */
+ NULL, /* xmlSecTransformPopXmlMethod popXml; */
+ NULL, /* xmlSecTransformExecuteMethod execute; */
+
+ NULL, /* void* reserved0; */
+ NULL, /* void* reserved1; */
+};
+
+/**
+ * xmlSecTransformInclC14N11GetKlass:
+ *
+ * C14N version 1.1 (http://www.w3.org/TR/xml-c14n11)
+ *
+ * Returns c14n v1.1 transform id.
+ */
+xmlSecTransformId
+xmlSecTransformInclC14N11GetKlass(void) {
+ return(&xmlSecTransformInclC14N11Klass);
+}
+
+/***************************************************************************
+ *
+ * C14N v1.1 With Comments
+ *
+ ***************************************************************************/
+static xmlSecTransformKlass xmlSecTransformInclC14N11WithCommentsKlass = {
+ /* klass/object sizes */
+ sizeof(xmlSecTransformKlass), /* xmlSecSize klassSize */
+ xmlSecTransformC14NSize, /* xmlSecSize objSize */
+
+ /* same as xmlSecTransformId */
+ xmlSecNameC14N11WithComments, /* const xmlChar* name; */
+ xmlSecHrefC14N11WithComments, /* const xmlChar* href; */
+ xmlSecTransformUsageC14NMethod | xmlSecTransformUsageDSigTransform,
+ /* xmlSecAlgorithmUsage usage; */
+
+ xmlSecTransformC14NInitialize, /* xmlSecTransformInitializeMethod initialize; */
+ xmlSecTransformC14NFinalize, /* xmlSecTransformFinalizeMethod finalize; */
+ NULL, /* xmlSecTransformNodeReadMethod read; */
+ NULL, /* xmlSecTransformNodeWriteMethod writeNode; */
+ NULL, /* xmlSecTransformSetKeyReqMethod setKeyReq; */
+ NULL, /* xmlSecTransformSetKeyMethod setKey; */
+ NULL, /* xmlSecTransformValidateMethod validate; */
+ xmlSecTransformDefaultGetDataType, /* xmlSecTransformGetDataTypeMethod getDataType; */
+ NULL, /* xmlSecTransformPushBinMethod pushBin; */
+ xmlSecTransformC14NPopBin, /* xmlSecTransformPopBinMethod popBin; */
+ xmlSecTransformC14NPushXml, /* xmlSecTransformPushXmlMethod pushXml; */
+ NULL, /* xmlSecTransformPopXmlMethod popXml; */
+ NULL, /* xmlSecTransformExecuteMethod execute; */
+
+ NULL, /* void* reserved0; */
+ NULL, /* void* reserved1; */
+};
+
+/**
+ * xmlSecTransformInclC14N11WithCommentsGetKlass:
+ *
+ * C14N version 1.1 (http://www.w3.org/TR/xml-c14n11) with comments
+ *
+ * Returns c14n v1.1 with comments transform id.
+ */
+xmlSecTransformId
+xmlSecTransformInclC14N11WithCommentsGetKlass(void) {
+ return(&xmlSecTransformInclC14N11WithCommentsKlass);
+}
+
+
+/***************************************************************************
+ *
+ * Excl C14N
+ *
+ ***************************************************************************/
static xmlSecTransformKlass xmlSecTransformExclC14NKlass = {
/* klass/object sizes */
sizeof(xmlSecTransformKlass), /* xmlSecSize klassSize */
@@ -579,6 +698,11 @@ xmlSecTransformExclC14NGetKlass(void) {
return(&xmlSecTransformExclC14NKlass);
}
+/***************************************************************************
+ *
+ * Excl C14N With Comments
+ *
+ ***************************************************************************/
static xmlSecTransformKlass xmlSecTransformExclC14NWithCommentsKlass = {
/* klass/object sizes */
sizeof(xmlSecTransformKlass), /* xmlSecSize klassSize */
@@ -620,6 +744,11 @@ xmlSecTransformExclC14NWithCommentsGetKlass(void) {
return(&xmlSecTransformExclC14NWithCommentsKlass);
}
+/***************************************************************************
+ *
+ * Remove XML tags C14N
+ *
+ ***************************************************************************/
static xmlSecTransformKlass xmlSecTransformRemoveXmlTagsC14NKlass = {
/* klass/object sizes */
sizeof(xmlSecTransformKlass), /* xmlSecSize klassSize */
diff --git a/src/strings.c b/src/strings.c
index c849d8b..9897198 100644
--- a/src/strings.c
+++ b/src/strings.c
@@ -257,6 +257,12 @@ const xmlChar xmlSecHrefC14N[] = "http://www.w3.org/TR/2001/REC-xml-c14n-20010
const xmlChar xmlSecNameC14NWithComments[] = "c14n-with-comments";
const xmlChar xmlSecHrefC14NWithComments[] = "http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments";
+const xmlChar xmlSecNameC14N11[] = "c14n11";
+const xmlChar xmlSecHrefC14N11[] = "http://www.w3.org/2006/12/xml-c14n11";
+
+const xmlChar xmlSecNameC14N11WithComments[] = "c14n11-with-comments";
+const xmlChar xmlSecHrefC14N11WithComments[] = "http://www.w3.org/2006/12/xml-c14n11#WithComments";
+
const xmlChar xmlSecNameExcC14N[] = "exc-c14n";
const xmlChar xmlSecHrefExcC14N[] = "http://www.w3.org/2001/10/xml-exc-c14n#";
@@ -268,6 +274,7 @@ const xmlChar xmlSecNsExcC14NWithComments[] = "http://www.w3.org/2001/10/xml-exc
const xmlChar xmlSecNodeInclusiveNamespaces[] = "InclusiveNamespaces";
const xmlChar xmlSecAttrPrefixList[] = "PrefixList";
+
/*************************************************************************
*
* DES strings
diff --git a/src/transforms.c b/src/transforms.c
index 3933f6c..797d0e0 100644
--- a/src/transforms.c
+++ b/src/transforms.c
@@ -204,6 +204,24 @@ xmlSecTransformIdsRegisterDefault(void) {
xmlSecErrorsSafeString(xmlSecTransformKlassGetName(xmlSecTransformInclC14NWithCommentsId)));
return(-1);
}
+ if(xmlSecTransformIdsRegister(xmlSecTransformInclC14N11Id) < 0) {
+ xmlSecError(XMLSEC_ERRORS_HERE,
+ NULL,
+ "xmlSecTransformIdsRegister",
+ XMLSEC_ERRORS_R_XMLSEC_FAILED,
+ "name=%s",
+ xmlSecErrorsSafeString(xmlSecTransformKlassGetName(xmlSecTransformInclC14N11Id)));
+ return(-1);
+ }
+ if(xmlSecTransformIdsRegister(xmlSecTransformInclC14N11WithCommentsId) < 0) {
+ xmlSecError(XMLSEC_ERRORS_HERE,
+ NULL,
+ "xmlSecTransformIdsRegister",
+ XMLSEC_ERRORS_R_XMLSEC_FAILED,
+ "name=%s",
+ xmlSecErrorsSafeString(xmlSecTransformKlassGetName(xmlSecTransformInclC14N11WithCommentsId)));
+ return(-1);
+ }
if(xmlSecTransformIdsRegister(xmlSecTransformExclC14NId) < 0) {
xmlSecError(XMLSEC_ERRORS_HERE,
NULL,
diff --git a/tests/testDSig.sh b/tests/testDSig.sh
index 5f96e09..1f86f8e 100755
--- a/tests/testDSig.sh
+++ b/tests/testDSig.sh
@@ -130,6 +130,65 @@ echo "--- log file is $logfile"
echo "--- testDSig started for xmlsec-$crypto library ($timestamp)" >> $logfile
echo "--- LD_LIBRARY_PATH=$LD_LIBRARY_PATH" >> $logfile
+##########################################################################
+#
+# xmldsig2ed-tests
+#
+# http://www.w3.org/TR/xmldsig2ed-tests/
+#
+##########################################################################
+
+execDSigTest "xmldsig2ed-tests" "defCan-1" \
+ "c14n11 sha1 hmac-sha1" \
+ "--hmackey $topfolder/keys/hmackey.bin" \
+ "--hmackey $topfolder/keys/hmackey.bin" \
+ "--hmackey $topfolder/keys/hmackey.bin"
+
+execDSigTest "xmldsig2ed-tests" "defCan-2" \
+ "c14n11 xslt xpath sha1 hmac-sha1" \
+ "--hmackey $topfolder/keys/hmackey.bin" \
+ "--hmackey $topfolder/keys/hmackey.bin" \
+ "--hmackey $topfolder/keys/hmackey.bin"
+
+#
+# differences in XSLT transform output, tbd
+#
+# execDSigTest "xmldsig2ed-tests" "defCan-3" \
+# "c14n11 xslt xpath sha1 hmac-sha1" \
+# "--hmackey $topfolder/keys/hmackey.bin" \
+# "--hmackey $topfolder/keys/hmackey.bin" \
+# "--hmackey $topfolder/keys/hmackey.bin"
+#
+
+execDSigTest "xmldsig2ed-tests" "xpointer-1-SUN" \
+ "c14n11 xpointer sha1 hmac-sha1" \
+ "--hmackey $topfolder/keys/hmackey.bin"
+
+execDSigTest "xmldsig2ed-tests" "xpointer-2-SUN" \
+ "c14n11 xpointer sha1 hmac-sha1" \
+ "--hmackey $topfolder/keys/hmackey.bin"
+
+execDSigTest "xmldsig2ed-tests" "xpointer-3-SUN" \
+ "c14n11 xpointer sha1 hmac-sha1" \
+ "--hmackey $topfolder/keys/hmackey.bin"
+
+execDSigTest "xmldsig2ed-tests" "xpointer-4-SUN" \
+ "c14n11 xpointer sha1 hmac-sha1" \
+ "--hmackey $topfolder/keys/hmackey.bin"
+
+execDSigTest "xmldsig2ed-tests" "xpointer-5-SUN" \
+ "c14n11 xpointer sha1 hmac-sha1" \
+ "--hmackey $topfolder/keys/hmackey.bin"
+
+execDSigTest "xmldsig2ed-tests" "xpointer-6-SUN" \
+ "c14n11 xpointer sha1 hmac-sha1" \
+ "--hmackey $topfolder/keys/hmackey.bin"
+
+##########################################################################
+#
+# aleksey-xmldsig-01
+#
+##########################################################################
execDSigTest "" "aleksey-xmldsig-01/enveloping-dsa-x509chain" \
"sha1 dsa-sha1" \
@@ -302,6 +361,12 @@ execDSigTest "" "aleksey-xmldsig-01/x509data-sn-test" \
"$priv_key_option tests/keys/rsakey.$priv_key_format --pwd secret" \
"--trusted-$cert_format $topfolder/keys/cacert.$cert_format --untrusted-$cert_format $topfolder/keys/ca2cert.$cert_format --untrusted-$cert_format $topfolder/keys/rsacert.$cert_format --enabled-key-data x509"
+##########################################################################
+#
+# merlin-xmldsig-twenty-three
+#
+##########################################################################
+
execDSigTest "" "merlin-xmldsig-twenty-three/signature-enveloped-dsa" \
"enveloped-signature sha1 dsa-sha1" \
" " \
@@ -392,17 +457,26 @@ execDSigTest "" "merlin-xmldsig-twenty-three/signature" \
"$priv_key_option $topfolder/keys/dsakey.$priv_key_format --pwd secret" \
"--trusted-$cert_format $topfolder/keys/cacert.$cert_format --untrusted-$cert_format $topfolder/keys/ca2cert.$cert_format"
+##########################################################################
+#
+# merlin-xmlenc-five
+#
+##########################################################################
+
execDSigTest "" "merlin-xmlenc-five/encsig-ripemd160-hmac-ripemd160-kw-tripledes" \
"ripemd160 hmac-ripemd160 kw-tripledes" \
"--keys-file $topfolder/merlin-xmlenc-five/keys.xml" \
"--session-key hmac-192 --keys-file $topfolder/merlin-xmlenc-five/keys.xml" \
"--keys-file $topfolder/merlin-xmlenc-five/keys.xml"
+
execDSigTest "" "merlin-xmlenc-five/encsig-sha256-hmac-sha256-kw-aes128" \
"sha256 hmac-sha256 kw-aes128" \
"--keys-file $topfolder/merlin-xmlenc-five/keys.xml"
+
execDSigTest "" "merlin-xmlenc-five/encsig-sha384-hmac-sha384-kw-aes192" \
"sha384 hmac-sha384 kw-aes192" \
"--keys-file $topfolder/merlin-xmlenc-five/keys.xml"
+
execDSigTest "" "merlin-xmlenc-five/encsig-sha512-hmac-sha512-kw-aes256" \
"sha512 hmac-sha512 kw-aes256" \
"--keys-file $topfolder/merlin-xmlenc-five/keys.xml"
@@ -410,6 +484,11 @@ execDSigTest "" "merlin-xmlenc-five/encsig-sha512-hmac-sha512-kw-aes256" \
#merlin-xmlenc-five/encsig-hmac-sha256-rsa-1_5.xml
#merlin-xmlenc-five/encsig-hmac-sha256-rsa-oaep-mgf1p.xml
+##########################################################################
+#
+# merlin-exc-c14n-one
+#
+##########################################################################
execDSigTest "" "merlin-exc-c14n-one/exc-signature" \
"exc-c14n sha1 dsa-sha1" \
@@ -420,11 +499,23 @@ execDSigTest "" "merlin-exc-c14n-one/exc-signature" \
execDSigTest "" "merlin-exc-c14n-one/exc-signature" \
"exc-c14n sha1 dsa-sha1" \
" "
+
+##########################################################################
+#
+# merlin-c14n-three
+#
+##########################################################################
execDSigTest "" "merlin-c14n-three/signature" \
"c14n c14n-with-comments exc-c14n exc-c14n-with-comments xpath sha1 dsa-sha1" \
" "
+##########################################################################
+#
+# merlin-xpath-filter2-three
+#
+##########################################################################
+
execDSigTest "" "merlin-xpath-filter2-three/sign-xfdl" \
"enveloped-signature xpath2 sha1 dsa-sha1" \
""
@@ -432,6 +523,11 @@ execDSigTest "" "merlin-xpath-filter2-three/sign-xfdl" \
execDSigTest "" "merlin-xpath-filter2-three/sign-spec" \
"enveloped-signature xpath2 sha1 dsa-sha1" \
""
+##########################################################################
+#
+# phaos-xmldsig-three
+#
+##########################################################################
execDSigTest "phaos-xmldsig-three" "signature-big" \
"base64 xslt xpath sha1 rsa-sha1" \
@@ -530,7 +626,12 @@ execDSigTest "phaos-xmldsig-three" "signature-rsa-xpath-transform-enveloped" \
"--trusted-$cert_format certs/rsa-ca-cert.$cert_format"
+##########################################################################
+#
# test dynamic signature
+#
+##########################################################################
+
echo "Dynamic signature template"
printf " Create new signature "
echo "$xmlsec_app sign-tmpl $xmlsec_params --keys-file $keysfile --output $tmpfile" >> $logfile
diff --git a/tests/xmldsig2ed-tests/c14n11/xml-base-input.xml b/tests/xmldsig2ed-tests/c14n11/xml-base-input.xml
new file mode 100644
index 0000000..68adb24
--- /dev/null
+++ b/tests/xmldsig2ed-tests/c14n11/xml-base-input.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ietf:c14n11XmlBaseDoc1 xmlns:ietf="http://www.ietf.org" xmlns:w3c="http://www.w3.org" xml:base="http://xmlbase.example.org/xmlbase0/">
+ <ietf:e1 xml:base="/xmlbase1/">
+ <ietf:e11 xml:base="/xmlbase11/">
+ <ietf:e111 xml:base="/xmlbase111/"/>
+ </ietf:e11>
+ <ietf:e12 at="2">
+ <ietf:e121 xml:base="/xmlbase121/"/>
+ </ietf:e12>
+ </ietf:e1>
+ <ietf:e2>
+ <ietf:e21 xml:base="/xmlbase21/"/>
+ </ietf:e2>
+ <ietf:e3>
+ <ietf:e31 at="3"/>
+ </ietf:e3>
+</ietf:c14n11XmlBaseDoc1>
diff --git a/tests/xmldsig2ed-tests/defCan-1.tmpl b/tests/xmldsig2ed-tests/defCan-1.tmpl
new file mode 100644
index 0000000..a825ea8
--- /dev/null
+++ b/tests/xmldsig2ed-tests/defCan-1.tmpl
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Signature xmlns="http://www.w3.org/2000/09/xmldsig#"><SignedInfo><CanonicalizationMethod Algorithm="http://www.w3.org/2006/12/xml-c14n11"/><SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#hmac-sha1"/><Reference URI="c14n11/xml-base-input.xml"><Transforms><Transform Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116"><XPath xmlns:ietf="http://www.ietf.org">ancestor-or-self::ietf:c14n11XmlBaseDoc1 and not(ancestor-or-self::ietf:e2)</XPath></Transform></Transforms><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue></DigestValue></Reference></SignedInfo><SignatureValue></SignatureValue></Signature>
\ No newline at end of file
diff --git a/tests/xmldsig2ed-tests/defCan-1.xml b/tests/xmldsig2ed-tests/defCan-1.xml
new file mode 100644
index 0000000..2bf98ae
--- /dev/null
+++ b/tests/xmldsig2ed-tests/defCan-1.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Signature xmlns="http://www.w3.org/2000/09/xmldsig#"><SignedInfo><CanonicalizationMethod Algorithm="http://www.w3.org/2006/12/xml-c14n11"/><SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#hmac-sha1"/><Reference URI="c14n11/xml-base-input.xml"><Transforms><Transform Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116"><XPath xmlns:ietf="http://www.ietf.org">ancestor-or-self::ietf:c14n11XmlBaseDoc1 and not(ancestor-or-self::ietf:e2)</XPath></Transform><Transform Algorithm="http://www.w3.org/2006/12/xml-c14n11"/></Transforms><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>t7d2cL8Ink8A5i3cS9/bu9MBBU8=</DigestValue></Reference></SignedInfo><SignatureValue>LR4s+Nxoq3VZO1NiCLoiovfCpK4=</SignatureValue></Signature>
\ No newline at end of file
diff --git a/tests/xmldsig2ed-tests/defCan-2.tmpl b/tests/xmldsig2ed-tests/defCan-2.tmpl
new file mode 100644
index 0000000..dedf739
--- /dev/null
+++ b/tests/xmldsig2ed-tests/defCan-2.tmpl
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Signature xmlns="http://www.w3.org/2000/09/xmldsig#"><SignedInfo><CanonicalizationMethod Algorithm="http://www.w3.org/2006/12/xml-c14n11"/><SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#hmac-sha1"/><Reference URI="c14n11/xml-base-input.xml"><Transforms><Transform Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116"><XPath xmlns:ietf="http://www.ietf.org">ancestor-or-self::ietf:e21</XPath></Transform><Transform Algorithm="http://www.w3.org/TR/1999/REC-xslt-19991116"><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"><xsl:template match="@*|node()"><xsl:copy><xsl:apply-templates select="@*|node()"/></xsl:copy></xsl:template></xsl:stylesheet></Transform><Transform Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116"><XPath xmlns:ietf="http://www.ietf.org">1</XPath></Transform></Transforms><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue></DigestValue></Reference></SignedInfo><SignatureValue></Sign
atureValue></Signature>
\ No newline at end of file
diff --git a/tests/xmldsig2ed-tests/defCan-2.xml b/tests/xmldsig2ed-tests/defCan-2.xml
new file mode 100644
index 0000000..21a1d34
--- /dev/null
+++ b/tests/xmldsig2ed-tests/defCan-2.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Signature xmlns="http://www.w3.org/2000/09/xmldsig#"><SignedInfo><CanonicalizationMethod Algorithm="http://www.w3.org/2006/12/xml-c14n11"/><SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#hmac-sha1"/><Reference URI="c14n11/xml-base-input.xml"><Transforms><Transform Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116"><XPath xmlns:ietf="http://www.ietf.org">ancestor-or-self::ietf:e21</XPath></Transform><Transform Algorithm="http://www.w3.org/2006/12/xml-c14n11"/><Transform Algorithm="http://www.w3.org/TR/1999/REC-xslt-19991116"><xsl:stylesheet version="1.0" xmlns="http://www.w3.org/1999/XSL/Transform" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xsl:template match="@*|node()"><xsl:copy><xsl:apply-templates select="@*|node()"/></xsl:copy></xsl:template></xsl:stylesheet></Transform><Transform Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116"><XPath xmlns:ietf="http://www.ietf.org">1</XPath></Transform><Transform Algorithm="http://www.w3.org/2006/12
/xml-c14n11"/></Transforms><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>fL7Igzs0LL7lKHJzAJIKYCphYBo=</DigestValue></Reference></SignedInfo><SignatureValue>bKQLywY51VZwjutUX/CUMsVs6RE=</SignatureValue></Signature>
\ No newline at end of file
diff --git a/tests/xmldsig2ed-tests/defCan-3.tmpl b/tests/xmldsig2ed-tests/defCan-3.tmpl
new file mode 100644
index 0000000..2a0e819
--- /dev/null
+++ b/tests/xmldsig2ed-tests/defCan-3.tmpl
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Signature xmlns="http://www.w3.org/2000/09/xmldsig#"><SignedInfo><CanonicalizationMethod Algorithm="http://www.w3.org/2006/12/xml-c14n11"/><SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#hmac-sha1"/><Reference URI="c14n11/xml-base-input.xml"><Transforms><Transform Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116"><XPath xmlns:ietf="http://www.ietf.org">ancestor-or-self::ietf:e3</XPath></Transform><Transform Algorithm="http://www.w3.org/TR/1999/REC-xslt-19991116"><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"><xsl:template match="@*|node()"><xsl:copy><xsl:apply-templates select="@*|node()"/></xsl:copy></xsl:template></xsl:stylesheet></Transform><Transform Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116"><XPath xmlns:ietf="http://www.ietf.org">1</XPath></Transform><Transform Algorithm="http://www.w3.org/TR/1999/REC-xslt-19991116"><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"><xsl:tem
plate match="@*|node()"><xsl:copy><xsl:apply-templates select="@*|node()"/></xsl:copy></xsl:template></xsl:stylesheet></Transform></Transforms><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue></DigestValue></Reference></SignedInfo><SignatureValue></SignatureValue></Signature>
\ No newline at end of file
diff --git a/tests/xmldsig2ed-tests/defCan-3.xml b/tests/xmldsig2ed-tests/defCan-3.xml
new file mode 100644
index 0000000..73b1b83
--- /dev/null
+++ b/tests/xmldsig2ed-tests/defCan-3.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Signature xmlns="http://www.w3.org/2000/09/xmldsig#"><SignedInfo><CanonicalizationMethod Algorithm="http://www.w3.org/2006/12/xml-c14n11"/><SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#hmac-sha1"/><Reference URI="c14n11/xml-base-input.xml"><Transforms><Transform Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116"><XPath xmlns:ietf="http://www.ietf.org">ancestor-or-self::ietf:e21</XPath></Transform><Transform Algorithm="http://www.w3.org/2006/12/xml-c14n11"/><Transform Algorithm="http://www.w3.org/TR/1999/REC-xslt-19991116"><xsl:stylesheet version="1.0" xmlns="http://www.w3.org/1999/XSL/Transform" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xsl:template match="@*|node()"><xsl:copy><xsl:apply-templates select="@*|node()"/></xsl:copy></xsl:template></xsl:stylesheet></Transform><Transform Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116"><XPath xmlns:ietf="http://www.ietf.org">1</XPath></Transform><Transform Algorithm="http://www.w3.org/2006/12
/xml-c14n11"/><Transform Algorithm="http://www.w3.org/TR/1999/REC-xslt-19991116"><xsl:stylesheet version="1.0" xmlns="http://www.w3.org/1999/XSL/Transform" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xsl:template match="@*|node()"><xsl:copy><xsl:apply-templates select="@*|node()"/></xsl:copy></xsl:template></xsl:stylesheet></Transform></Transforms><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>hqabUu4fEZp7GK5JRyFC26W5JBk=</DigestValue></Reference></SignedInfo><SignatureValue>9+wp0W9xwL5X3kSttxABZ7p/kU0=</SignatureValue></Signature>
\ No newline at end of file
diff --git a/tests/xmldsig2ed-tests/xpointer-1-SUN.xml b/tests/xmldsig2ed-tests/xpointer-1-SUN.xml
new file mode 100644
index 0000000..2b07faa
--- /dev/null
+++ b/tests/xmldsig2ed-tests/xpointer-1-SUN.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?><ietf:c14n11XmlPointerDoc1 xmlns:ietf="http://www.ietf.org" xmlns:w3c="http://www.w3.org">
+ <!-- This is a xml document for checking behaviour of tools with regards to comments when using scheme-based xpointers in the ds:Reference's URI attribute -->
+ <ietf:e1 xml:id="e1ID">
+ <!-- This is a comment for ietf:e1 element -->
+ <ietf:e11>
+ <!-- This is a comment for ietf:e11 element -->
+ <ietf:e111/>
+ </ietf:e11>
+ <ietf:e12 at="2">
+ <!-- This is a comment for ietf:e12 element -->
+ <ietf:e121/>
+ </ietf:e12>
+ </ietf:e1>
+ <ietf:e2 xml:id="e2ID">
+ <!-- This is a comment for ietf:e2 element -->
+ <ietf:e21/>
+ </ietf:e2>
+ <ietf:e3 xml:id="e3ID">
+ <ietf:e31 at="3"/>
+ </ietf:e3>
+<Signature xmlns="http://www.w3.org/2000/09/xmldsig#"><SignedInfo><CanonicalizationMethod Algorithm="http://www.w3.org/2006/12/xml-c14n11"/><SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#hmac-sha1"/><Reference URI="#xpointer(/)"><Transforms><Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/><Transform Algorithm="http://www.w3.org/2006/12/xml-c14n11#WithComments"/></Transforms><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>/IZyGLL72rXhisXRkB617TxJrL8=</DigestValue></Reference></SignedInfo><SignatureValue>E4gxKwllVjvvlUQFe9p/ssO7Yxw=</SignatureValue></Signature></ietf:c14n11XmlPointerDoc1>
\ No newline at end of file
diff --git a/tests/xmldsig2ed-tests/xpointer-2-SUN.xml b/tests/xmldsig2ed-tests/xpointer-2-SUN.xml
new file mode 100644
index 0000000..c1a3230
--- /dev/null
+++ b/tests/xmldsig2ed-tests/xpointer-2-SUN.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?><Signature xmlns="http://www.w3.org/2000/09/xmldsig#"><SignedInfo><CanonicalizationMethod Algorithm="http://www.w3.org/2006/12/xml-c14n11"/><SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#hmac-sha1"/><Reference URI="#xpointer(id('e1ID'))"><Transforms><Transform Algorithm="http://www.w3.org/2006/12/xml-c14n11#WithComments"/></Transforms><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>XhSsDpWTt+ti0kcU9XYpleRDHfQ=</DigestValue></Reference></SignedInfo><SignatureValue>brEpICVA4lg7eQwz7i/rlBmYXiU=</SignatureValue><Object><ietf:c14n11XmlPointerDoc1 xmlns:ietf="http://www.ietf.org" xmlns:w3c="http://www.w3.org">
+ <!-- This is a xml document for checking behaviour of tools with regards to comments when using scheme-based xpointers in the ds:Reference's URI attribute -->
+ <ietf:e1 xml:id="e1ID">
+ <!-- This is a comment for ietf:e1 element -->
+ <ietf:e11>
+ <!-- This is a comment for ietf:e11 element -->
+ <ietf:e111/>
+ </ietf:e11>
+ <ietf:e12 at="2">
+ <!-- This is a comment for ietf:e12 element -->
+ <ietf:e121/>
+ </ietf:e12>
+ </ietf:e1>
+ <ietf:e2 xml:id="e2ID">
+ <!-- This is a comment for ietf:e2 element -->
+ <ietf:e21/>
+ </ietf:e2>
+ <ietf:e3 xml:id="e3ID">
+ <ietf:e31 at="3"/>
+ </ietf:e3>
+</ietf:c14n11XmlPointerDoc1></Object></Signature>
\ No newline at end of file
diff --git a/tests/xmldsig2ed-tests/xpointer-3-SUN.xml b/tests/xmldsig2ed-tests/xpointer-3-SUN.xml
new file mode 100644
index 0000000..e845123
--- /dev/null
+++ b/tests/xmldsig2ed-tests/xpointer-3-SUN.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?><ietf:c14n11XmlPointerDoc1 xmlns:ietf="http://www.ietf.org" xmlns:w3c="http://www.w3.org">
+ <!-- This is a xml document for checking behaviour of tools with regards to comments when using scheme-based xpointers in the ds:Reference's URI attribute -->
+ <ietf:e1 xml:id="e1ID">
+ <!-- This is a comment for ietf:e1 element -->
+ <ietf:e11>
+ <!-- This is a comment for ietf:e11 element -->
+ <ietf:e111/>
+ </ietf:e11>
+ <ietf:e12 at="2">
+ <!-- This is a comment for ietf:e12 element -->
+ <ietf:e121/>
+ </ietf:e12>
+ </ietf:e1>
+ <ietf:e2 xml:id="e2ID">
+ <!-- This is a comment for ietf:e2 element -->
+ <ietf:e21/>
+ </ietf:e2>
+ <ietf:e3 xml:id="e3ID">
+ <ietf:e31 at="3"/>
+ </ietf:e3>
+<Signature xmlns="http://www.w3.org/2000/09/xmldsig#"><SignedInfo><CanonicalizationMethod Algorithm="http://www.w3.org/2006/12/xml-c14n11"/><SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#hmac-sha1"/><Reference URI=""><Transforms><Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/><Transform Algorithm="http://www.w3.org/2006/12/xml-c14n11#WithComments"/></Transforms><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>gaV5r7qC3Ve/t641+d3ykN8JFSc=</DigestValue></Reference></SignedInfo><SignatureValue>gS1QKSwAH/6eE3OFi/L9O0oKKig=</SignatureValue></Signature></ietf:c14n11XmlPointerDoc1>
\ No newline at end of file
diff --git a/tests/xmldsig2ed-tests/xpointer-4-SUN.xml b/tests/xmldsig2ed-tests/xpointer-4-SUN.xml
new file mode 100644
index 0000000..84c3883
--- /dev/null
+++ b/tests/xmldsig2ed-tests/xpointer-4-SUN.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?><Signature xmlns="http://www.w3.org/2000/09/xmldsig#"><SignedInfo><CanonicalizationMethod Algorithm="http://www.w3.org/2006/12/xml-c14n11"/><SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#hmac-sha1"/><Reference URI="#e1ID"><Transforms><Transform Algorithm="http://www.w3.org/2006/12/xml-c14n11#WithComments"/></Transforms><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>3K+K4MbR2EW7l/ry59XockKqt4g=</DigestValue></Reference></SignedInfo><SignatureValue>dgyjONUs9rBjW7PH25seGqcMNZY=</SignatureValue><Object><ietf:c14n11XmlPointerDoc1 xmlns:ietf="http://www.ietf.org" xmlns:w3c="http://www.w3.org">
+ <!-- This is a xml document for checking behaviour of tools with regards to comments when using scheme-based xpointers in the ds:Reference's URI attribute -->
+ <ietf:e1 xml:id="e1ID">
+ <!-- This is a comment for ietf:e1 element -->
+ <ietf:e11>
+ <!-- This is a comment for ietf:e11 element -->
+ <ietf:e111/>
+ </ietf:e11>
+ <ietf:e12 at="2">
+ <!-- This is a comment for ietf:e12 element -->
+ <ietf:e121/>
+ </ietf:e12>
+ </ietf:e1>
+ <ietf:e2 xml:id="e2ID">
+ <!-- This is a comment for ietf:e2 element -->
+ <ietf:e21/>
+ </ietf:e2>
+ <ietf:e3 xml:id="e3ID">
+ <ietf:e31 at="3"/>
+ </ietf:e3>
+</ietf:c14n11XmlPointerDoc1></Object></Signature>
\ No newline at end of file
diff --git a/tests/xmldsig2ed-tests/xpointer-5-SUN.xml b/tests/xmldsig2ed-tests/xpointer-5-SUN.xml
new file mode 100644
index 0000000..401eff6
--- /dev/null
+++ b/tests/xmldsig2ed-tests/xpointer-5-SUN.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?><Signature xmlns="http://www.w3.org/2000/09/xmldsig#"><SignedInfo><CanonicalizationMethod Algorithm="http://www.w3.org/2006/12/xml-c14n11"/><SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#hmac-sha1"/><Reference URI="#xpointer(id('e1ID'))"><Transforms><Transform Algorithm="http://www.w3.org/2006/12/xml-c14n11#WithComments"/></Transforms><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>XhSsDpWTt+ti0kcU9XYpleRDHfQ=</DigestValue></Reference><Reference URI="#xpointer(id('e2ID'))"><Transforms><Transform Algorithm="http://www.w3.org/2006/12/xml-c14n11#WithComments"/></Transforms><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>abyA1j4yzf1IgQLWwDwKuU9l8Ik=</DigestValue></Reference><Reference URI="#xpointer(id('e3ID'))"><Transforms><Transform Algorithm="http://www.w3.org/2006/12/xml-c14n11#WithComments"/></Transforms><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsi
g#sha1"/><DigestValue>RUUBiUeFf8uRqTlpCyutkXDqnJ4=</DigestValue></Reference></SignedInfo><SignatureValue>sG+0pHk9TB6v7jES9RZUIVKMFos=</SignatureValue><Object><ietf:c14n11XmlPointerDoc1 xmlns:ietf="http://www.ietf.org" xmlns:w3c="http://www.w3.org">
+ <!-- This is a xml document for checking behaviour of tools with regards to comments when using scheme-based xpointers in the ds:Reference's URI attribute -->
+ <ietf:e1 xml:id="e1ID">
+ <!-- This is a comment for ietf:e1 element -->
+ <ietf:e11>
+ <!-- This is a comment for ietf:e11 element -->
+ <ietf:e111/>
+ </ietf:e11>
+ <ietf:e12 at="2">
+ <!-- This is a comment for ietf:e12 element -->
+ <ietf:e121/>
+ </ietf:e12>
+ </ietf:e1>
+ <ietf:e2 xml:id="e2ID">
+ <!-- This is a comment for ietf:e2 element -->
+ <ietf:e21/>
+ </ietf:e2>
+ <ietf:e3 xml:id="e3ID">
+ <ietf:e31 at="3"/>
+ </ietf:e3>
+</ietf:c14n11XmlPointerDoc1></Object></Signature>
\ No newline at end of file
diff --git a/tests/xmldsig2ed-tests/xpointer-6-SUN.xml b/tests/xmldsig2ed-tests/xpointer-6-SUN.xml
new file mode 100644
index 0000000..2f13aab
--- /dev/null
+++ b/tests/xmldsig2ed-tests/xpointer-6-SUN.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?><Signature xmlns="http://www.w3.org/2000/09/xmldsig#"><SignedInfo><CanonicalizationMethod Algorithm="http://www.w3.org/2006/12/xml-c14n11"/><SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#hmac-sha1"/><Reference URI="#e1ID"><Transforms><Transform Algorithm="http://www.w3.org/2006/12/xml-c14n11#WithComments"/></Transforms><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>3K+K4MbR2EW7l/ry59XockKqt4g=</DigestValue></Reference><Reference URI="#e2ID"><Transforms><Transform Algorithm="http://www.w3.org/2006/12/xml-c14n11#WithComments"/></Transforms><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>hnKFjGFr/jwLCCTckZpaclOwe28=</DigestValue></Reference><Reference URI="#e3ID"><Transforms><Transform Algorithm="http://www.w3.org/2006/12/xml-c14n11#WithComments"/></Transforms><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>RUUBiUeFf8uRqTlpCyutkXDqnJ
4=</DigestValue></Reference></SignedInfo><SignatureValue>XzEJQ+whhHUYlqiCEt8XFxC8wpk=</SignatureValue><Object><ietf:c14n11XmlPointerDoc1 xmlns:ietf="http://www.ietf.org" xmlns:w3c="http://www.w3.org">
+ <!-- This is a xml document for checking behaviour of tools with regards to comments when using scheme-based xpointers in the ds:Reference's URI attribute -->
+ <ietf:e1 xml:id="e1ID">
+ <!-- This is a comment for ietf:e1 element -->
+ <ietf:e11>
+ <!-- This is a comment for ietf:e11 element -->
+ <ietf:e111/>
+ </ietf:e11>
+ <ietf:e12 at="2">
+ <!-- This is a comment for ietf:e12 element -->
+ <ietf:e121/>
+ </ietf:e12>
+ </ietf:e1>
+ <ietf:e2 xml:id="e2ID">
+ <!-- This is a comment for ietf:e2 element -->
+ <ietf:e21/>
+ </ietf:e2>
+ <ietf:e3 xml:id="e3ID">
+ <ietf:e31 at="3"/>
+ </ietf:e3>
+</ietf:c14n11XmlPointerDoc1></Object></Signature>
\ No newline at end of file
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]