xmlsec-shim 1.2.18.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +17 -0
- data/Gemfile +4 -0
- data/README.md +2 -0
- data/Rakefile +2 -0
- data/ext/xmlsec/extconf.rb +14 -0
- data/lib/xmlsec-shim.rb +27 -0
- data/lib/xmlsec-shim/version.rb +5 -0
- data/vendor/xmlsec1-1.2.18/AUTHORS +8 -0
- data/vendor/xmlsec1-1.2.18/COPYING +105 -0
- data/vendor/xmlsec1-1.2.18/ChangeLog +1810 -0
- data/vendor/xmlsec1-1.2.18/Copyright +105 -0
- data/vendor/xmlsec1-1.2.18/HACKING +199 -0
- data/vendor/xmlsec1-1.2.18/INSTALL +38 -0
- data/vendor/xmlsec1-1.2.18/Makefile.am +186 -0
- data/vendor/xmlsec1-1.2.18/Makefile.in +1155 -0
- data/vendor/xmlsec1-1.2.18/NEWS +1 -0
- data/vendor/xmlsec1-1.2.18/README +15 -0
- data/vendor/xmlsec1-1.2.18/TODO +156 -0
- data/vendor/xmlsec1-1.2.18/aclocal.m4 +1197 -0
- data/vendor/xmlsec1-1.2.18/apps/Makefile.am +84 -0
- data/vendor/xmlsec1-1.2.18/apps/Makefile.in +694 -0
- data/vendor/xmlsec1-1.2.18/apps/cmdline.c +355 -0
- data/vendor/xmlsec1-1.2.18/apps/cmdline.h +89 -0
- data/vendor/xmlsec1-1.2.18/apps/crypto.c +396 -0
- data/vendor/xmlsec1-1.2.18/apps/crypto.h +70 -0
- data/vendor/xmlsec1-1.2.18/apps/xmlsec.c +3058 -0
- data/vendor/xmlsec1-1.2.18/config.guess +1502 -0
- data/vendor/xmlsec1-1.2.18/config.h.in +134 -0
- data/vendor/xmlsec1-1.2.18/config.sub +1714 -0
- data/vendor/xmlsec1-1.2.18/configure +17363 -0
- data/vendor/xmlsec1-1.2.18/configure.in +1633 -0
- data/vendor/xmlsec1-1.2.18/depcomp +630 -0
- data/vendor/xmlsec1-1.2.18/docs/Makefile.am +65 -0
- data/vendor/xmlsec1-1.2.18/docs/Makefile.in +721 -0
- data/vendor/xmlsec1-1.2.18/docs/api/Makefile.am +209 -0
- data/vendor/xmlsec1-1.2.18/docs/api/Makefile.in +664 -0
- data/vendor/xmlsec1-1.2.18/docs/api/chapters/compiling-and-linking.sgml +252 -0
- data/vendor/xmlsec1-1.2.18/docs/api/chapters/creating-templates.sgml +325 -0
- data/vendor/xmlsec1-1.2.18/docs/api/chapters/examples.sgml +102 -0
- data/vendor/xmlsec1-1.2.18/docs/api/chapters/init-and-shutdown.sgml +104 -0
- data/vendor/xmlsec1-1.2.18/docs/api/chapters/new-crypto.sgml +487 -0
- data/vendor/xmlsec1-1.2.18/docs/api/chapters/sign-and-encrypt.sgml +286 -0
- data/vendor/xmlsec1-1.2.18/docs/api/chapters/using-contexts.sgml +138 -0
- data/vendor/xmlsec1-1.2.18/docs/api/chapters/using-keys.sgml +26 -0
- data/vendor/xmlsec1-1.2.18/docs/api/chapters/using-keysmngr.sgml +592 -0
- data/vendor/xmlsec1-1.2.18/docs/api/chapters/using-transforms.sgml +67 -0
- data/vendor/xmlsec1-1.2.18/docs/api/chapters/using-x509-certs.sgml +197 -0
- data/vendor/xmlsec1-1.2.18/docs/api/chapters/verify-and-decrypt.sgml +265 -0
- data/vendor/xmlsec1-1.2.18/docs/api/home.png +0 -0
- data/vendor/xmlsec1-1.2.18/docs/api/images/diagrams.sxd +0 -0
- data/vendor/xmlsec1-1.2.18/docs/api/images/encryption-structure.png +0 -0
- data/vendor/xmlsec1-1.2.18/docs/api/images/key.png +0 -0
- data/vendor/xmlsec1-1.2.18/docs/api/images/keysmngr.png +0 -0
- data/vendor/xmlsec1-1.2.18/docs/api/images/sign-enc-model.png +0 -0
- data/vendor/xmlsec1-1.2.18/docs/api/images/signature-structure.png +0 -0
- data/vendor/xmlsec1-1.2.18/docs/api/images/structure.png +0 -0
- data/vendor/xmlsec1-1.2.18/docs/api/images/transform.png +0 -0
- data/vendor/xmlsec1-1.2.18/docs/api/images/transforms-chain.png +0 -0
- data/vendor/xmlsec1-1.2.18/docs/api/images/verif-dec-model.png +0 -0
- data/vendor/xmlsec1-1.2.18/docs/api/index.html +307 -0
- data/vendor/xmlsec1-1.2.18/docs/api/index.sgml +43 -0
- data/vendor/xmlsec1-1.2.18/docs/api/left.png +0 -0
- data/vendor/xmlsec1-1.2.18/docs/api/right.png +0 -0
- data/vendor/xmlsec1-1.2.18/docs/api/up.png +0 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec-app.html +1525 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec-base64.html +357 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec-bn.html +705 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec-buffer.html +603 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec-custom-keys-manager.html +475 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec-decrypt-with-keys-mngr.html +396 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec-decrypt-with-signle-key.html +326 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec-dl.html +245 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec-encrypt-dynamic-template.html +386 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec-encrypt-template-file.html +364 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec-encrypt-with-session-key.html +495 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec-encryption-klasses.html +101 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec-errors.html +744 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec-examples-sign-dynamimc-template.html +406 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec-examples-sign-template-file.html +388 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec-examples-sign-x509.html +447 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec-examples.html +119 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec-gcrypt-app.html +578 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec-gcrypt-crypto.html +1128 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec-gcrypt-ref.html +107 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec-gcrypt.sgml +15 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec-gnutls-app.html +576 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec-gnutls-crypto.html +1076 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec-gnutls-ref.html +107 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec-gnutls.sgml +15 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec-index.html +1570 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec-index.sgml +1471 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec-io.html +226 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec-keyinfo.html +700 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec-keys.html +1161 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec-keysdata.html +2067 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec-keysmngr.html +743 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec-list.html +643 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec-membuf.html +143 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec-mscrypto-app.html +747 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec-mscrypto-certkeys.html +252 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec-mscrypto-crypto.html +1153 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec-mscrypto-keysstore.html +209 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec-mscrypto-ref.html +113 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec-mscrypto-x509.html +478 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec-mscrypto.sgml +21 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec-nodeset.html +542 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec-notes-compiling-others.html +102 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec-notes-compiling-unix.html +223 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec-notes-compiling-windows.html +138 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec-notes-compiling.html +117 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec-notes-contexts.html +229 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec-notes-custom-keys-store.html +250 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec-notes-decrypt.html +205 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec-notes-dynamic-encryption-templates.html +240 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec-notes-dynamic-signature-templates.html +250 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec-notes-encrypt.html +223 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec-notes-include-files.html +141 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec-notes-init-shutdown.html +194 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec-notes-keys-manager-sign-enc.html +307 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec-notes-keys-mngr-verify-decrypt.html +179 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec-notes-keys.html +120 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec-notes-keysmngr.html +140 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec-notes-new-crypto-functions.html +151 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec-notes-new-crypto-key-stores.html +83 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec-notes-new-crypto-keys.html +103 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec-notes-new-crypto-klasses.html +217 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec-notes-new-crypto-sharing-results.html +125 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec-notes-new-crypto-simple-keys-mngr.html +102 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec-notes-new-crypto-skeleton.html +254 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec-notes-new-crypto-transforms.html +170 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec-notes-new-crypto.html +136 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec-notes-overview.html +102 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec-notes-sign-encrypt.html +120 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec-notes-sign-x509.html +176 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec-notes-sign.html +210 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec-notes-simple-keys-store.html +177 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec-notes-structure.html +115 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec-notes-templates.html +114 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec-notes-transforms.html +154 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec-notes-verify-decrypt.html +120 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec-notes-verify-x509.html +180 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec-notes-verify.html +210 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec-notes-x509.html +114 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec-notes.html +115 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec-nss-app.html +740 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec-nss-bignum.html +176 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec-nss-crypto.html +978 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec-nss-keysstore.html +209 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec-nss-pkikeys.html +211 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec-nss-ref.html +115 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec-nss-x509.html +467 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec-nss.sgml +23 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec-openssl-app.html +800 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec-openssl-bn.html +170 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec-openssl-crypto.html +1329 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec-openssl-evp.html +184 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec-openssl-ref.html +113 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec-openssl-x509.html +567 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec-openssl.sgml +21 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec-parser.html +223 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec-ref.html +149 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec-reference.html +106 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec-signature-klasses.html +101 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec-templates.html +1290 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec-transforms.html +3059 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec-verify-with-key.html +318 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec-verify-with-keys-mngr.html +388 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec-verify-with-restrictions.html +715 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec-verify-with-x509.html +369 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec-version.html +143 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec-x509.html +181 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec-xmldsig.html +853 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec-xmlenc.html +584 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec-xmlsec.html +300 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec-xmltree.html +1529 -0
- data/vendor/xmlsec1-1.2.18/docs/api/xmlsec.sgml +307 -0
- data/vendor/xmlsec1-1.2.18/docs/authors.html +59 -0
- data/vendor/xmlsec1-1.2.18/docs/bugs.html +106 -0
- data/vendor/xmlsec1-1.2.18/docs/c14n.html +73 -0
- data/vendor/xmlsec1-1.2.18/docs/documentation.html +65 -0
- data/vendor/xmlsec1-1.2.18/docs/download.html +115 -0
- data/vendor/xmlsec1-1.2.18/docs/faq.html +449 -0
- data/vendor/xmlsec1-1.2.18/docs/images/bart.gif +0 -0
- data/vendor/xmlsec1-1.2.18/docs/images/libxml2-logo.png +0 -0
- data/vendor/xmlsec1-1.2.18/docs/images/libxslt-logo.png +0 -0
- data/vendor/xmlsec1-1.2.18/docs/images/logo.gif +0 -0
- data/vendor/xmlsec1-1.2.18/docs/images/openssl-logo.png +0 -0
- data/vendor/xmlsec1-1.2.18/docs/images/xmlsec-logo.gif +0 -0
- data/vendor/xmlsec1-1.2.18/docs/index.html +109 -0
- data/vendor/xmlsec1-1.2.18/docs/news.html +545 -0
- data/vendor/xmlsec1-1.2.18/docs/related.html +165 -0
- data/vendor/xmlsec1-1.2.18/docs/xmldsig-verifier.html +138 -0
- data/vendor/xmlsec1-1.2.18/docs/xmldsig.html +646 -0
- data/vendor/xmlsec1-1.2.18/docs/xmlenc.html +464 -0
- data/vendor/xmlsec1-1.2.18/docs/xmlsec-man.html +291 -0
- data/vendor/xmlsec1-1.2.18/docs/xmlsec.xsl +194 -0
- data/vendor/xmlsec1-1.2.18/examples/Makefile +40 -0
- data/vendor/xmlsec1-1.2.18/examples/Makefile.w32 +88 -0
- data/vendor/xmlsec1-1.2.18/examples/README +126 -0
- data/vendor/xmlsec1-1.2.18/examples/binary.dat +1 -0
- data/vendor/xmlsec1-1.2.18/examples/decrypt1.c +223 -0
- data/vendor/xmlsec1-1.2.18/examples/decrypt2.c +293 -0
- data/vendor/xmlsec1-1.2.18/examples/decrypt3.c +372 -0
- data/vendor/xmlsec1-1.2.18/examples/deskey.bin +1 -0
- data/vendor/xmlsec1-1.2.18/examples/encrypt1-res.xml +13 -0
- data/vendor/xmlsec1-1.2.18/examples/encrypt1-tmpl.xml +13 -0
- data/vendor/xmlsec1-1.2.18/examples/encrypt1.c +219 -0
- data/vendor/xmlsec1-1.2.18/examples/encrypt2-doc.xml +9 -0
- data/vendor/xmlsec1-1.2.18/examples/encrypt2-res.xml +14 -0
- data/vendor/xmlsec1-1.2.18/examples/encrypt2.c +244 -0
- data/vendor/xmlsec1-1.2.18/examples/encrypt3-doc.xml +9 -0
- data/vendor/xmlsec1-1.2.18/examples/encrypt3-res.xml +27 -0
- data/vendor/xmlsec1-1.2.18/examples/encrypt3.c +340 -0
- data/vendor/xmlsec1-1.2.18/examples/mywin32make.bat +18 -0
- data/vendor/xmlsec1-1.2.18/examples/rootcert.pem +25 -0
- data/vendor/xmlsec1-1.2.18/examples/rsacert.pem +83 -0
- data/vendor/xmlsec1-1.2.18/examples/rsakey.pem +27 -0
- data/vendor/xmlsec1-1.2.18/examples/rsapub.pem +9 -0
- data/vendor/xmlsec1-1.2.18/examples/sign1-res.xml +31 -0
- data/vendor/xmlsec1-1.2.18/examples/sign1-tmpl.xml +27 -0
- data/vendor/xmlsec1-1.2.18/examples/sign1.c +212 -0
- data/vendor/xmlsec1-1.2.18/examples/sign2-doc.xml +9 -0
- data/vendor/xmlsec1-1.2.18/examples/sign2-res.xml +30 -0
- data/vendor/xmlsec1-1.2.18/examples/sign2.c +248 -0
- data/vendor/xmlsec1-1.2.18/examples/sign3-doc.xml +9 -0
- data/vendor/xmlsec1-1.2.18/examples/sign3-res.xml +58 -0
- data/vendor/xmlsec1-1.2.18/examples/sign3.c +261 -0
- data/vendor/xmlsec1-1.2.18/examples/verify1.c +215 -0
- data/vendor/xmlsec1-1.2.18/examples/verify2.c +285 -0
- data/vendor/xmlsec1-1.2.18/examples/verify3.c +266 -0
- data/vendor/xmlsec1-1.2.18/examples/verify4-bad-res.xml +90 -0
- data/vendor/xmlsec1-1.2.18/examples/verify4-bad-tmpl.xml +54 -0
- data/vendor/xmlsec1-1.2.18/examples/verify4-res.xml +80 -0
- data/vendor/xmlsec1-1.2.18/examples/verify4-tmpl.xml +47 -0
- data/vendor/xmlsec1-1.2.18/examples/verify4.c +309 -0
- data/vendor/xmlsec1-1.2.18/examples/xkms-server.c +839 -0
- data/vendor/xmlsec1-1.2.18/examples/xmldsigverify.c +381 -0
- data/vendor/xmlsec1-1.2.18/include/Makefile.am +4 -0
- data/vendor/xmlsec1-1.2.18/include/Makefile.in +656 -0
- data/vendor/xmlsec1-1.2.18/include/xmlsec/Makefile.am +63 -0
- data/vendor/xmlsec1-1.2.18/include/xmlsec/Makefile.in +767 -0
- data/vendor/xmlsec1-1.2.18/include/xmlsec/app.h +424 -0
- data/vendor/xmlsec1-1.2.18/include/xmlsec/base64.h +67 -0
- data/vendor/xmlsec1-1.2.18/include/xmlsec/bn.h +99 -0
- data/vendor/xmlsec1-1.2.18/include/xmlsec/buffer.h +108 -0
- data/vendor/xmlsec1-1.2.18/include/xmlsec/crypto.h +75 -0
- data/vendor/xmlsec1-1.2.18/include/xmlsec/dl.h +56 -0
- data/vendor/xmlsec1-1.2.18/include/xmlsec/errors.h +504 -0
- data/vendor/xmlsec1-1.2.18/include/xmlsec/exports.h +111 -0
- data/vendor/xmlsec1-1.2.18/include/xmlsec/gcrypt/Makefile.am +13 -0
- data/vendor/xmlsec1-1.2.18/include/xmlsec/gcrypt/Makefile.in +564 -0
- data/vendor/xmlsec1-1.2.18/include/xmlsec/gcrypt/app.h +96 -0
- data/vendor/xmlsec1-1.2.18/include/xmlsec/gcrypt/crypto.h +460 -0
- data/vendor/xmlsec1-1.2.18/include/xmlsec/gcrypt/symbols.h +104 -0
- data/vendor/xmlsec1-1.2.18/include/xmlsec/gnutls/Makefile.am +14 -0
- data/vendor/xmlsec1-1.2.18/include/xmlsec/gnutls/Makefile.in +565 -0
- data/vendor/xmlsec1-1.2.18/include/xmlsec/gnutls/app.h +96 -0
- data/vendor/xmlsec1-1.2.18/include/xmlsec/gnutls/crypto.h +462 -0
- data/vendor/xmlsec1-1.2.18/include/xmlsec/gnutls/symbols.h +104 -0
- data/vendor/xmlsec1-1.2.18/include/xmlsec/gnutls/x509.h +110 -0
- data/vendor/xmlsec1-1.2.18/include/xmlsec/io.h +54 -0
- data/vendor/xmlsec1-1.2.18/include/xmlsec/keyinfo.h +285 -0
- data/vendor/xmlsec1-1.2.18/include/xmlsec/keys.h +278 -0
- data/vendor/xmlsec1-1.2.18/include/xmlsec/keysdata.h +837 -0
- data/vendor/xmlsec1-1.2.18/include/xmlsec/keysmngr.h +264 -0
- data/vendor/xmlsec1-1.2.18/include/xmlsec/list.h +194 -0
- data/vendor/xmlsec1-1.2.18/include/xmlsec/membuf.h +44 -0
- data/vendor/xmlsec1-1.2.18/include/xmlsec/mscrypto/Makefile.am +16 -0
- data/vendor/xmlsec1-1.2.18/include/xmlsec/mscrypto/Makefile.in +567 -0
- data/vendor/xmlsec1-1.2.18/include/xmlsec/mscrypto/app.h +116 -0
- data/vendor/xmlsec1-1.2.18/include/xmlsec/mscrypto/certkeys.h +42 -0
- data/vendor/xmlsec1-1.2.18/include/xmlsec/mscrypto/crypto.h +516 -0
- data/vendor/xmlsec1-1.2.18/include/xmlsec/mscrypto/keysstore.h +48 -0
- data/vendor/xmlsec1-1.2.18/include/xmlsec/mscrypto/symbols.h +114 -0
- data/vendor/xmlsec1-1.2.18/include/xmlsec/mscrypto/x509.h +92 -0
- data/vendor/xmlsec1-1.2.18/include/xmlsec/nodeset.h +139 -0
- data/vendor/xmlsec1-1.2.18/include/xmlsec/nss/Makefile.am +17 -0
- data/vendor/xmlsec1-1.2.18/include/xmlsec/nss/Makefile.in +568 -0
- data/vendor/xmlsec1-1.2.18/include/xmlsec/nss/app.h +118 -0
- data/vendor/xmlsec1-1.2.18/include/xmlsec/nss/bignum.h +37 -0
- data/vendor/xmlsec1-1.2.18/include/xmlsec/nss/crypto.h +469 -0
- data/vendor/xmlsec1-1.2.18/include/xmlsec/nss/keysstore.h +46 -0
- data/vendor/xmlsec1-1.2.18/include/xmlsec/nss/pkikeys.h +44 -0
- data/vendor/xmlsec1-1.2.18/include/xmlsec/nss/symbols.h +106 -0
- data/vendor/xmlsec1-1.2.18/include/xmlsec/nss/x509.h +91 -0
- data/vendor/xmlsec1-1.2.18/include/xmlsec/openssl/Makefile.am +16 -0
- data/vendor/xmlsec1-1.2.18/include/xmlsec/openssl/Makefile.in +567 -0
- data/vendor/xmlsec1-1.2.18/include/xmlsec/openssl/app.h +128 -0
- data/vendor/xmlsec1-1.2.18/include/xmlsec/openssl/bn.h +35 -0
- data/vendor/xmlsec1-1.2.18/include/xmlsec/openssl/crypto.h +561 -0
- data/vendor/xmlsec1-1.2.18/include/xmlsec/openssl/evp.h +44 -0
- data/vendor/xmlsec1-1.2.18/include/xmlsec/openssl/symbols.h +123 -0
- data/vendor/xmlsec1-1.2.18/include/xmlsec/openssl/x509.h +109 -0
- data/vendor/xmlsec1-1.2.18/include/xmlsec/parser.h +51 -0
- data/vendor/xmlsec1-1.2.18/include/xmlsec/private.h +489 -0
- data/vendor/xmlsec1-1.2.18/include/xmlsec/private/Makefile.am +12 -0
- data/vendor/xmlsec1-1.2.18/include/xmlsec/private/Makefile.in +563 -0
- data/vendor/xmlsec1-1.2.18/include/xmlsec/private/xkms.h +121 -0
- data/vendor/xmlsec1-1.2.18/include/xmlsec/private/xslt.h +34 -0
- data/vendor/xmlsec1-1.2.18/include/xmlsec/skeleton/Makefile.am +13 -0
- data/vendor/xmlsec1-1.2.18/include/xmlsec/skeleton/app.h +97 -0
- data/vendor/xmlsec1-1.2.18/include/xmlsec/skeleton/crypto.h +40 -0
- data/vendor/xmlsec1-1.2.18/include/xmlsec/skeleton/symbols.h +117 -0
- data/vendor/xmlsec1-1.2.18/include/xmlsec/soap.h +130 -0
- data/vendor/xmlsec1-1.2.18/include/xmlsec/strings.h +610 -0
- data/vendor/xmlsec1-1.2.18/include/xmlsec/templates.h +162 -0
- data/vendor/xmlsec1-1.2.18/include/xmlsec/transforms.h +994 -0
- data/vendor/xmlsec1-1.2.18/include/xmlsec/version.h +61 -0
- data/vendor/xmlsec1-1.2.18/include/xmlsec/version.h.in +61 -0
- data/vendor/xmlsec1-1.2.18/include/xmlsec/x509.h +80 -0
- data/vendor/xmlsec1-1.2.18/include/xmlsec/xkms.h +652 -0
- data/vendor/xmlsec1-1.2.18/include/xmlsec/xmldsig.h +281 -0
- data/vendor/xmlsec1-1.2.18/include/xmlsec/xmlenc.h +163 -0
- data/vendor/xmlsec1-1.2.18/include/xmlsec/xmlsec.h +216 -0
- data/vendor/xmlsec1-1.2.18/include/xmlsec/xmltree.h +275 -0
- data/vendor/xmlsec1-1.2.18/install-sh +520 -0
- data/vendor/xmlsec1-1.2.18/ltmain.sh +8413 -0
- data/vendor/xmlsec1-1.2.18/m4/libtool.m4 +7377 -0
- data/vendor/xmlsec1-1.2.18/m4/ltoptions.m4 +368 -0
- data/vendor/xmlsec1-1.2.18/m4/ltsugar.m4 +123 -0
- data/vendor/xmlsec1-1.2.18/m4/ltversion.m4 +23 -0
- data/vendor/xmlsec1-1.2.18/m4/lt~obsolete.m4 +92 -0
- data/vendor/xmlsec1-1.2.18/man/Makefile.am +52 -0
- data/vendor/xmlsec1-1.2.18/man/Makefile.in +582 -0
- data/vendor/xmlsec1-1.2.18/man/xmlsec1-config.1 +34 -0
- data/vendor/xmlsec1-1.2.18/man/xmlsec1.1 +269 -0
- data/vendor/xmlsec1-1.2.18/missing +376 -0
- data/vendor/xmlsec1-1.2.18/scripts/build_release.sh +33 -0
- data/vendor/xmlsec1-1.2.18/scripts/change-release.sh +34 -0
- data/vendor/xmlsec1-1.2.18/scripts/push_release.sh +30 -0
- data/vendor/xmlsec1-1.2.18/scripts/remove-gtkdoclink.pl +20 -0
- data/vendor/xmlsec1-1.2.18/scripts/test_errors.pl +38 -0
- data/vendor/xmlsec1-1.2.18/scripts/test_release.sh +12 -0
- data/vendor/xmlsec1-1.2.18/src/Makefile.am +71 -0
- data/vendor/xmlsec1-1.2.18/src/Makefile.in +878 -0
- data/vendor/xmlsec1-1.2.18/src/app.c +1498 -0
- data/vendor/xmlsec1-1.2.18/src/base64.c +1034 -0
- data/vendor/xmlsec1-1.2.18/src/bn.c +1060 -0
- data/vendor/xmlsec1-1.2.18/src/buffer.c +674 -0
- data/vendor/xmlsec1-1.2.18/src/c14n.c +801 -0
- data/vendor/xmlsec1-1.2.18/src/dl.c +994 -0
- data/vendor/xmlsec1-1.2.18/src/enveloped.c +152 -0
- data/vendor/xmlsec1-1.2.18/src/errors.c +242 -0
- data/vendor/xmlsec1-1.2.18/src/gcrypt/Makefile.am +55 -0
- data/vendor/xmlsec1-1.2.18/src/gcrypt/Makefile.in +764 -0
- data/vendor/xmlsec1-1.2.18/src/gcrypt/README +9 -0
- data/vendor/xmlsec1-1.2.18/src/gcrypt/app.c +663 -0
- data/vendor/xmlsec1-1.2.18/src/gcrypt/asn1.c +602 -0
- data/vendor/xmlsec1-1.2.18/src/gcrypt/asn1.h +39 -0
- data/vendor/xmlsec1-1.2.18/src/gcrypt/asymkeys.c +1920 -0
- data/vendor/xmlsec1-1.2.18/src/gcrypt/ciphers.c +855 -0
- data/vendor/xmlsec1-1.2.18/src/gcrypt/crypto.c +315 -0
- data/vendor/xmlsec1-1.2.18/src/gcrypt/digests.c +614 -0
- data/vendor/xmlsec1-1.2.18/src/gcrypt/globals.h +30 -0
- data/vendor/xmlsec1-1.2.18/src/gcrypt/hmac.c +823 -0
- data/vendor/xmlsec1-1.2.18/src/gcrypt/kw_aes.c +593 -0
- data/vendor/xmlsec1-1.2.18/src/gcrypt/kw_des.c +607 -0
- data/vendor/xmlsec1-1.2.18/src/gcrypt/signatures.c +1490 -0
- data/vendor/xmlsec1-1.2.18/src/gcrypt/symkeys.c +441 -0
- data/vendor/xmlsec1-1.2.18/src/globals.h +25 -0
- data/vendor/xmlsec1-1.2.18/src/gnutls/Makefile.am +58 -0
- data/vendor/xmlsec1-1.2.18/src/gnutls/Makefile.in +786 -0
- data/vendor/xmlsec1-1.2.18/src/gnutls/README +6 -0
- data/vendor/xmlsec1-1.2.18/src/gnutls/app.c +998 -0
- data/vendor/xmlsec1-1.2.18/src/gnutls/asymkeys.c +455 -0
- data/vendor/xmlsec1-1.2.18/src/gnutls/ciphers.c +82 -0
- data/vendor/xmlsec1-1.2.18/src/gnutls/crypto.c +351 -0
- data/vendor/xmlsec1-1.2.18/src/gnutls/digests.c +112 -0
- data/vendor/xmlsec1-1.2.18/src/gnutls/globals.h +31 -0
- data/vendor/xmlsec1-1.2.18/src/gnutls/hmac.c +141 -0
- data/vendor/xmlsec1-1.2.18/src/gnutls/kw_aes.c +72 -0
- data/vendor/xmlsec1-1.2.18/src/gnutls/kw_des.c +51 -0
- data/vendor/xmlsec1-1.2.18/src/gnutls/signatures.c +148 -0
- data/vendor/xmlsec1-1.2.18/src/gnutls/symkeys.c +125 -0
- data/vendor/xmlsec1-1.2.18/src/gnutls/x509.c +1960 -0
- data/vendor/xmlsec1-1.2.18/src/gnutls/x509utils.c +1687 -0
- data/vendor/xmlsec1-1.2.18/src/gnutls/x509utils.h +143 -0
- data/vendor/xmlsec1-1.2.18/src/gnutls/x509vfy.c +802 -0
- data/vendor/xmlsec1-1.2.18/src/io.c +496 -0
- data/vendor/xmlsec1-1.2.18/src/keyinfo.c +1561 -0
- data/vendor/xmlsec1-1.2.18/src/keys.c +1415 -0
- data/vendor/xmlsec1-1.2.18/src/keysdata.c +1387 -0
- data/vendor/xmlsec1-1.2.18/src/keysmngr.c +745 -0
- data/vendor/xmlsec1-1.2.18/src/kw_aes_des.c +493 -0
- data/vendor/xmlsec1-1.2.18/src/kw_aes_des.h +148 -0
- data/vendor/xmlsec1-1.2.18/src/list.c +534 -0
- data/vendor/xmlsec1-1.2.18/src/membuf.c +209 -0
- data/vendor/xmlsec1-1.2.18/src/mscrypto/Makefile.am +62 -0
- data/vendor/xmlsec1-1.2.18/src/mscrypto/Makefile.in +799 -0
- data/vendor/xmlsec1-1.2.18/src/mscrypto/README +39 -0
- data/vendor/xmlsec1-1.2.18/src/mscrypto/app.c +1289 -0
- data/vendor/xmlsec1-1.2.18/src/mscrypto/certkeys.c +2615 -0
- data/vendor/xmlsec1-1.2.18/src/mscrypto/ciphers.c +937 -0
- data/vendor/xmlsec1-1.2.18/src/mscrypto/crypto.c +889 -0
- data/vendor/xmlsec1-1.2.18/src/mscrypto/csp_calg.h +105 -0
- data/vendor/xmlsec1-1.2.18/src/mscrypto/csp_oid.h +114 -0
- data/vendor/xmlsec1-1.2.18/src/mscrypto/digests.c +668 -0
- data/vendor/xmlsec1-1.2.18/src/mscrypto/globals.h +39 -0
- data/vendor/xmlsec1-1.2.18/src/mscrypto/hmac.c +963 -0
- data/vendor/xmlsec1-1.2.18/src/mscrypto/keysstore.c +620 -0
- data/vendor/xmlsec1-1.2.18/src/mscrypto/kt_rsa.c +631 -0
- data/vendor/xmlsec1-1.2.18/src/mscrypto/kw_aes.c +662 -0
- data/vendor/xmlsec1-1.2.18/src/mscrypto/kw_des.c +730 -0
- data/vendor/xmlsec1-1.2.18/src/mscrypto/mingw-crypt32.def +36 -0
- data/vendor/xmlsec1-1.2.18/src/mscrypto/private.h +130 -0
- data/vendor/xmlsec1-1.2.18/src/mscrypto/signatures.c +960 -0
- data/vendor/xmlsec1-1.2.18/src/mscrypto/symkeys.c +824 -0
- data/vendor/xmlsec1-1.2.18/src/mscrypto/x509.c +2281 -0
- data/vendor/xmlsec1-1.2.18/src/mscrypto/x509vfy.c +1406 -0
- data/vendor/xmlsec1-1.2.18/src/mscrypto/xmlsec-mingw.h +210 -0
- data/vendor/xmlsec1-1.2.18/src/nodeset.c +610 -0
- data/vendor/xmlsec1-1.2.18/src/nss/Makefile.am +57 -0
- data/vendor/xmlsec1-1.2.18/src/nss/Makefile.in +798 -0
- data/vendor/xmlsec1-1.2.18/src/nss/README +128 -0
- data/vendor/xmlsec1-1.2.18/src/nss/app.c +1598 -0
- data/vendor/xmlsec1-1.2.18/src/nss/bignum.c +163 -0
- data/vendor/xmlsec1-1.2.18/src/nss/ciphers.c +838 -0
- data/vendor/xmlsec1-1.2.18/src/nss/crypto.c +444 -0
- data/vendor/xmlsec1-1.2.18/src/nss/digests.c +576 -0
- data/vendor/xmlsec1-1.2.18/src/nss/globals.h +24 -0
- data/vendor/xmlsec1-1.2.18/src/nss/hmac.c +855 -0
- data/vendor/xmlsec1-1.2.18/src/nss/keysstore.c +485 -0
- data/vendor/xmlsec1-1.2.18/src/nss/keytrans.c +753 -0
- data/vendor/xmlsec1-1.2.18/src/nss/kw_aes.c +681 -0
- data/vendor/xmlsec1-1.2.18/src/nss/kw_des.c +663 -0
- data/vendor/xmlsec1-1.2.18/src/nss/pkikeys.c +1554 -0
- data/vendor/xmlsec1-1.2.18/src/nss/signatures.c +841 -0
- data/vendor/xmlsec1-1.2.18/src/nss/symkeys.c +440 -0
- data/vendor/xmlsec1-1.2.18/src/nss/x509.c +2223 -0
- data/vendor/xmlsec1-1.2.18/src/nss/x509vfy.c +808 -0
- data/vendor/xmlsec1-1.2.18/src/openssl/Makefile.am +56 -0
- data/vendor/xmlsec1-1.2.18/src/openssl/Makefile.in +790 -0
- data/vendor/xmlsec1-1.2.18/src/openssl/README +17 -0
- data/vendor/xmlsec1-1.2.18/src/openssl/app.c +1628 -0
- data/vendor/xmlsec1-1.2.18/src/openssl/bn.c +163 -0
- data/vendor/xmlsec1-1.2.18/src/openssl/ciphers.c +856 -0
- data/vendor/xmlsec1-1.2.18/src/openssl/crypto.c +491 -0
- data/vendor/xmlsec1-1.2.18/src/openssl/digests.c +682 -0
- data/vendor/xmlsec1-1.2.18/src/openssl/evp.c +1559 -0
- data/vendor/xmlsec1-1.2.18/src/openssl/globals.h +24 -0
- data/vendor/xmlsec1-1.2.18/src/openssl/hmac.c +857 -0
- data/vendor/xmlsec1-1.2.18/src/openssl/kt_rsa.c +876 -0
- data/vendor/xmlsec1-1.2.18/src/openssl/kw_aes.c +513 -0
- data/vendor/xmlsec1-1.2.18/src/openssl/kw_des.c +563 -0
- data/vendor/xmlsec1-1.2.18/src/openssl/signatures.c +1065 -0
- data/vendor/xmlsec1-1.2.18/src/openssl/symkeys.c +447 -0
- data/vendor/xmlsec1-1.2.18/src/openssl/x509.c +2414 -0
- data/vendor/xmlsec1-1.2.18/src/openssl/x509vfy.c +1284 -0
- data/vendor/xmlsec1-1.2.18/src/parser.c +571 -0
- data/vendor/xmlsec1-1.2.18/src/skeleton/Makefile.am +45 -0
- data/vendor/xmlsec1-1.2.18/src/skeleton/README +0 -0
- data/vendor/xmlsec1-1.2.18/src/skeleton/app.c +499 -0
- data/vendor/xmlsec1-1.2.18/src/skeleton/crypto.c +260 -0
- data/vendor/xmlsec1-1.2.18/src/skeleton/globals.h +24 -0
- data/vendor/xmlsec1-1.2.18/src/soap.c +1322 -0
- data/vendor/xmlsec1-1.2.18/src/strings.c +597 -0
- data/vendor/xmlsec1-1.2.18/src/templates.c +2091 -0
- data/vendor/xmlsec1-1.2.18/src/transforms.c +2902 -0
- data/vendor/xmlsec1-1.2.18/src/x509.c +97 -0
- data/vendor/xmlsec1-1.2.18/src/xkms.c +4981 -0
- data/vendor/xmlsec1-1.2.18/src/xmldsig.c +1795 -0
- data/vendor/xmlsec1-1.2.18/src/xmlenc.c +1339 -0
- data/vendor/xmlsec1-1.2.18/src/xmlsec.c +185 -0
- data/vendor/xmlsec1-1.2.18/src/xmltree.c +1908 -0
- data/vendor/xmlsec1-1.2.18/src/xpath.c +1148 -0
- data/vendor/xmlsec1-1.2.18/src/xslt.c +617 -0
- data/vendor/xmlsec1-1.2.18/tests/01-phaos-xmlenc-3/Readme.txt +52 -0
- data/vendor/xmlsec1-1.2.18/tests/01-phaos-xmlenc-3/bad-alg-enc-element-aes128-kw-3des.xml +29 -0
- data/vendor/xmlsec1-1.2.18/tests/01-phaos-xmlenc-3/dh-priv-key.der +0 -0
- data/vendor/xmlsec1-1.2.18/tests/01-phaos-xmlenc-3/enc-content-3des-kw-aes192.data +9 -0
- data/vendor/xmlsec1-1.2.18/tests/01-phaos-xmlenc-3/enc-content-3des-kw-aes192.tmpl +22 -0
- data/vendor/xmlsec1-1.2.18/tests/01-phaos-xmlenc-3/enc-content-3des-kw-aes192.xml +30 -0
- data/vendor/xmlsec1-1.2.18/tests/01-phaos-xmlenc-3/enc-content-aes128-kw-3des.data +9 -0
- data/vendor/xmlsec1-1.2.18/tests/01-phaos-xmlenc-3/enc-content-aes128-kw-3des.tmpl +22 -0
- data/vendor/xmlsec1-1.2.18/tests/01-phaos-xmlenc-3/enc-content-aes128-kw-3des.xml +30 -0
- data/vendor/xmlsec1-1.2.18/tests/01-phaos-xmlenc-3/enc-content-aes192-kw-aes256.data +9 -0
- data/vendor/xmlsec1-1.2.18/tests/01-phaos-xmlenc-3/enc-content-aes192-kw-aes256.tmpl +22 -0
- data/vendor/xmlsec1-1.2.18/tests/01-phaos-xmlenc-3/enc-content-aes192-kw-aes256.xml +30 -0
- data/vendor/xmlsec1-1.2.18/tests/01-phaos-xmlenc-3/enc-content-aes256-kt-rsa1_5.data +9 -0
- data/vendor/xmlsec1-1.2.18/tests/01-phaos-xmlenc-3/enc-content-aes256-kt-rsa1_5.tmpl +24 -0
- data/vendor/xmlsec1-1.2.18/tests/01-phaos-xmlenc-3/enc-content-aes256-kt-rsa1_5.xml +63 -0
- data/vendor/xmlsec1-1.2.18/tests/01-phaos-xmlenc-3/enc-element-3des-ka-dh.xml +83 -0
- data/vendor/xmlsec1-1.2.18/tests/01-phaos-xmlenc-3/enc-element-3des-kt-rsa1_5.data +9 -0
- data/vendor/xmlsec1-1.2.18/tests/01-phaos-xmlenc-3/enc-element-3des-kt-rsa1_5.tmpl +23 -0
- data/vendor/xmlsec1-1.2.18/tests/01-phaos-xmlenc-3/enc-element-3des-kt-rsa1_5.xml +61 -0
- data/vendor/xmlsec1-1.2.18/tests/01-phaos-xmlenc-3/enc-element-3des-kt-rsa_oaep_sha1.data +9 -0
- data/vendor/xmlsec1-1.2.18/tests/01-phaos-xmlenc-3/enc-element-3des-kt-rsa_oaep_sha1.tmpl +22 -0
- data/vendor/xmlsec1-1.2.18/tests/01-phaos-xmlenc-3/enc-element-3des-kt-rsa_oaep_sha1.xml +63 -0
- data/vendor/xmlsec1-1.2.18/tests/01-phaos-xmlenc-3/enc-element-3des-kt-rsa_oaep_sha256.xml +63 -0
- data/vendor/xmlsec1-1.2.18/tests/01-phaos-xmlenc-3/enc-element-3des-kt-rsa_oaep_sha512.xml +63 -0
- data/vendor/xmlsec1-1.2.18/tests/01-phaos-xmlenc-3/enc-element-3des-kw-3des.data +9 -0
- data/vendor/xmlsec1-1.2.18/tests/01-phaos-xmlenc-3/enc-element-3des-kw-3des.tmpl +22 -0
- data/vendor/xmlsec1-1.2.18/tests/01-phaos-xmlenc-3/enc-element-3des-kw-3des.xml +29 -0
- data/vendor/xmlsec1-1.2.18/tests/01-phaos-xmlenc-3/enc-element-aes128-ka-dh.xml +83 -0
- data/vendor/xmlsec1-1.2.18/tests/01-phaos-xmlenc-3/enc-element-aes128-kt-rsa1_5.data +9 -0
- data/vendor/xmlsec1-1.2.18/tests/01-phaos-xmlenc-3/enc-element-aes128-kt-rsa1_5.tmpl +20 -0
- data/vendor/xmlsec1-1.2.18/tests/01-phaos-xmlenc-3/enc-element-aes128-kt-rsa1_5.xml +61 -0
- data/vendor/xmlsec1-1.2.18/tests/01-phaos-xmlenc-3/enc-element-aes128-kt-rsa_oaep_sha1.data +9 -0
- data/vendor/xmlsec1-1.2.18/tests/01-phaos-xmlenc-3/enc-element-aes128-kt-rsa_oaep_sha1.tmpl +22 -0
- data/vendor/xmlsec1-1.2.18/tests/01-phaos-xmlenc-3/enc-element-aes128-kt-rsa_oaep_sha1.xml +63 -0
- data/vendor/xmlsec1-1.2.18/tests/01-phaos-xmlenc-3/enc-element-aes128-kw-aes128.data +9 -0
- data/vendor/xmlsec1-1.2.18/tests/01-phaos-xmlenc-3/enc-element-aes128-kw-aes128.tmpl +22 -0
- data/vendor/xmlsec1-1.2.18/tests/01-phaos-xmlenc-3/enc-element-aes128-kw-aes128.xml +29 -0
- data/vendor/xmlsec1-1.2.18/tests/01-phaos-xmlenc-3/enc-element-aes128-kw-aes256.data +9 -0
- data/vendor/xmlsec1-1.2.18/tests/01-phaos-xmlenc-3/enc-element-aes128-kw-aes256.tmpl +22 -0
- data/vendor/xmlsec1-1.2.18/tests/01-phaos-xmlenc-3/enc-element-aes128-kw-aes256.xml +29 -0
- data/vendor/xmlsec1-1.2.18/tests/01-phaos-xmlenc-3/enc-element-aes192-ka-dh.xml +83 -0
- data/vendor/xmlsec1-1.2.18/tests/01-phaos-xmlenc-3/enc-element-aes192-kt-rsa_oaep_sha1.data +9 -0
- data/vendor/xmlsec1-1.2.18/tests/01-phaos-xmlenc-3/enc-element-aes192-kt-rsa_oaep_sha1.tmpl +22 -0
- data/vendor/xmlsec1-1.2.18/tests/01-phaos-xmlenc-3/enc-element-aes192-kt-rsa_oaep_sha1.xml +63 -0
- data/vendor/xmlsec1-1.2.18/tests/01-phaos-xmlenc-3/enc-element-aes192-kw-aes192.data +9 -0
- data/vendor/xmlsec1-1.2.18/tests/01-phaos-xmlenc-3/enc-element-aes192-kw-aes192.tmpl +22 -0
- data/vendor/xmlsec1-1.2.18/tests/01-phaos-xmlenc-3/enc-element-aes192-kw-aes192.xml +29 -0
- data/vendor/xmlsec1-1.2.18/tests/01-phaos-xmlenc-3/enc-element-aes256-ka-dh.xml +83 -0
- data/vendor/xmlsec1-1.2.18/tests/01-phaos-xmlenc-3/enc-element-aes256-kw-aes256.data +9 -0
- data/vendor/xmlsec1-1.2.18/tests/01-phaos-xmlenc-3/enc-element-aes256-kw-aes256.tmpl +22 -0
- data/vendor/xmlsec1-1.2.18/tests/01-phaos-xmlenc-3/enc-element-aes256-kw-aes256.xml +29 -0
- data/vendor/xmlsec1-1.2.18/tests/01-phaos-xmlenc-3/enc-text-3des-kw-aes256.data +9 -0
- data/vendor/xmlsec1-1.2.18/tests/01-phaos-xmlenc-3/enc-text-3des-kw-aes256.tmpl +23 -0
- data/vendor/xmlsec1-1.2.18/tests/01-phaos-xmlenc-3/enc-text-3des-kw-aes256.xml +32 -0
- data/vendor/xmlsec1-1.2.18/tests/01-phaos-xmlenc-3/enc-text-aes128-kw-aes192.data +9 -0
- data/vendor/xmlsec1-1.2.18/tests/01-phaos-xmlenc-3/enc-text-aes128-kw-aes192.tmpl +21 -0
- data/vendor/xmlsec1-1.2.18/tests/01-phaos-xmlenc-3/enc-text-aes128-kw-aes192.xml +28 -0
- data/vendor/xmlsec1-1.2.18/tests/01-phaos-xmlenc-3/enc-text-aes192-kt-rsa1_5.data +9 -0
- data/vendor/xmlsec1-1.2.18/tests/01-phaos-xmlenc-3/enc-text-aes192-kt-rsa1_5.tmpl +20 -0
- data/vendor/xmlsec1-1.2.18/tests/01-phaos-xmlenc-3/enc-text-aes192-kt-rsa1_5.xml +62 -0
- data/vendor/xmlsec1-1.2.18/tests/01-phaos-xmlenc-3/enc-text-aes256-kt-rsa_oaep_sha1.data +9 -0
- data/vendor/xmlsec1-1.2.18/tests/01-phaos-xmlenc-3/enc-text-aes256-kt-rsa_oaep_sha1.tmpl +22 -0
- data/vendor/xmlsec1-1.2.18/tests/01-phaos-xmlenc-3/enc-text-aes256-kt-rsa_oaep_sha1.xml +64 -0
- data/vendor/xmlsec1-1.2.18/tests/01-phaos-xmlenc-3/key.txt +117 -0
- data/vendor/xmlsec1-1.2.18/tests/01-phaos-xmlenc-3/keys.xml +61 -0
- data/vendor/xmlsec1-1.2.18/tests/01-phaos-xmlenc-3/payment.xml +9 -0
- data/vendor/xmlsec1-1.2.18/tests/01-phaos-xmlenc-3/rsa-priv-key.der +0 -0
- data/vendor/xmlsec1-1.2.18/tests/01-phaos-xmlenc-3/rsa-priv-key.p12 +0 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xkms-01/bad-request-name-not-supported.xml +2 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xkms-01/bad-request-name.xml +10 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xkms-01/compound-example-1-no-match.xml +7 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xkms-01/compound-example-1.xml +51 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xkms-01/keys/cert1.der +0 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xkms-01/keys/cert1.pem +26 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xkms-01/keys/cert2.der +0 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xkms-01/keys/cert2.pem +25 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xkms-01/keys/cert3.der +0 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xkms-01/keys/cert3.pem +24 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xkms-01/keys/create-keys.sh +73 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xkms-01/keys/key1-pk8.der +0 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xkms-01/keys/key1.der +0 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xkms-01/keys/key1.p12 +0 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xkms-01/keys/key1.pem +18 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xkms-01/keys/key2-pk8.der +0 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xkms-01/keys/key2.der +0 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xkms-01/keys/key2.p12 +0 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xkms-01/keys/key2.pem +9 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xkms-01/keys/key3-pk8.der +0 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xkms-01/keys/key3.der +0 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xkms-01/keys/key3.p12 +0 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xkms-01/keys/key3.pem +9 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xkms-01/keys/openssl.cnf +106 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xkms-01/keys/req2.pem +11 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xkms-01/keys/req3.pem +11 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xkms-01/locate-example-1-bad-service.xml +2 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xkms-01/locate-example-1-no-match.xml +2 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xkms-01/locate-example-1.xml +18 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xkms-01/locate-example-2-no-match.xml +2 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xkms-01/locate-example-2.xml +39 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xkms-01/locate-opaque-client-data-no-match.xml +2 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xkms-01/locate-opaque-client-data.xml +32 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xkms-01/readme.txt +117 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xkms-01/soap11-bad-request-name-msg-invalid.xml +9 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xkms-01/soap11-bad-request-name.xml +14 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xkms-01/soap11-locate-example-1-no-match.xml +6 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xkms-01/soap11-locate-example-1-unsupported.xml +13 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xkms-01/soap11-locate-example-1.xml +23 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xkms-01/soap12-bad-request-name-msg-invalid.xml +11 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xkms-01/soap12-bad-request-name.xml +14 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xkms-01/soap12-locate-example-1-no-match.xml +6 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xkms-01/soap12-locate-example-1-unsupported.xml +9 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xkms-01/soap12-locate-example-1.xml +23 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xkms-01/status-request-success.xml +2 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xkms-01/status-request.xml +7 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xkms-01/validate-example-1-no-match.xml +2 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xkms-01/validate-example-1.xml +65 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xmldsig-01/README +47 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xmldsig-01/dtd-hmac-91.dtd +1 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xmldsig-01/dtd-hmac-91.tmpl +27 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xmldsig-01/dtd-hmac-91.xml +27 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xmldsig-01/enveloped-gost.tmpl +31 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xmldsig-01/enveloped-gost.xml +42 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xmldsig-01/enveloping-dsa-x509chain.tmpl +18 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xmldsig-01/enveloping-dsa-x509chain.xml +87 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xmldsig-01/enveloping-expired-cert.tmpl +18 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xmldsig-01/enveloping-expired-cert.xml +85 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xmldsig-01/enveloping-md5-hmac-md5-64.tmpl +16 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xmldsig-01/enveloping-md5-hmac-md5-64.xml +15 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xmldsig-01/enveloping-md5-hmac-md5.tmpl +14 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xmldsig-01/enveloping-md5-hmac-md5.xml +13 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xmldsig-01/enveloping-md5-rsa-md5.tmpl +17 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xmldsig-01/enveloping-md5-rsa-md5.xml +85 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xmldsig-01/enveloping-ripemd160-hmac-ripemd160-64.tmpl +16 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xmldsig-01/enveloping-ripemd160-hmac-ripemd160-64.xml +15 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xmldsig-01/enveloping-ripemd160-hmac-ripemd160.tmpl +14 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xmldsig-01/enveloping-ripemd160-hmac-ripemd160.xml +13 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xmldsig-01/enveloping-ripemd160-rsa-ripemd160.tmpl +17 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xmldsig-01/enveloping-ripemd160-rsa-ripemd160.xml +85 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xmldsig-01/enveloping-rsa-x509chain.tmpl +18 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xmldsig-01/enveloping-rsa-x509chain.xml +85 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xmldsig-01/enveloping-sha1-hmac-sha1-64.tmpl +16 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xmldsig-01/enveloping-sha1-hmac-sha1-64.xml +15 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xmldsig-01/enveloping-sha1-hmac-sha1.tmpl +14 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xmldsig-01/enveloping-sha1-hmac-sha1.xml +13 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xmldsig-01/enveloping-sha1-rsa-sha1.tmpl +17 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xmldsig-01/enveloping-sha1-rsa-sha1.xml +85 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xmldsig-01/enveloping-sha224-hmac-sha224-64.tmpl +16 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xmldsig-01/enveloping-sha224-hmac-sha224-64.xml +15 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xmldsig-01/enveloping-sha224-hmac-sha224.tmpl +14 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xmldsig-01/enveloping-sha224-hmac-sha224.xml +13 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xmldsig-01/enveloping-sha224-rsa-sha224.tmpl +17 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xmldsig-01/enveloping-sha224-rsa-sha224.xml +85 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xmldsig-01/enveloping-sha256-hmac-sha256-64.tmpl +16 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xmldsig-01/enveloping-sha256-hmac-sha256-64.xml +15 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xmldsig-01/enveloping-sha256-hmac-sha256.tmpl +14 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xmldsig-01/enveloping-sha256-hmac-sha256.xml +13 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xmldsig-01/enveloping-sha256-rsa-sha256.tmpl +17 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xmldsig-01/enveloping-sha256-rsa-sha256.xml +85 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xmldsig-01/enveloping-sha384-hmac-sha384-64.tmpl +16 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xmldsig-01/enveloping-sha384-hmac-sha384-64.xml +15 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xmldsig-01/enveloping-sha384-hmac-sha384.tmpl +14 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xmldsig-01/enveloping-sha384-hmac-sha384.xml +13 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xmldsig-01/enveloping-sha384-rsa-sha384.tmpl +17 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xmldsig-01/enveloping-sha384-rsa-sha384.xml +103 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xmldsig-01/enveloping-sha512-hmac-sha512-64.tmpl +16 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xmldsig-01/enveloping-sha512-hmac-sha512-64.xml +16 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xmldsig-01/enveloping-sha512-hmac-sha512.tmpl +14 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xmldsig-01/enveloping-sha512-hmac-sha512.xml +15 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xmldsig-01/enveloping-sha512-rsa-sha512.tmpl +17 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xmldsig-01/enveloping-sha512-rsa-sha512.xml +104 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xmldsig-01/x509data-sn-test.tmpl +27 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xmldsig-01/x509data-sn-test.xml +40 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xmldsig-01/x509data-test.tmpl +31 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xmldsig-01/x509data-test.xml +117 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xmldsig-01/xpointer-hmac.tmpl +29 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xmldsig-01/xpointer-hmac.xml +28 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xmlenc-01/enc-aes128cbc-keyname.data +1 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xmlenc-01/enc-aes128cbc-keyname.tmpl +11 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xmlenc-01/enc-aes128cbc-keyname.xml +12 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xmlenc-01/enc-aes192cbc-keyname-ref.data +1 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xmlenc-01/enc-aes192cbc-keyname-ref.xml +21 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xmlenc-01/enc-aes192cbc-keyname.data +1 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xmlenc-01/enc-aes192cbc-keyname.tmpl +11 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xmlenc-01/enc-aes192cbc-keyname.xml +12 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xmlenc-01/enc-aes256cbc-keyname.data +1 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xmlenc-01/enc-aes256cbc-keyname.tmpl +10 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xmlenc-01/enc-aes256cbc-keyname.xml +12 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xmlenc-01/enc-des3cbc-aes192-keyname.data +1 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xmlenc-01/enc-des3cbc-aes192-keyname.tmpl +16 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xmlenc-01/enc-des3cbc-aes192-keyname.xml +18 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xmlenc-01/enc-des3cbc-keyname-content.data +7 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xmlenc-01/enc-des3cbc-keyname-content.tmpl +11 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xmlenc-01/enc-des3cbc-keyname-content.xml +15 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xmlenc-01/enc-des3cbc-keyname-element-root.data +7 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xmlenc-01/enc-des3cbc-keyname-element-root.tmpl +11 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xmlenc-01/enc-des3cbc-keyname-element-root.xml +15 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xmlenc-01/enc-des3cbc-keyname-element.data +9 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xmlenc-01/enc-des3cbc-keyname-element.tmpl +11 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xmlenc-01/enc-des3cbc-keyname-element.xml +17 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xmlenc-01/enc-des3cbc-keyname.data +1 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xmlenc-01/enc-des3cbc-keyname.tmpl +8 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xmlenc-01/enc-des3cbc-keyname.xml +8 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xmlenc-01/enc-des3cbc-keyname2.data +1 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xmlenc-01/enc-des3cbc-keyname2.tmpl +10 -0
- data/vendor/xmlsec1-1.2.18/tests/aleksey-xmlenc-01/enc-des3cbc-keyname2.xml +12 -0
- data/vendor/xmlsec1-1.2.18/tests/keys/README +203 -0
- data/vendor/xmlsec1-1.2.18/tests/keys/ca2cert.der +0 -0
- data/vendor/xmlsec1-1.2.18/tests/keys/ca2cert.pem +66 -0
- data/vendor/xmlsec1-1.2.18/tests/keys/ca2key.pem +9 -0
- data/vendor/xmlsec1-1.2.18/tests/keys/cacert.der +0 -0
- data/vendor/xmlsec1-1.2.18/tests/keys/cacert.pem +72 -0
- data/vendor/xmlsec1-1.2.18/tests/keys/cakey.pem +18 -0
- data/vendor/xmlsec1-1.2.18/tests/keys/demoCA/cacert.pem +72 -0
- data/vendor/xmlsec1-1.2.18/tests/keys/demoCA/careq.pem +14 -0
- data/vendor/xmlsec1-1.2.18/tests/keys/demoCA/index.txt +6 -0
- data/vendor/xmlsec1-1.2.18/tests/keys/demoCA/newcerts/01.pem +65 -0
- data/vendor/xmlsec1-1.2.18/tests/keys/demoCA/newcerts/02.pem +93 -0
- data/vendor/xmlsec1-1.2.18/tests/keys/demoCA/newcerts/03.pem +60 -0
- data/vendor/xmlsec1-1.2.18/tests/keys/demoCA/newcerts/04.pem +60 -0
- data/vendor/xmlsec1-1.2.18/tests/keys/demoCA/newcerts/05.pem +83 -0
- data/vendor/xmlsec1-1.2.18/tests/keys/demoCA/private/cakey.pem +18 -0
- data/vendor/xmlsec1-1.2.18/tests/keys/demoCA/serial +1 -0
- data/vendor/xmlsec1-1.2.18/tests/keys/dsacert.der +0 -0
- data/vendor/xmlsec1-1.2.18/tests/keys/dsacert.pem +78 -0
- data/vendor/xmlsec1-1.2.18/tests/keys/dsakey.der +0 -0
- data/vendor/xmlsec1-1.2.18/tests/keys/dsakey.p12 +0 -0
- data/vendor/xmlsec1-1.2.18/tests/keys/dsakey.p8-der +0 -0
- data/vendor/xmlsec1-1.2.18/tests/keys/dsakey.p8-pem +8 -0
- data/vendor/xmlsec1-1.2.18/tests/keys/dsakey.pem +14 -0
- data/vendor/xmlsec1-1.2.18/tests/keys/expiredcert.der +0 -0
- data/vendor/xmlsec1-1.2.18/tests/keys/expiredcert.pem +61 -0
- data/vendor/xmlsec1-1.2.18/tests/keys/expiredkey.der +0 -0
- data/vendor/xmlsec1-1.2.18/tests/keys/expiredkey.p12 +0 -0
- data/vendor/xmlsec1-1.2.18/tests/keys/expiredkey.pem +9 -0
- data/vendor/xmlsec1-1.2.18/tests/keys/expiredreq.pem +11 -0
- data/vendor/xmlsec1-1.2.18/tests/keys/gost2001ca.der +0 -0
- data/vendor/xmlsec1-1.2.18/tests/keys/gost2001ca.pem +13 -0
- data/vendor/xmlsec1-1.2.18/tests/keys/hmackey.bin +1 -0
- data/vendor/xmlsec1-1.2.18/tests/keys/keys.xml +83 -0
- data/vendor/xmlsec1-1.2.18/tests/keys/largersacert.der +0 -0
- data/vendor/xmlsec1-1.2.18/tests/keys/largersacert.pem +100 -0
- data/vendor/xmlsec1-1.2.18/tests/keys/largersakey-win.p12 +0 -0
- data/vendor/xmlsec1-1.2.18/tests/keys/largersakey-winxp.p12 +0 -0
- data/vendor/xmlsec1-1.2.18/tests/keys/largersakey.der +0 -0
- data/vendor/xmlsec1-1.2.18/tests/keys/largersakey.p12 +0 -0
- data/vendor/xmlsec1-1.2.18/tests/keys/largersakey.p8-der +0 -0
- data/vendor/xmlsec1-1.2.18/tests/keys/largersakey.p8-pem +53 -0
- data/vendor/xmlsec1-1.2.18/tests/keys/largersakey.pem +51 -0
- data/vendor/xmlsec1-1.2.18/tests/keys/largersareq.pem +30 -0
- data/vendor/xmlsec1-1.2.18/tests/keys/merlincert.pem +20 -0
- data/vendor/xmlsec1-1.2.18/tests/keys/openssl.cnf +316 -0
- data/vendor/xmlsec1-1.2.18/tests/keys/rsacert.der +0 -0
- data/vendor/xmlsec1-1.2.18/tests/keys/rsacert.pem +61 -0
- data/vendor/xmlsec1-1.2.18/tests/keys/rsakey-win.p12 +0 -0
- data/vendor/xmlsec1-1.2.18/tests/keys/rsakey-winxp.p12 +0 -0
- data/vendor/xmlsec1-1.2.18/tests/keys/rsakey.der +0 -0
- data/vendor/xmlsec1-1.2.18/tests/keys/rsakey.p12 +0 -0
- data/vendor/xmlsec1-1.2.18/tests/keys/rsakey.p8-der +0 -0
- data/vendor/xmlsec1-1.2.18/tests/keys/rsakey.p8-pem +11 -0
- data/vendor/xmlsec1-1.2.18/tests/keys/rsakey.pem +9 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-c14n-three/Readme.txt +20 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-c14n-three/c14n-0.txt +15 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-c14n-three/c14n-1.txt +15 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-c14n-three/c14n-10.txt +15 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-c14n-three/c14n-11.txt +15 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-c14n-three/c14n-12.txt +15 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-c14n-three/c14n-13.txt +15 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-c14n-three/c14n-14.txt +15 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-c14n-three/c14n-15.txt +0 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-c14n-three/c14n-16.txt +0 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-c14n-three/c14n-17.txt +15 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-c14n-three/c14n-18.txt +15 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-c14n-three/c14n-19.txt +15 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-c14n-three/c14n-2.txt +15 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-c14n-three/c14n-20.txt +15 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-c14n-three/c14n-21.txt +15 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-c14n-three/c14n-22.txt +15 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-c14n-three/c14n-23.txt +15 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-c14n-three/c14n-24.txt +1 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-c14n-three/c14n-25.txt +0 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-c14n-three/c14n-26.txt +15 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-c14n-three/c14n-27.txt +430 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-c14n-three/c14n-3.txt +15 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-c14n-three/c14n-4.txt +15 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-c14n-three/c14n-5.txt +15 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-c14n-three/c14n-6.txt +1 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-c14n-three/c14n-7.txt +1 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-c14n-three/c14n-8.txt +15 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-c14n-three/c14n-9.txt +15 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-c14n-three/signature.xml +526 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-exc-c14n-one/Readme.txt +3 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-exc-c14n-one/exc-signature.tmpl +52 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-exc-c14n-one/exc-signature.xml +73 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmldsig-twenty-three/Readme.txt +63 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmldsig-twenty-three/certs/badb.der +0 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmldsig-twenty-three/certs/badb.pem +20 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmldsig-twenty-three/certs/balor.der +0 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmldsig-twenty-three/certs/balor.pem +20 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmldsig-twenty-three/certs/bres.pem +20 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmldsig-twenty-three/certs/ca.der +0 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmldsig-twenty-three/certs/ca.pem +20 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmldsig-twenty-three/certs/lugh-cert.der +0 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmldsig-twenty-three/certs/lugh-cert.pem +20 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmldsig-twenty-three/certs/lugh.der +0 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmldsig-twenty-three/certs/lugh.pem +12 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmldsig-twenty-three/certs/macha.der +0 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmldsig-twenty-three/certs/macha.pem +20 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmldsig-twenty-three/certs/merlin.der +0 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmldsig-twenty-three/certs/merlin.pem +21 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmldsig-twenty-three/certs/morigu.pem +20 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmldsig-twenty-three/certs/nemain.der +0 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmldsig-twenty-three/certs/nemain.pem +20 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmldsig-twenty-three/signature-enveloped-dsa.tmpl +22 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmldsig-twenty-three/signature-enveloped-dsa.xml +43 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmldsig-twenty-three/signature-enveloping-b64-dsa.tmpl +21 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmldsig-twenty-three/signature-enveloping-b64-dsa.xml +42 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmldsig-twenty-three/signature-enveloping-dsa.tmpl +18 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmldsig-twenty-three/signature-enveloping-dsa.xml +39 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmldsig-twenty-three/signature-enveloping-hmac-sha1-40.tmpl +16 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmldsig-twenty-three/signature-enveloping-hmac-sha1-40.xml +17 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmldsig-twenty-three/signature-enveloping-hmac-sha1.tmpl +14 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmldsig-twenty-three/signature-enveloping-hmac-sha1.xml +15 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmldsig-twenty-three/signature-enveloping-rsa.tmpl +18 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmldsig-twenty-three/signature-enveloping-rsa.xml +31 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmldsig-twenty-three/signature-external-b64-dsa.tmpl +20 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmldsig-twenty-three/signature-external-b64-dsa.xml +41 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmldsig-twenty-three/signature-external-dsa.tmpl +17 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmldsig-twenty-three/signature-external-dsa.xml +38 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmldsig-twenty-three/signature-keyname.tmpl +16 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmldsig-twenty-three/signature-keyname.xml +17 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmldsig-twenty-three/signature-retrievalmethod-rawx509crt.tmpl +16 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmldsig-twenty-three/signature-retrievalmethod-rawx509crt.xml +17 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmldsig-twenty-three/signature-x509-crt-crl.tmpl +17 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmldsig-twenty-three/signature-x509-crt-crl.xml +47 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmldsig-twenty-three/signature-x509-crt.tmpl +17 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmldsig-twenty-three/signature-x509-crt.xml +38 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmldsig-twenty-three/signature-x509-is.tmpl +17 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmldsig-twenty-three/signature-x509-is.xml +24 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmldsig-twenty-three/signature-x509-ski.tmpl +17 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmldsig-twenty-three/signature-x509-ski.xml +21 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmldsig-twenty-three/signature-x509-sn.tmpl +17 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmldsig-twenty-three/signature-x509-sn.xml +21 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmldsig-twenty-three/signature.tmpl +245 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmldsig-twenty-three/signature.xml +269 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmlenc-five/Readme.txt +117 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmlenc-five/bad-encrypt-content-aes128-cbc-kw-aes192.xml +42 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmlenc-five/decryption-transform-except.xml +83 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmlenc-five/decryption-transform.xml +73 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmlenc-five/dh0.p8 +0 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmlenc-five/dh1.p8 +0 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmlenc-five/dsa.p8 +0 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmlenc-five/encrypt-content-aes128-cbc-kw-aes192.data +27 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmlenc-five/encrypt-content-aes128-cbc-kw-aes192.tmpl +20 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmlenc-five/encrypt-content-aes128-cbc-kw-aes192.xml +45 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmlenc-five/encrypt-content-aes192-cbc-dh-sha512.xml +113 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmlenc-five/encrypt-content-aes256-cbc-prop.data +27 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmlenc-five/encrypt-content-aes256-cbc-prop.tmpl +18 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmlenc-five/encrypt-content-aes256-cbc-prop.xml +42 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmlenc-five/encrypt-content-tripledes-cbc.data +27 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmlenc-five/encrypt-content-tripledes-cbc.tmpl +11 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmlenc-five/encrypt-content-tripledes-cbc.xml +35 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmlenc-five/encrypt-data-aes128-cbc.data +1 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmlenc-five/encrypt-data-aes128-cbc.tmpl +11 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmlenc-five/encrypt-data-aes128-cbc.xml +12 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmlenc-five/encrypt-data-aes192-cbc-kw-aes256.data +1 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmlenc-five/encrypt-data-aes192-cbc-kw-aes256.tmpl +20 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmlenc-five/encrypt-data-aes192-cbc-kw-aes256.xml +22 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmlenc-five/encrypt-data-aes256-cbc-kw-tripledes.data +1 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmlenc-five/encrypt-data-aes256-cbc-kw-tripledes.tmpl +20 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmlenc-five/encrypt-data-aes256-cbc-kw-tripledes.xml +22 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmlenc-five/encrypt-data-tripledes-cbc-rsa-oaep-mgf1p-sha256.xml +46 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmlenc-five/encrypt-data-tripledes-cbc-rsa-oaep-mgf1p.data +1 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmlenc-five/encrypt-data-tripledes-cbc-rsa-oaep-mgf1p.tmpl +21 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmlenc-five/encrypt-data-tripledes-cbc-rsa-oaep-mgf1p.xml +43 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmlenc-five/encrypt-element-aes128-cbc-rsa-1_5.data +27 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmlenc-five/encrypt-element-aes128-cbc-rsa-1_5.tmpl +19 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmlenc-five/encrypt-element-aes128-cbc-rsa-1_5.xml +63 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmlenc-five/encrypt-element-aes192-cbc-ref.data +36 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmlenc-five/encrypt-element-aes192-cbc-ref.xml +42 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmlenc-five/encrypt-element-aes256-cbc-carried-kw-aes256.xml +57 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmlenc-five/encrypt-element-aes256-cbc-kw-aes256-dh-ripemd160.xml +122 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmlenc-five/encrypt-element-aes256-cbc-retrieved-kw-aes256.data +40 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmlenc-five/encrypt-element-aes256-cbc-retrieved-kw-aes256.xml +47 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmlenc-five/encrypt-element-tripledes-cbc-kw-aes128.data +27 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmlenc-five/encrypt-element-tripledes-cbc-kw-aes128.tmpl +20 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmlenc-five/encrypt-element-tripledes-cbc-kw-aes128.xml +43 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmlenc-five/encsig-hmac-sha256-dh.xml +98 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmlenc-five/encsig-hmac-sha256-kw-tripledes-dh.xml +108 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmlenc-five/encsig-hmac-sha256-rsa-1_5.xml +46 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmlenc-five/encsig-hmac-sha256-rsa-oaep-mgf1p.xml +51 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmlenc-five/encsig-ripemd160-hmac-ripemd160-kw-tripledes.tmpl +25 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmlenc-five/encsig-ripemd160-hmac-ripemd160-kw-tripledes.xml +27 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmlenc-five/encsig-sha256-hmac-sha256-kw-aes128.xml +27 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmlenc-five/encsig-sha384-hmac-sha384-kw-aes192.xml +27 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmlenc-five/encsig-sha512-hmac-sha512-kw-aes256.xml +28 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmlenc-five/ids.p12 +0 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmlenc-five/keys.xml +42 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmlenc-five/plaintext.xml +24 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmlenc-five/rsa.p8 +0 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmlenc-five/rsapriv.der +0 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmlenc-five/rsapriv.p12 +0 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmlenc-five/rsapriv.p8-der +0 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmlenc-five/rsapriv.p8-pem +17 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmlenc-five/rsapriv.pem +15 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xmlenc-five/rsapub.pem +6 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xpath-filter2-three/Readme.txt +23 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xpath-filter2-three/sign-spec-c14n-0.txt +11 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xpath-filter2-three/sign-spec-c14n-1.txt +0 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xpath-filter2-three/sign-spec-c14n-2.txt +25 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xpath-filter2-three/sign-spec.tmpl +50 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xpath-filter2-three/sign-spec.xml +122 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xpath-filter2-three/sign-xfdl-c14n-0.txt +3986 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xpath-filter2-three/sign-xfdl.tmpl +4153 -0
- data/vendor/xmlsec1-1.2.18/tests/merlin-xpath-filter2-three/sign-xfdl.xml +4225 -0
- data/vendor/xmlsec1-1.2.18/tests/nss.supp +220 -0
- data/vendor/xmlsec1-1.2.18/tests/nssdb/cert8.db +0 -0
- data/vendor/xmlsec1-1.2.18/tests/nssdb/key3.db +0 -0
- data/vendor/xmlsec1-1.2.18/tests/nssdb/secmod.db +0 -0
- data/vendor/xmlsec1-1.2.18/tests/openssl.supp +63 -0
- data/vendor/xmlsec1-1.2.18/tests/phaos-xmldsig-three/README.txt +248 -0
- data/vendor/xmlsec1-1.2.18/tests/phaos-xmldsig-three/certs/crl.der +0 -0
- data/vendor/xmlsec1-1.2.18/tests/phaos-xmldsig-three/certs/dsa-ca-cert.der +0 -0
- data/vendor/xmlsec1-1.2.18/tests/phaos-xmldsig-three/certs/dsa-cert.der +0 -0
- data/vendor/xmlsec1-1.2.18/tests/phaos-xmldsig-three/certs/enc-dsa-key.der +0 -0
- data/vendor/xmlsec1-1.2.18/tests/phaos-xmldsig-three/certs/enc-rsa-key.der +0 -0
- data/vendor/xmlsec1-1.2.18/tests/phaos-xmldsig-three/certs/hmackey.bin +1 -0
- data/vendor/xmlsec1-1.2.18/tests/phaos-xmldsig-three/certs/rsa-ca-cert.der +0 -0
- data/vendor/xmlsec1-1.2.18/tests/phaos-xmldsig-three/certs/rsa-cert.der +0 -0
- data/vendor/xmlsec1-1.2.18/tests/phaos-xmldsig-three/document-stylesheet.xml +7 -0
- data/vendor/xmlsec1-1.2.18/tests/phaos-xmldsig-three/document.b64 +4 -0
- data/vendor/xmlsec1-1.2.18/tests/phaos-xmldsig-three/document.xml +6 -0
- data/vendor/xmlsec1-1.2.18/tests/phaos-xmldsig-three/document.xsl +45 -0
- data/vendor/xmlsec1-1.2.18/tests/phaos-xmldsig-three/signature-big.xml +39 -0
- data/vendor/xmlsec1-1.2.18/tests/phaos-xmldsig-three/signature-dsa-detached.xml +1 -0
- data/vendor/xmlsec1-1.2.18/tests/phaos-xmldsig-three/signature-dsa-enveloped.xml +6 -0
- data/vendor/xmlsec1-1.2.18/tests/phaos-xmldsig-three/signature-dsa-enveloping.xml +6 -0
- data/vendor/xmlsec1-1.2.18/tests/phaos-xmldsig-three/signature-dsa-manifest.xml +1 -0
- data/vendor/xmlsec1-1.2.18/tests/phaos-xmldsig-three/signature-hmac-md5-c14n-enveloping.xml +6 -0
- data/vendor/xmlsec1-1.2.18/tests/phaos-xmldsig-three/signature-hmac-sha1-40-c14n-comments-detached.xml +1 -0
- data/vendor/xmlsec1-1.2.18/tests/phaos-xmldsig-three/signature-hmac-sha1-40-exclusive-c14n-comments-detached.xml +1 -0
- data/vendor/xmlsec1-1.2.18/tests/phaos-xmldsig-three/signature-hmac-sha1-exclusive-c14n-comments-detached.xml +1 -0
- data/vendor/xmlsec1-1.2.18/tests/phaos-xmldsig-three/signature-hmac-sha1-exclusive-c14n-enveloped.xml +6 -0
- data/vendor/xmlsec1-1.2.18/tests/phaos-xmldsig-three/signature-rsa-detached-b64-transform.xml +1 -0
- data/vendor/xmlsec1-1.2.18/tests/phaos-xmldsig-three/signature-rsa-detached-xpath-transform.xml +1 -0
- data/vendor/xmlsec1-1.2.18/tests/phaos-xmldsig-three/signature-rsa-detached-xslt-transform-bad-retrieval-method.xml +6 -0
- data/vendor/xmlsec1-1.2.18/tests/phaos-xmldsig-three/signature-rsa-detached-xslt-transform-retrieval-method.xml +39 -0
- data/vendor/xmlsec1-1.2.18/tests/phaos-xmldsig-three/signature-rsa-detached-xslt-transform.xml +39 -0
- data/vendor/xmlsec1-1.2.18/tests/phaos-xmldsig-three/signature-rsa-detached.xml +1 -0
- data/vendor/xmlsec1-1.2.18/tests/phaos-xmldsig-three/signature-rsa-enveloped-bad-digest-val.xml +6 -0
- data/vendor/xmlsec1-1.2.18/tests/phaos-xmldsig-three/signature-rsa-enveloped-bad-sig.xml +6 -0
- data/vendor/xmlsec1-1.2.18/tests/phaos-xmldsig-three/signature-rsa-enveloped.xml +6 -0
- data/vendor/xmlsec1-1.2.18/tests/phaos-xmldsig-three/signature-rsa-enveloping.xml +6 -0
- data/vendor/xmlsec1-1.2.18/tests/phaos-xmldsig-three/signature-rsa-manifest-x509-data-cert-chain.xml +1 -0
- data/vendor/xmlsec1-1.2.18/tests/phaos-xmldsig-three/signature-rsa-manifest-x509-data-cert.xml +1 -0
- data/vendor/xmlsec1-1.2.18/tests/phaos-xmldsig-three/signature-rsa-manifest-x509-data-issuer-serial.xml +1 -0
- data/vendor/xmlsec1-1.2.18/tests/phaos-xmldsig-three/signature-rsa-manifest-x509-data-ski.xml +1 -0
- data/vendor/xmlsec1-1.2.18/tests/phaos-xmldsig-three/signature-rsa-manifest-x509-data-subject-name.xml +1 -0
- data/vendor/xmlsec1-1.2.18/tests/phaos-xmldsig-three/signature-rsa-manifest.xml +1 -0
- data/vendor/xmlsec1-1.2.18/tests/phaos-xmldsig-three/signature-rsa-xpath-transform-enveloped.xml +6 -0
- data/vendor/xmlsec1-1.2.18/tests/phaos-xmldsig-three/signature-rsa-~x509-data-crl.xml +1 -0
- data/vendor/xmlsec1-1.2.18/tests/testDSig.sh +875 -0
- data/vendor/xmlsec1-1.2.18/tests/testEnc.sh +411 -0
- data/vendor/xmlsec1-1.2.18/tests/testKeys.sh +69 -0
- data/vendor/xmlsec1-1.2.18/tests/testRes.sh +20 -0
- data/vendor/xmlsec1-1.2.18/tests/testXKMS.sh +129 -0
- data/vendor/xmlsec1-1.2.18/tests/testrun.sh +443 -0
- data/vendor/xmlsec1-1.2.18/tests/xmldsig2ed-tests/c14n11/xml-base-input.xml +17 -0
- data/vendor/xmlsec1-1.2.18/tests/xmldsig2ed-tests/defCan-1.tmpl +2 -0
- data/vendor/xmlsec1-1.2.18/tests/xmldsig2ed-tests/defCan-1.xml +2 -0
- data/vendor/xmlsec1-1.2.18/tests/xmldsig2ed-tests/defCan-2.tmpl +2 -0
- data/vendor/xmlsec1-1.2.18/tests/xmldsig2ed-tests/defCan-2.xml +2 -0
- data/vendor/xmlsec1-1.2.18/tests/xmldsig2ed-tests/defCan-3.tmpl +2 -0
- data/vendor/xmlsec1-1.2.18/tests/xmldsig2ed-tests/defCan-3.xml +2 -0
- data/vendor/xmlsec1-1.2.18/tests/xmldsig2ed-tests/xpointer-1-SUN.xml +21 -0
- data/vendor/xmlsec1-1.2.18/tests/xmldsig2ed-tests/xpointer-2-SUN.xml +21 -0
- data/vendor/xmlsec1-1.2.18/tests/xmldsig2ed-tests/xpointer-3-SUN.xml +21 -0
- data/vendor/xmlsec1-1.2.18/tests/xmldsig2ed-tests/xpointer-4-SUN.xml +21 -0
- data/vendor/xmlsec1-1.2.18/tests/xmldsig2ed-tests/xpointer-5-SUN.xml +21 -0
- data/vendor/xmlsec1-1.2.18/tests/xmldsig2ed-tests/xpointer-6-SUN.xml +21 -0
- data/vendor/xmlsec1-1.2.18/win32/Makefile.msvc +699 -0
- data/vendor/xmlsec1-1.2.18/win32/README.txt +168 -12
- data/vendor/xmlsec1-1.2.18/win32/configure.js +395 -0
- data/vendor/xmlsec1-1.2.18/win32/libxmlsec.def.src +25 -0
- data/vendor/xmlsec1-1.2.18/win32/mycfg.bat +21 -0
- data/vendor/xmlsec1-1.2.18/xmlsec-config.in +243 -0
- data/vendor/xmlsec1-1.2.18/xmlsec-gcrypt.pc.in +11 -0
- data/vendor/xmlsec1-1.2.18/xmlsec-gnutls.pc.in +11 -0
- data/vendor/xmlsec1-1.2.18/xmlsec-nss.pc.in +11 -0
- data/vendor/xmlsec1-1.2.18/xmlsec-openssl.pc.in +11 -0
- data/vendor/xmlsec1-1.2.18/xmlsec.pc.in +11 -0
- data/vendor/xmlsec1-1.2.18/xmlsec.spec.in +185 -0
- data/vendor/xmlsec1-1.2.18/xmlsec1-config +243 -0
- data/vendor/xmlsec1-1.2.18/xmlsec1-gcrypt.pc +11 -0
- data/vendor/xmlsec1-1.2.18/xmlsec1-gnutls.pc +11 -0
- data/vendor/xmlsec1-1.2.18/xmlsec1-nss.pc +11 -0
- data/vendor/xmlsec1-1.2.18/xmlsec1-openssl.pc +11 -0
- data/vendor/xmlsec1-1.2.18/xmlsec1.m4 +172 -0
- data/vendor/xmlsec1-1.2.18/xmlsec1.pc +11 -0
- data/vendor/xmlsec1-1.2.18/xmlsec1.spec +185 -0
- data/vendor/xmlsec1-1.2.18/xmlsec1Conf.sh +13 -0
- data/vendor/xmlsec1-1.2.18/xmlsecConf.sh.in +13 -0
- data/xmlsec-shim.gemspec +18 -0
- metadata +1014 -0
@@ -0,0 +1,1795 @@
|
|
1
|
+
/**
|
2
|
+
* XML Security Library (http://www.aleksey.com/xmlsec).
|
3
|
+
*
|
4
|
+
* "XML Digital Signature" implementation
|
5
|
+
* http://www.w3.org/TR/xmldsig-core/
|
6
|
+
* http://www.w3.org/Signature/Overview.html
|
7
|
+
*
|
8
|
+
* This is free software; see Copyright file in the source
|
9
|
+
* distribution for preciese wording.
|
10
|
+
*
|
11
|
+
* Copyright (C) 2002-2003 Aleksey Sanin <aleksey@aleksey.com>
|
12
|
+
*/
|
13
|
+
#include "globals.h"
|
14
|
+
|
15
|
+
#ifndef XMLSEC_NO_XMLDSIG
|
16
|
+
|
17
|
+
#include <stdlib.h>
|
18
|
+
#include <stdio.h>
|
19
|
+
#include <string.h>
|
20
|
+
|
21
|
+
#include <libxml/tree.h>
|
22
|
+
#include <libxml/parser.h>
|
23
|
+
|
24
|
+
#include <xmlsec/xmlsec.h>
|
25
|
+
#include <xmlsec/buffer.h>
|
26
|
+
#include <xmlsec/xmltree.h>
|
27
|
+
#include <xmlsec/keys.h>
|
28
|
+
#include <xmlsec/keysmngr.h>
|
29
|
+
#include <xmlsec/transforms.h>
|
30
|
+
#include <xmlsec/membuf.h>
|
31
|
+
#include <xmlsec/xmldsig.h>
|
32
|
+
#include <xmlsec/errors.h>
|
33
|
+
|
34
|
+
/**************************************************************************
|
35
|
+
*
|
36
|
+
* xmlSecDSigCtx
|
37
|
+
*
|
38
|
+
*************************************************************************/
|
39
|
+
static int xmlSecDSigCtxProcessSignatureNode (xmlSecDSigCtxPtr dsigCtx,
|
40
|
+
xmlNodePtr node);
|
41
|
+
static int xmlSecDSigCtxProcessSignedInfoNode (xmlSecDSigCtxPtr dsigCtx,
|
42
|
+
xmlNodePtr node);
|
43
|
+
static int xmlSecDSigCtxProcessKeyInfoNode (xmlSecDSigCtxPtr dsigCtx,
|
44
|
+
xmlNodePtr node);
|
45
|
+
static int xmlSecDSigCtxProcessObjectNode (xmlSecDSigCtxPtr dsigCtx,
|
46
|
+
xmlNodePtr node);
|
47
|
+
static int xmlSecDSigCtxProcessManifestNode (xmlSecDSigCtxPtr dsigCtx,
|
48
|
+
xmlNodePtr node);
|
49
|
+
|
50
|
+
/* The ID attribute in XMLDSig is 'Id' */
|
51
|
+
static const xmlChar* xmlSecDSigIds[] = { xmlSecAttrId, NULL };
|
52
|
+
|
53
|
+
/**
|
54
|
+
* xmlSecDSigCtxCreate:
|
55
|
+
* @keysMngr: the pointer to keys manager.
|
56
|
+
*
|
57
|
+
* Creates <dsig:Signature/> element processing context.
|
58
|
+
* The caller is responsible for destroying returned object by calling
|
59
|
+
* #xmlSecDSigCtxDestroy function.
|
60
|
+
*
|
61
|
+
* Returns: pointer to newly allocated context object or NULL if an error
|
62
|
+
* occurs.
|
63
|
+
*/
|
64
|
+
xmlSecDSigCtxPtr
|
65
|
+
xmlSecDSigCtxCreate(xmlSecKeysMngrPtr keysMngr) {
|
66
|
+
xmlSecDSigCtxPtr dsigCtx;
|
67
|
+
int ret;
|
68
|
+
|
69
|
+
dsigCtx = (xmlSecDSigCtxPtr) xmlMalloc(sizeof(xmlSecDSigCtx));
|
70
|
+
if(dsigCtx == NULL) {
|
71
|
+
xmlSecError(XMLSEC_ERRORS_HERE,
|
72
|
+
NULL,
|
73
|
+
NULL,
|
74
|
+
XMLSEC_ERRORS_R_MALLOC_FAILED,
|
75
|
+
"sizeof(xmlSecDSigCtx)=%d",
|
76
|
+
sizeof(xmlSecDSigCtx));
|
77
|
+
return(NULL);
|
78
|
+
}
|
79
|
+
|
80
|
+
ret = xmlSecDSigCtxInitialize(dsigCtx, keysMngr);
|
81
|
+
if(ret < 0) {
|
82
|
+
xmlSecError(XMLSEC_ERRORS_HERE,
|
83
|
+
NULL,
|
84
|
+
"xmlSecDSigCtxInitialize",
|
85
|
+
XMLSEC_ERRORS_R_XMLSEC_FAILED,
|
86
|
+
XMLSEC_ERRORS_NO_MESSAGE);
|
87
|
+
xmlSecDSigCtxDestroy(dsigCtx);
|
88
|
+
return(NULL);
|
89
|
+
}
|
90
|
+
return(dsigCtx);
|
91
|
+
}
|
92
|
+
|
93
|
+
/**
|
94
|
+
* xmlSecDSigCtxDestroy:
|
95
|
+
* @dsigCtx: the pointer to <dsig:Signature/> processing context.
|
96
|
+
*
|
97
|
+
* Destroy context object created with #xmlSecDSigCtxCreate function.
|
98
|
+
*/
|
99
|
+
void
|
100
|
+
xmlSecDSigCtxDestroy(xmlSecDSigCtxPtr dsigCtx) {
|
101
|
+
xmlSecAssert(dsigCtx != NULL);
|
102
|
+
|
103
|
+
xmlSecDSigCtxFinalize(dsigCtx);
|
104
|
+
xmlFree(dsigCtx);
|
105
|
+
}
|
106
|
+
|
107
|
+
/**
|
108
|
+
* xmlSecDSigCtxInitialize:
|
109
|
+
* @dsigCtx: the pointer to <dsig:Signature/> processing context.
|
110
|
+
* @keysMngr: the pointer to keys manager.
|
111
|
+
*
|
112
|
+
* Initializes <dsig:Signature/> element processing context.
|
113
|
+
* The caller is responsible for cleaning up returned object by calling
|
114
|
+
* #xmlSecDSigCtxFinalize function.
|
115
|
+
*
|
116
|
+
* Returns: 0 on success or a negative value if an error occurs.
|
117
|
+
*/
|
118
|
+
int
|
119
|
+
xmlSecDSigCtxInitialize(xmlSecDSigCtxPtr dsigCtx, xmlSecKeysMngrPtr keysMngr) {
|
120
|
+
int ret;
|
121
|
+
|
122
|
+
xmlSecAssert2(dsigCtx != NULL, -1);
|
123
|
+
|
124
|
+
memset(dsigCtx, 0, sizeof(xmlSecDSigCtx));
|
125
|
+
|
126
|
+
/* initialize key info */
|
127
|
+
ret = xmlSecKeyInfoCtxInitialize(&(dsigCtx->keyInfoReadCtx), keysMngr);
|
128
|
+
if(ret < 0) {
|
129
|
+
xmlSecError(XMLSEC_ERRORS_HERE,
|
130
|
+
NULL,
|
131
|
+
"xmlSecKeyInfoCtxInitialize",
|
132
|
+
XMLSEC_ERRORS_R_XMLSEC_FAILED,
|
133
|
+
XMLSEC_ERRORS_NO_MESSAGE);
|
134
|
+
return(-1);
|
135
|
+
}
|
136
|
+
dsigCtx->keyInfoReadCtx.mode = xmlSecKeyInfoModeRead;
|
137
|
+
|
138
|
+
ret = xmlSecKeyInfoCtxInitialize(&(dsigCtx->keyInfoWriteCtx), keysMngr);
|
139
|
+
if(ret < 0) {
|
140
|
+
xmlSecError(XMLSEC_ERRORS_HERE,
|
141
|
+
NULL,
|
142
|
+
"xmlSecKeyInfoCtxInitialize",
|
143
|
+
XMLSEC_ERRORS_R_XMLSEC_FAILED,
|
144
|
+
XMLSEC_ERRORS_NO_MESSAGE);
|
145
|
+
return(-1);
|
146
|
+
}
|
147
|
+
dsigCtx->keyInfoWriteCtx.mode = xmlSecKeyInfoModeWrite;
|
148
|
+
/* it's not wise to write private key :) */
|
149
|
+
dsigCtx->keyInfoWriteCtx.keyReq.keyType = xmlSecKeyDataTypePublic;
|
150
|
+
|
151
|
+
/* initializes transforms dsigCtx */
|
152
|
+
ret = xmlSecTransformCtxInitialize(&(dsigCtx->transformCtx));
|
153
|
+
if(ret < 0) {
|
154
|
+
xmlSecError(XMLSEC_ERRORS_HERE,
|
155
|
+
NULL,
|
156
|
+
"xmlSecTransformCtxInitialize",
|
157
|
+
XMLSEC_ERRORS_R_XMLSEC_FAILED,
|
158
|
+
XMLSEC_ERRORS_NO_MESSAGE);
|
159
|
+
return(-1);
|
160
|
+
}
|
161
|
+
|
162
|
+
/* references lists from SignedInfo and Manifest elements */
|
163
|
+
xmlSecPtrListInitialize(&(dsigCtx->signedInfoReferences),
|
164
|
+
xmlSecDSigReferenceCtxListId);
|
165
|
+
xmlSecPtrListInitialize(&(dsigCtx->manifestReferences),
|
166
|
+
xmlSecDSigReferenceCtxListId);
|
167
|
+
|
168
|
+
dsigCtx->enabledReferenceUris = xmlSecTransformUriTypeAny;
|
169
|
+
return(0);
|
170
|
+
}
|
171
|
+
|
172
|
+
/**
|
173
|
+
* xmlSecDSigCtxFinalize:
|
174
|
+
* @dsigCtx: the pointer to <dsig:Signature/> processing context.
|
175
|
+
*
|
176
|
+
* Cleans up @dsigCtx object initialized with #xmlSecDSigCtxInitialize function.
|
177
|
+
*/
|
178
|
+
void
|
179
|
+
xmlSecDSigCtxFinalize(xmlSecDSigCtxPtr dsigCtx) {
|
180
|
+
xmlSecAssert(dsigCtx != NULL);
|
181
|
+
|
182
|
+
xmlSecTransformCtxFinalize(&(dsigCtx->transformCtx));
|
183
|
+
xmlSecKeyInfoCtxFinalize(&(dsigCtx->keyInfoReadCtx));
|
184
|
+
xmlSecKeyInfoCtxFinalize(&(dsigCtx->keyInfoWriteCtx));
|
185
|
+
xmlSecPtrListFinalize(&(dsigCtx->signedInfoReferences));
|
186
|
+
xmlSecPtrListFinalize(&(dsigCtx->manifestReferences));
|
187
|
+
|
188
|
+
if(dsigCtx->enabledReferenceTransforms != NULL) {
|
189
|
+
xmlSecPtrListDestroy(dsigCtx->enabledReferenceTransforms);
|
190
|
+
}
|
191
|
+
if(dsigCtx->signKey != NULL) {
|
192
|
+
xmlSecKeyDestroy(dsigCtx->signKey);
|
193
|
+
}
|
194
|
+
if(dsigCtx->id != NULL) {
|
195
|
+
xmlFree(dsigCtx->id);
|
196
|
+
}
|
197
|
+
memset(dsigCtx, 0, sizeof(xmlSecDSigCtx));
|
198
|
+
}
|
199
|
+
|
200
|
+
/**
|
201
|
+
* xmlSecDSigCtxEnableReferenceTransform:
|
202
|
+
* @dsigCtx: the pointer to <dsig:Signature/> processing context.
|
203
|
+
* @transformId: the transform klass.
|
204
|
+
*
|
205
|
+
* Enables @transformId for <dsig:Reference/> elements processing.
|
206
|
+
*
|
207
|
+
* Returns: 0 on success or a negative value if an error occurs.
|
208
|
+
*/
|
209
|
+
int
|
210
|
+
xmlSecDSigCtxEnableReferenceTransform(xmlSecDSigCtxPtr dsigCtx, xmlSecTransformId transformId) {
|
211
|
+
int ret;
|
212
|
+
|
213
|
+
xmlSecAssert2(dsigCtx != NULL, -1);
|
214
|
+
xmlSecAssert2(dsigCtx->result == NULL, -1);
|
215
|
+
xmlSecAssert2(transformId != xmlSecTransformIdUnknown, -1);
|
216
|
+
|
217
|
+
if(dsigCtx->enabledReferenceTransforms == NULL) {
|
218
|
+
dsigCtx->enabledReferenceTransforms = xmlSecPtrListCreate(xmlSecTransformIdListId);
|
219
|
+
if(dsigCtx->enabledReferenceTransforms == NULL) {
|
220
|
+
xmlSecError(XMLSEC_ERRORS_HERE,
|
221
|
+
NULL,
|
222
|
+
"xmlSecPtrListCreate",
|
223
|
+
XMLSEC_ERRORS_R_XMLSEC_FAILED,
|
224
|
+
XMLSEC_ERRORS_NO_MESSAGE);
|
225
|
+
return(-1);
|
226
|
+
}
|
227
|
+
}
|
228
|
+
|
229
|
+
ret = xmlSecPtrListAdd(dsigCtx->enabledReferenceTransforms, (void*)transformId);
|
230
|
+
if(ret < 0) {
|
231
|
+
xmlSecError(XMLSEC_ERRORS_HERE,
|
232
|
+
NULL,
|
233
|
+
"xmlSecPtrListAdd",
|
234
|
+
XMLSEC_ERRORS_R_XMLSEC_FAILED,
|
235
|
+
XMLSEC_ERRORS_NO_MESSAGE);
|
236
|
+
return(-1);
|
237
|
+
}
|
238
|
+
return(0);
|
239
|
+
}
|
240
|
+
|
241
|
+
/**
|
242
|
+
* xmlSecDSigCtxEnableSignatureTransform:
|
243
|
+
* @dsigCtx: the pointer to <dsig:Signature/> processing context.
|
244
|
+
* @transformId: the transform klass.
|
245
|
+
*
|
246
|
+
* Enables @transformId for <dsig:SignedInfo/> element processing.
|
247
|
+
*
|
248
|
+
* Returns: 0 on success or a negative value if an error occurs.
|
249
|
+
*/
|
250
|
+
int
|
251
|
+
xmlSecDSigCtxEnableSignatureTransform(xmlSecDSigCtxPtr dsigCtx, xmlSecTransformId transformId) {
|
252
|
+
xmlSecAssert2(dsigCtx != NULL, -1);
|
253
|
+
xmlSecAssert2(dsigCtx->result == NULL, -1);
|
254
|
+
xmlSecAssert2(transformId != xmlSecTransformIdUnknown, -1);
|
255
|
+
|
256
|
+
return(xmlSecPtrListAdd(&(dsigCtx->transformCtx.enabledTransforms), (void*)transformId));
|
257
|
+
}
|
258
|
+
|
259
|
+
/**
|
260
|
+
* xmlSecDSigCtxGetPreSignBuffer:
|
261
|
+
* @dsigCtx: the pointer to <dsig:Signature/> processing context.
|
262
|
+
*
|
263
|
+
* Gets pointer to the buffer with serialized <dsig:SignedInfo/> element
|
264
|
+
* just before signature claculation (valid if and only if
|
265
|
+
* #XMLSEC_DSIG_FLAGS_STORE_SIGNATURE context flag is set.
|
266
|
+
*
|
267
|
+
* Returns: 0 on success or a negative value if an error occurs.
|
268
|
+
*/
|
269
|
+
xmlSecBufferPtr
|
270
|
+
xmlSecDSigCtxGetPreSignBuffer(xmlSecDSigCtxPtr dsigCtx) {
|
271
|
+
xmlSecAssert2(dsigCtx != NULL, NULL);
|
272
|
+
|
273
|
+
return((dsigCtx->preSignMemBufMethod != NULL) ?
|
274
|
+
xmlSecTransformMemBufGetBuffer(dsigCtx->preSignMemBufMethod) : NULL);
|
275
|
+
}
|
276
|
+
|
277
|
+
/**
|
278
|
+
* xmlSecDSigCtxSign:
|
279
|
+
* @dsigCtx: the pointer to <dsig:Signature/> processing context.
|
280
|
+
* @tmpl: the pointer to <dsig:Signature/> node with signature template.
|
281
|
+
*
|
282
|
+
* Signs the data as described in @tmpl node.
|
283
|
+
*
|
284
|
+
* Returns: 0 on success or a negative value if an error occurs.
|
285
|
+
*/
|
286
|
+
int
|
287
|
+
xmlSecDSigCtxSign(xmlSecDSigCtxPtr dsigCtx, xmlNodePtr tmpl) {
|
288
|
+
int ret;
|
289
|
+
|
290
|
+
xmlSecAssert2(dsigCtx != NULL, -1);
|
291
|
+
xmlSecAssert2(dsigCtx->result == NULL, -1);
|
292
|
+
xmlSecAssert2(tmpl != NULL, -1);
|
293
|
+
xmlSecAssert2(tmpl->doc != NULL, -1);
|
294
|
+
|
295
|
+
/* add ids for Signature nodes */
|
296
|
+
dsigCtx->operation = xmlSecTransformOperationSign;
|
297
|
+
dsigCtx->status = xmlSecDSigStatusUnknown;
|
298
|
+
xmlSecAddIDs(tmpl->doc, tmpl, xmlSecDSigIds);
|
299
|
+
|
300
|
+
/* read signature template */
|
301
|
+
ret = xmlSecDSigCtxProcessSignatureNode(dsigCtx, tmpl);
|
302
|
+
if(ret < 0) {
|
303
|
+
xmlSecError(XMLSEC_ERRORS_HERE,
|
304
|
+
NULL,
|
305
|
+
"xmlSecDSigCtxSigantureProcessNode",
|
306
|
+
XMLSEC_ERRORS_R_XMLSEC_FAILED,
|
307
|
+
XMLSEC_ERRORS_NO_MESSAGE);
|
308
|
+
return(-1);
|
309
|
+
}
|
310
|
+
xmlSecAssert2(dsigCtx->signMethod != NULL, -1);
|
311
|
+
xmlSecAssert2(dsigCtx->signValueNode != NULL, -1);
|
312
|
+
|
313
|
+
/* references processing might change the status */
|
314
|
+
if(dsigCtx->status != xmlSecDSigStatusUnknown) {
|
315
|
+
return(0);
|
316
|
+
}
|
317
|
+
|
318
|
+
/* check what we've got */
|
319
|
+
dsigCtx->result = dsigCtx->transformCtx.result;
|
320
|
+
if((dsigCtx->result == NULL) || (xmlSecBufferGetData(dsigCtx->result) == NULL)) {
|
321
|
+
xmlSecError(XMLSEC_ERRORS_HERE,
|
322
|
+
NULL,
|
323
|
+
NULL,
|
324
|
+
XMLSEC_ERRORS_R_INVALID_RESULT,
|
325
|
+
XMLSEC_ERRORS_NO_MESSAGE);
|
326
|
+
return(-1);
|
327
|
+
}
|
328
|
+
|
329
|
+
/* write signed data to xml */
|
330
|
+
xmlNodeSetContentLen(dsigCtx->signValueNode,
|
331
|
+
xmlSecBufferGetData(dsigCtx->result),
|
332
|
+
xmlSecBufferGetSize(dsigCtx->result));
|
333
|
+
|
334
|
+
/* set success status and we are done */
|
335
|
+
dsigCtx->status = xmlSecDSigStatusSucceeded;
|
336
|
+
return(0);
|
337
|
+
}
|
338
|
+
|
339
|
+
/**
|
340
|
+
* xmlSecDSigCtxVerify:
|
341
|
+
* @dsigCtx: the pointer to <dsig:Signature/> processing context.
|
342
|
+
* @node: the pointer with <dsig:Signature/> node.
|
343
|
+
*
|
344
|
+
* Vaidates signature in the @node. The verification result is returned
|
345
|
+
* in #status member of the @dsigCtx object.
|
346
|
+
*
|
347
|
+
* Returns: 0 on success (check #status member of @dsigCtx to get
|
348
|
+
* signature verification result) or a negative value if an error occurs.
|
349
|
+
*/
|
350
|
+
int
|
351
|
+
xmlSecDSigCtxVerify(xmlSecDSigCtxPtr dsigCtx, xmlNodePtr node) {
|
352
|
+
int ret;
|
353
|
+
|
354
|
+
xmlSecAssert2(dsigCtx != NULL, -1);
|
355
|
+
xmlSecAssert2(node != NULL, -1);
|
356
|
+
xmlSecAssert2(node->doc != NULL, -1);
|
357
|
+
|
358
|
+
/* add ids for Signature nodes */
|
359
|
+
dsigCtx->operation = xmlSecTransformOperationVerify;
|
360
|
+
dsigCtx->status = xmlSecDSigStatusUnknown;
|
361
|
+
xmlSecAddIDs(node->doc, node, xmlSecDSigIds);
|
362
|
+
|
363
|
+
/* read siganture info */
|
364
|
+
ret = xmlSecDSigCtxProcessSignatureNode(dsigCtx, node);
|
365
|
+
if(ret < 0) {
|
366
|
+
xmlSecError(XMLSEC_ERRORS_HERE,
|
367
|
+
NULL,
|
368
|
+
"xmlSecDSigCtxSigantureProcessNode",
|
369
|
+
XMLSEC_ERRORS_R_XMLSEC_FAILED,
|
370
|
+
XMLSEC_ERRORS_NO_MESSAGE);
|
371
|
+
return(-1);
|
372
|
+
}
|
373
|
+
xmlSecAssert2(dsigCtx->signMethod != NULL, -1);
|
374
|
+
xmlSecAssert2(dsigCtx->signValueNode != NULL, -1);
|
375
|
+
|
376
|
+
/* references processing might change the status */
|
377
|
+
if(dsigCtx->status != xmlSecDSigStatusUnknown) {
|
378
|
+
return(0);
|
379
|
+
}
|
380
|
+
|
381
|
+
/* verify SignatureValue node content */
|
382
|
+
ret = xmlSecTransformVerifyNodeContent(dsigCtx->signMethod, dsigCtx->signValueNode,
|
383
|
+
&(dsigCtx->transformCtx));
|
384
|
+
if(ret < 0) {
|
385
|
+
xmlSecError(XMLSEC_ERRORS_HERE,
|
386
|
+
NULL,
|
387
|
+
"xmlSecTransformVerifyNodeContent",
|
388
|
+
XMLSEC_ERRORS_R_XMLSEC_FAILED,
|
389
|
+
XMLSEC_ERRORS_NO_MESSAGE);
|
390
|
+
return(-1);
|
391
|
+
}
|
392
|
+
|
393
|
+
/* set status and we are done */
|
394
|
+
if(dsigCtx->signMethod->status == xmlSecTransformStatusOk) {
|
395
|
+
dsigCtx->status = xmlSecDSigStatusSucceeded;
|
396
|
+
} else {
|
397
|
+
dsigCtx->status = xmlSecDSigStatusInvalid;
|
398
|
+
}
|
399
|
+
return(0);
|
400
|
+
}
|
401
|
+
|
402
|
+
/**
|
403
|
+
* xmlSecDSigCtxProcessSignatureNode:
|
404
|
+
*
|
405
|
+
* The Signature element (http://www.w3.org/TR/xmldsig-core/#sec-Signature)
|
406
|
+
*
|
407
|
+
* The Signature element is the root element of an XML Signature.
|
408
|
+
* Implementation MUST generate laxly schema valid [XML-schema] Signature
|
409
|
+
* elements as specified by the following schema:
|
410
|
+
* The way in which the SignedInfo element is presented to the
|
411
|
+
* canonicalization method is dependent on that method. The following
|
412
|
+
* applies to algorithms which process XML as nodes or characters:
|
413
|
+
*
|
414
|
+
* - XML based canonicalization implementations MUST be provided with
|
415
|
+
* a [XPath] node-set originally formed from the document containing
|
416
|
+
* the SignedInfo and currently indicating the SignedInfo, its descendants,
|
417
|
+
* and the attribute and namespace nodes of SignedInfo and its descendant
|
418
|
+
* elements.
|
419
|
+
*
|
420
|
+
* - Text based canonicalization algorithms (such as CRLF and charset
|
421
|
+
* normalization) should be provided with the UTF-8 octets that represent
|
422
|
+
* the well-formed SignedInfo element, from the first character to the
|
423
|
+
* last character of the XML representation, inclusive. This includes
|
424
|
+
* the entire text of the start and end tags of the SignedInfo element
|
425
|
+
* as well as all descendant markup and character data (i.e., the text)
|
426
|
+
* between those tags. Use of text based canonicalization of SignedInfo
|
427
|
+
* is NOT RECOMMENDED.
|
428
|
+
*
|
429
|
+
* =================================
|
430
|
+
* we do not support any non XML based C14N
|
431
|
+
*
|
432
|
+
* Schema Definition:
|
433
|
+
*
|
434
|
+
* <element name="Signature" type="ds:SignatureType"/>
|
435
|
+
* <complexType name="SignatureType">
|
436
|
+
* <sequence>
|
437
|
+
* <element ref="ds:SignedInfo"/>
|
438
|
+
* <element ref="ds:SignatureValue"/>
|
439
|
+
* <element ref="ds:KeyInfo" minOccurs="0"/>
|
440
|
+
* <element ref="ds:Object" minOccurs="0" maxOccurs="unbounded"/>
|
441
|
+
* </sequence> <attribute name="Id" type="ID" use="optional"/>
|
442
|
+
* </complexType>
|
443
|
+
*
|
444
|
+
* DTD:
|
445
|
+
*
|
446
|
+
* <!ELEMENT Signature (SignedInfo, SignatureValue, KeyInfo?, Object*) >
|
447
|
+
* <!ATTLIST Signature
|
448
|
+
* xmlns CDATA #FIXED 'http://www.w3.org/2000/09/xmldsig#'
|
449
|
+
* Id ID #IMPLIED >
|
450
|
+
*
|
451
|
+
*/
|
452
|
+
static int
|
453
|
+
xmlSecDSigCtxProcessSignatureNode(xmlSecDSigCtxPtr dsigCtx, xmlNodePtr node) {
|
454
|
+
xmlSecTransformDataType firstType;
|
455
|
+
xmlNodePtr signedInfoNode = NULL;
|
456
|
+
xmlNodePtr keyInfoNode = NULL;
|
457
|
+
xmlNodePtr cur;
|
458
|
+
int ret;
|
459
|
+
|
460
|
+
xmlSecAssert2(dsigCtx != NULL, -1);
|
461
|
+
xmlSecAssert2((dsigCtx->operation == xmlSecTransformOperationSign) || (dsigCtx->operation == xmlSecTransformOperationVerify), -1);
|
462
|
+
xmlSecAssert2(dsigCtx->status == xmlSecDSigStatusUnknown, -1);
|
463
|
+
xmlSecAssert2(dsigCtx->signValueNode == NULL, -1);
|
464
|
+
xmlSecAssert2(dsigCtx->signMethod == NULL, -1);
|
465
|
+
xmlSecAssert2(dsigCtx->c14nMethod == NULL, -1);
|
466
|
+
xmlSecAssert2(node != NULL, -1);
|
467
|
+
|
468
|
+
if(!xmlSecCheckNodeName(node, xmlSecNodeSignature, xmlSecDSigNs)) {
|
469
|
+
xmlSecError(XMLSEC_ERRORS_HERE,
|
470
|
+
NULL,
|
471
|
+
xmlSecErrorsSafeString(xmlSecNodeGetName(node)),
|
472
|
+
XMLSEC_ERRORS_R_INVALID_NODE,
|
473
|
+
"expected=%s",
|
474
|
+
xmlSecErrorsSafeString(xmlSecNodeSignature));
|
475
|
+
return(-1);
|
476
|
+
}
|
477
|
+
|
478
|
+
/* read node data */
|
479
|
+
xmlSecAssert2(dsigCtx->id == NULL, -1);
|
480
|
+
dsigCtx->id = xmlGetProp(node, xmlSecAttrId);
|
481
|
+
|
482
|
+
/* first node is required SignedInfo */
|
483
|
+
cur = xmlSecGetNextElementNode(node->children);
|
484
|
+
if((cur == NULL) || (!xmlSecCheckNodeName(cur, xmlSecNodeSignedInfo, xmlSecDSigNs))) {
|
485
|
+
xmlSecError(XMLSEC_ERRORS_HERE,
|
486
|
+
NULL,
|
487
|
+
xmlSecErrorsSafeString(xmlSecNodeGetName(cur)),
|
488
|
+
XMLSEC_ERRORS_R_INVALID_NODE,
|
489
|
+
"expected=%s",
|
490
|
+
xmlSecErrorsSafeString(xmlSecNodeSignedInfo));
|
491
|
+
return(-1);
|
492
|
+
}
|
493
|
+
signedInfoNode = cur;
|
494
|
+
cur = xmlSecGetNextElementNode(cur->next);
|
495
|
+
|
496
|
+
/* next node is required SignatureValue */
|
497
|
+
if((cur == NULL) || (!xmlSecCheckNodeName(cur, xmlSecNodeSignatureValue, xmlSecDSigNs))) {
|
498
|
+
xmlSecError(XMLSEC_ERRORS_HERE,
|
499
|
+
NULL,
|
500
|
+
xmlSecErrorsSafeString(xmlSecNodeGetName(cur)),
|
501
|
+
XMLSEC_ERRORS_R_INVALID_NODE,
|
502
|
+
"expected=%s",
|
503
|
+
xmlSecErrorsSafeString(xmlSecNodeSignatureValue));
|
504
|
+
return(-1);
|
505
|
+
}
|
506
|
+
dsigCtx->signValueNode = cur;
|
507
|
+
cur = xmlSecGetNextElementNode(cur->next);
|
508
|
+
|
509
|
+
/* next node is optional KeyInfo */
|
510
|
+
if((cur != NULL) && (xmlSecCheckNodeName(cur, xmlSecNodeKeyInfo, xmlSecDSigNs))) {
|
511
|
+
keyInfoNode = cur;
|
512
|
+
cur = xmlSecGetNextElementNode(cur->next);
|
513
|
+
} else {
|
514
|
+
keyInfoNode = NULL;
|
515
|
+
}
|
516
|
+
|
517
|
+
/* next nodes are optional Object nodes */
|
518
|
+
while((cur != NULL) && (xmlSecCheckNodeName(cur, xmlSecNodeObject, xmlSecDSigNs))) {
|
519
|
+
/* read manifests from objects */
|
520
|
+
if((dsigCtx->flags & XMLSEC_DSIG_FLAGS_IGNORE_MANIFESTS) == 0) {
|
521
|
+
ret = xmlSecDSigCtxProcessObjectNode(dsigCtx, cur);
|
522
|
+
if(ret < 0) {
|
523
|
+
xmlSecError(XMLSEC_ERRORS_HERE,
|
524
|
+
NULL,
|
525
|
+
"xmlSecDSigCtxProcessObjectNode",
|
526
|
+
XMLSEC_ERRORS_R_XMLSEC_FAILED,
|
527
|
+
XMLSEC_ERRORS_NO_MESSAGE);
|
528
|
+
return(-1);
|
529
|
+
}
|
530
|
+
}
|
531
|
+
cur = xmlSecGetNextElementNode(cur->next);
|
532
|
+
}
|
533
|
+
|
534
|
+
/* if there is something left than it's an error */
|
535
|
+
if(cur != NULL) {
|
536
|
+
xmlSecError(XMLSEC_ERRORS_HERE,
|
537
|
+
NULL,
|
538
|
+
xmlSecErrorsSafeString(xmlSecNodeGetName(cur)),
|
539
|
+
XMLSEC_ERRORS_R_UNEXPECTED_NODE,
|
540
|
+
XMLSEC_ERRORS_NO_MESSAGE);
|
541
|
+
return(-1);
|
542
|
+
}
|
543
|
+
|
544
|
+
/* now validated all the references and prepare transform */
|
545
|
+
ret = xmlSecDSigCtxProcessSignedInfoNode(dsigCtx, signedInfoNode);
|
546
|
+
if(ret < 0) {
|
547
|
+
xmlSecError(XMLSEC_ERRORS_HERE,
|
548
|
+
NULL,
|
549
|
+
"xmlSecDSigCtxProcessSignedInfoNode",
|
550
|
+
XMLSEC_ERRORS_R_XMLSEC_FAILED,
|
551
|
+
XMLSEC_ERRORS_NO_MESSAGE);
|
552
|
+
return(-1);
|
553
|
+
}
|
554
|
+
/* references processing might change the status */
|
555
|
+
if(dsigCtx->status != xmlSecDSigStatusUnknown) {
|
556
|
+
return(0);
|
557
|
+
}
|
558
|
+
|
559
|
+
/* as the result, we should have sign and c14n methods set */
|
560
|
+
xmlSecAssert2(dsigCtx->signMethod != NULL, -1);
|
561
|
+
xmlSecAssert2(dsigCtx->c14nMethod != NULL, -1);
|
562
|
+
|
563
|
+
ret = xmlSecDSigCtxProcessKeyInfoNode(dsigCtx, keyInfoNode);
|
564
|
+
if(ret < 0) {
|
565
|
+
xmlSecError(XMLSEC_ERRORS_HERE,
|
566
|
+
NULL,
|
567
|
+
"xmlSecDSigCtxProcessKeyInfoNode",
|
568
|
+
XMLSEC_ERRORS_R_XMLSEC_FAILED,
|
569
|
+
XMLSEC_ERRORS_NO_MESSAGE);
|
570
|
+
return(-1);
|
571
|
+
}
|
572
|
+
/* as the result, we should have a key */
|
573
|
+
xmlSecAssert2(dsigCtx->signKey != NULL, -1);
|
574
|
+
|
575
|
+
/* if we need to write result to xml node then we need base64 encode result */
|
576
|
+
if(dsigCtx->operation == xmlSecTransformOperationSign) {
|
577
|
+
xmlSecTransformPtr base64Encode;
|
578
|
+
|
579
|
+
/* we need to add base64 encode transform */
|
580
|
+
base64Encode = xmlSecTransformCtxCreateAndAppend(&(dsigCtx->transformCtx),
|
581
|
+
xmlSecTransformBase64Id);
|
582
|
+
if(base64Encode == NULL) {
|
583
|
+
xmlSecError(XMLSEC_ERRORS_HERE,
|
584
|
+
NULL,
|
585
|
+
"xmlSecTransformCtxCreateAndAppend",
|
586
|
+
XMLSEC_ERRORS_R_XMLSEC_FAILED,
|
587
|
+
XMLSEC_ERRORS_NO_MESSAGE);
|
588
|
+
return(-1);
|
589
|
+
}
|
590
|
+
base64Encode->operation = xmlSecTransformOperationEncode;
|
591
|
+
}
|
592
|
+
|
593
|
+
firstType = xmlSecTransformGetDataType(dsigCtx->transformCtx.first,
|
594
|
+
xmlSecTransformModePush,
|
595
|
+
&(dsigCtx->transformCtx));
|
596
|
+
if((firstType & xmlSecTransformDataTypeXml) != 0) {
|
597
|
+
xmlSecNodeSetPtr nodeset = NULL;
|
598
|
+
|
599
|
+
xmlSecAssert2(signedInfoNode != NULL, -1);
|
600
|
+
nodeset = xmlSecNodeSetGetChildren(signedInfoNode->doc, signedInfoNode, 1, 0);
|
601
|
+
if(nodeset == NULL) {
|
602
|
+
xmlSecError(XMLSEC_ERRORS_HERE,
|
603
|
+
NULL,
|
604
|
+
"xmlSecNodeSetGetChildren",
|
605
|
+
XMLSEC_ERRORS_R_XMLSEC_FAILED,
|
606
|
+
"node=%s",
|
607
|
+
xmlSecErrorsSafeString(xmlSecNodeGetName(signedInfoNode)));
|
608
|
+
return(-1);
|
609
|
+
}
|
610
|
+
|
611
|
+
/* calculate the signature */
|
612
|
+
ret = xmlSecTransformCtxXmlExecute(&(dsigCtx->transformCtx), nodeset);
|
613
|
+
if(ret < 0) {
|
614
|
+
xmlSecError(XMLSEC_ERRORS_HERE,
|
615
|
+
NULL,
|
616
|
+
"xmlSecTransformCtxXmlExecute",
|
617
|
+
XMLSEC_ERRORS_R_XMLSEC_FAILED,
|
618
|
+
XMLSEC_ERRORS_NO_MESSAGE);
|
619
|
+
xmlSecNodeSetDestroy(nodeset);
|
620
|
+
return(-1);
|
621
|
+
}
|
622
|
+
xmlSecNodeSetDestroy(nodeset);
|
623
|
+
} else {
|
624
|
+
/* TODO */
|
625
|
+
xmlSecError(XMLSEC_ERRORS_HERE,
|
626
|
+
NULL,
|
627
|
+
"the binary c14n transforms are not supported yet",
|
628
|
+
XMLSEC_ERRORS_R_NOT_IMPLEMENTED,
|
629
|
+
XMLSEC_ERRORS_NO_MESSAGE);
|
630
|
+
return(-1);
|
631
|
+
}
|
632
|
+
return(0);
|
633
|
+
}
|
634
|
+
|
635
|
+
/**
|
636
|
+
* xmlSecDSigCtxProcessSignedInfoNode:
|
637
|
+
*
|
638
|
+
* The SignedInfo Element (http://www.w3.org/TR/xmldsig-core/#sec-SignedInfo)
|
639
|
+
*
|
640
|
+
* The structure of SignedInfo includes the canonicalization algorithm,
|
641
|
+
* a result algorithm, and one or more references. The SignedInfo element
|
642
|
+
* may contain an optional ID attribute that will allow it to be referenced by
|
643
|
+
* other signatures and objects.
|
644
|
+
*
|
645
|
+
* SignedInfo does not include explicit result or digest properties (such as
|
646
|
+
* calculation time, cryptographic device serial number, etc.). If an
|
647
|
+
* application needs to associate properties with the result or digest,
|
648
|
+
* it may include such information in a SignatureProperties element within
|
649
|
+
* an Object element.
|
650
|
+
*
|
651
|
+
* Schema Definition:
|
652
|
+
*
|
653
|
+
* <element name="SignedInfo" type="ds:SignedInfoType"/>
|
654
|
+
* <complexType name="SignedInfoType">
|
655
|
+
* <sequence>
|
656
|
+
* <element ref="ds:CanonicalizationMethod"/>
|
657
|
+
* <element ref="ds:SignatureMethod"/>
|
658
|
+
* <element ref="ds:Reference" maxOccurs="unbounded"/>
|
659
|
+
* </sequence>
|
660
|
+
* <attribute name="Id" type="ID" use="optional"/>
|
661
|
+
* </complexType>
|
662
|
+
*
|
663
|
+
* DTD:
|
664
|
+
*
|
665
|
+
* <!ELEMENT SignedInfo (CanonicalizationMethod, SignatureMethod, Reference+) >
|
666
|
+
* <!ATTLIST SignedInfo Id ID #IMPLIED>
|
667
|
+
*
|
668
|
+
*/
|
669
|
+
static int
|
670
|
+
xmlSecDSigCtxProcessSignedInfoNode(xmlSecDSigCtxPtr dsigCtx, xmlNodePtr node) {
|
671
|
+
xmlSecDSigReferenceCtxPtr dsigRefCtx;
|
672
|
+
xmlNodePtr cur;
|
673
|
+
int ret;
|
674
|
+
|
675
|
+
xmlSecAssert2(dsigCtx != NULL, -1);
|
676
|
+
xmlSecAssert2(dsigCtx->status == xmlSecDSigStatusUnknown, -1);
|
677
|
+
xmlSecAssert2(dsigCtx->signMethod == NULL, -1);
|
678
|
+
xmlSecAssert2(dsigCtx->c14nMethod == NULL, -1);
|
679
|
+
xmlSecAssert2((dsigCtx->operation == xmlSecTransformOperationSign) || (dsigCtx->operation == xmlSecTransformOperationVerify), -1);
|
680
|
+
xmlSecAssert2(xmlSecPtrListGetSize(&(dsigCtx->signedInfoReferences)) == 0, -1);
|
681
|
+
xmlSecAssert2(node != NULL, -1);
|
682
|
+
|
683
|
+
/* first node is required CanonicalizationMethod. */
|
684
|
+
cur = xmlSecGetNextElementNode(node->children);
|
685
|
+
if((cur != NULL) && (xmlSecCheckNodeName(cur, xmlSecNodeCanonicalizationMethod, xmlSecDSigNs))) {
|
686
|
+
dsigCtx->c14nMethod = xmlSecTransformCtxNodeRead(&(dsigCtx->transformCtx),
|
687
|
+
cur, xmlSecTransformUsageC14NMethod);
|
688
|
+
if(dsigCtx->c14nMethod == NULL) {
|
689
|
+
xmlSecError(XMLSEC_ERRORS_HERE,
|
690
|
+
NULL,
|
691
|
+
"xmlSecTransformCtxNodeRead",
|
692
|
+
XMLSEC_ERRORS_R_XMLSEC_FAILED,
|
693
|
+
"node=%s",
|
694
|
+
xmlSecErrorsSafeString(xmlSecNodeGetName(cur)));
|
695
|
+
return(-1);
|
696
|
+
}
|
697
|
+
} else if(dsigCtx->defC14NMethodId != xmlSecTransformIdUnknown) {
|
698
|
+
/* the dsig spec does require CanonicalizationMethod node
|
699
|
+
* to be present but in some case it application might decide to
|
700
|
+
* minimize traffic */
|
701
|
+
dsigCtx->c14nMethod = xmlSecTransformCtxCreateAndAppend(&(dsigCtx->transformCtx),
|
702
|
+
dsigCtx->defC14NMethodId);
|
703
|
+
if(dsigCtx->c14nMethod == NULL) {
|
704
|
+
xmlSecError(XMLSEC_ERRORS_HERE,
|
705
|
+
NULL,
|
706
|
+
"xmlSecTransformCtxAppend",
|
707
|
+
XMLSEC_ERRORS_R_XMLSEC_FAILED,
|
708
|
+
XMLSEC_ERRORS_NO_MESSAGE);
|
709
|
+
return(-1);
|
710
|
+
}
|
711
|
+
} else {
|
712
|
+
xmlSecError(XMLSEC_ERRORS_HERE,
|
713
|
+
NULL,
|
714
|
+
"CanonicalizationMethod",
|
715
|
+
XMLSEC_ERRORS_R_INVALID_NODE,
|
716
|
+
"expected=%s",
|
717
|
+
xmlSecErrorsSafeString(xmlSecNodeCanonicalizationMethod));
|
718
|
+
return(-1);
|
719
|
+
}
|
720
|
+
|
721
|
+
/* insert membuf if requested */
|
722
|
+
if((dsigCtx->flags & XMLSEC_DSIG_FLAGS_STORE_SIGNATURE) != 0) {
|
723
|
+
xmlSecAssert2(dsigCtx->preSignMemBufMethod == NULL, -1);
|
724
|
+
dsigCtx->preSignMemBufMethod = xmlSecTransformCtxCreateAndAppend(&(dsigCtx->transformCtx),
|
725
|
+
xmlSecTransformMemBufId);
|
726
|
+
if(dsigCtx->preSignMemBufMethod == NULL) {
|
727
|
+
xmlSecError(XMLSEC_ERRORS_HERE,
|
728
|
+
NULL,
|
729
|
+
"xmlSecTransformCtxCreateAndAppend",
|
730
|
+
XMLSEC_ERRORS_R_XMLSEC_FAILED,
|
731
|
+
"transform=%s",
|
732
|
+
xmlSecErrorsSafeString(xmlSecTransformKlassGetName(xmlSecTransformMemBufId)));
|
733
|
+
}
|
734
|
+
}
|
735
|
+
|
736
|
+
/* next node is required SignatureMethod. */
|
737
|
+
cur = xmlSecGetNextElementNode( ((cur != NULL) ? cur->next : node->children) );
|
738
|
+
if((cur != NULL) && (xmlSecCheckNodeName(cur, xmlSecNodeSignatureMethod, xmlSecDSigNs))) {
|
739
|
+
dsigCtx->signMethod = xmlSecTransformCtxNodeRead(&(dsigCtx->transformCtx),
|
740
|
+
cur, xmlSecTransformUsageSignatureMethod);
|
741
|
+
if(dsigCtx->signMethod == NULL) {
|
742
|
+
xmlSecError(XMLSEC_ERRORS_HERE,
|
743
|
+
NULL,
|
744
|
+
"xmlSecTransformCtxNodeRead",
|
745
|
+
XMLSEC_ERRORS_R_XMLSEC_FAILED,
|
746
|
+
"node=%s",
|
747
|
+
xmlSecErrorsSafeString(xmlSecNodeGetName(cur)));
|
748
|
+
return(-1);
|
749
|
+
}
|
750
|
+
} else if(dsigCtx->defSignMethodId != xmlSecTransformIdUnknown) {
|
751
|
+
/* the dsig spec does require SignatureMethod node
|
752
|
+
* to be present but in some case it application might decide to
|
753
|
+
* minimize traffic */
|
754
|
+
dsigCtx->signMethod = xmlSecTransformCtxCreateAndAppend(&(dsigCtx->transformCtx),
|
755
|
+
dsigCtx->defSignMethodId);
|
756
|
+
if(dsigCtx->signMethod == NULL) {
|
757
|
+
xmlSecError(XMLSEC_ERRORS_HERE,
|
758
|
+
NULL,
|
759
|
+
"xmlSecTransformCtxAppend",
|
760
|
+
XMLSEC_ERRORS_R_XMLSEC_FAILED,
|
761
|
+
XMLSEC_ERRORS_NO_MESSAGE);
|
762
|
+
return(-1);
|
763
|
+
}
|
764
|
+
} else {
|
765
|
+
xmlSecError(XMLSEC_ERRORS_HERE,
|
766
|
+
NULL,
|
767
|
+
xmlSecErrorsSafeString(xmlSecNodeGetName(cur)),
|
768
|
+
XMLSEC_ERRORS_R_INVALID_NODE,
|
769
|
+
"expected=%s",
|
770
|
+
xmlSecErrorsSafeString(xmlSecNodeSignatureMethod));
|
771
|
+
return(-1);
|
772
|
+
}
|
773
|
+
dsigCtx->signMethod->operation = dsigCtx->operation;
|
774
|
+
|
775
|
+
/* calculate references */
|
776
|
+
cur = xmlSecGetNextElementNode(cur->next);
|
777
|
+
while((cur != NULL) && (xmlSecCheckNodeName(cur, xmlSecNodeReference, xmlSecDSigNs))) {
|
778
|
+
/* create reference */
|
779
|
+
dsigRefCtx = xmlSecDSigReferenceCtxCreate(dsigCtx, xmlSecDSigReferenceOriginSignedInfo);
|
780
|
+
if(dsigRefCtx == NULL) {
|
781
|
+
xmlSecError(XMLSEC_ERRORS_HERE,
|
782
|
+
NULL,
|
783
|
+
"xmlSecDSigReferenceCtxCreate",
|
784
|
+
XMLSEC_ERRORS_R_XMLSEC_FAILED,
|
785
|
+
XMLSEC_ERRORS_NO_MESSAGE);
|
786
|
+
return(-1);
|
787
|
+
}
|
788
|
+
|
789
|
+
/* add to the list */
|
790
|
+
ret = xmlSecPtrListAdd(&(dsigCtx->signedInfoReferences), dsigRefCtx);
|
791
|
+
if(ret < 0) {
|
792
|
+
xmlSecError(XMLSEC_ERRORS_HERE,
|
793
|
+
NULL,
|
794
|
+
"xmlSecPtrListAdd",
|
795
|
+
XMLSEC_ERRORS_R_XMLSEC_FAILED,
|
796
|
+
XMLSEC_ERRORS_NO_MESSAGE);
|
797
|
+
xmlSecDSigReferenceCtxDestroy(dsigRefCtx);
|
798
|
+
return(-1);
|
799
|
+
}
|
800
|
+
|
801
|
+
/* process */
|
802
|
+
ret = xmlSecDSigReferenceCtxProcessNode(dsigRefCtx, cur);
|
803
|
+
if(ret < 0) {
|
804
|
+
xmlSecError(XMLSEC_ERRORS_HERE,
|
805
|
+
NULL,
|
806
|
+
"xmlSecDSigReferenceCtxProcessNode",
|
807
|
+
XMLSEC_ERRORS_R_XMLSEC_FAILED,
|
808
|
+
"node=%s",
|
809
|
+
xmlSecErrorsSafeString(xmlSecNodeGetName(cur)));
|
810
|
+
return(-1);
|
811
|
+
}
|
812
|
+
|
813
|
+
/* bail out if next Reference processing failed */
|
814
|
+
if(dsigRefCtx->status != xmlSecDSigStatusSucceeded) {
|
815
|
+
dsigCtx->status = xmlSecDSigStatusInvalid;
|
816
|
+
return(0);
|
817
|
+
}
|
818
|
+
cur = xmlSecGetNextElementNode(cur->next);
|
819
|
+
}
|
820
|
+
|
821
|
+
/* check that we have at least one Reference */
|
822
|
+
if(xmlSecPtrListGetSize(&(dsigCtx->signedInfoReferences)) == 0) {
|
823
|
+
xmlSecError(XMLSEC_ERRORS_HERE,
|
824
|
+
NULL,
|
825
|
+
NULL,
|
826
|
+
XMLSEC_ERRORS_R_DSIG_NO_REFERENCES,
|
827
|
+
XMLSEC_ERRORS_NO_MESSAGE);
|
828
|
+
return(-1);
|
829
|
+
}
|
830
|
+
|
831
|
+
/* if there is something left than it's an error */
|
832
|
+
if(cur != NULL) {
|
833
|
+
xmlSecError(XMLSEC_ERRORS_HERE,
|
834
|
+
NULL,
|
835
|
+
xmlSecErrorsSafeString(xmlSecNodeGetName(cur)),
|
836
|
+
XMLSEC_ERRORS_R_UNEXPECTED_NODE,
|
837
|
+
XMLSEC_ERRORS_NO_MESSAGE);
|
838
|
+
return(-1);
|
839
|
+
}
|
840
|
+
return(0);
|
841
|
+
}
|
842
|
+
|
843
|
+
static int
|
844
|
+
xmlSecDSigCtxProcessKeyInfoNode(xmlSecDSigCtxPtr dsigCtx, xmlNodePtr node) {
|
845
|
+
int ret;
|
846
|
+
|
847
|
+
xmlSecAssert2(dsigCtx != NULL, -1);
|
848
|
+
xmlSecAssert2(dsigCtx->signMethod != NULL, -1);
|
849
|
+
|
850
|
+
/* set key requirements */
|
851
|
+
ret = xmlSecTransformSetKeyReq(dsigCtx->signMethod, &(dsigCtx->keyInfoReadCtx.keyReq));
|
852
|
+
if(ret < 0) {
|
853
|
+
xmlSecError(XMLSEC_ERRORS_HERE,
|
854
|
+
NULL,
|
855
|
+
"xmlSecTransformSetKeyReq",
|
856
|
+
XMLSEC_ERRORS_R_XMLSEC_FAILED,
|
857
|
+
"transform=%s",
|
858
|
+
xmlSecErrorsSafeString(xmlSecTransformGetName(dsigCtx->signMethod)));
|
859
|
+
return(-1);
|
860
|
+
}
|
861
|
+
|
862
|
+
/* ignore <dsig:KeyInfo /> if there is the key is already set */
|
863
|
+
/* todo: throw an error if key is set and node != NULL? */
|
864
|
+
if((dsigCtx->signKey == NULL) && (dsigCtx->keyInfoReadCtx.keysMngr != NULL)
|
865
|
+
&& (dsigCtx->keyInfoReadCtx.keysMngr->getKey != NULL)) {
|
866
|
+
dsigCtx->signKey = (dsigCtx->keyInfoReadCtx.keysMngr->getKey)(node, &(dsigCtx->keyInfoReadCtx));
|
867
|
+
}
|
868
|
+
|
869
|
+
/* check that we have exactly what we want */
|
870
|
+
if((dsigCtx->signKey == NULL) || (!xmlSecKeyMatch(dsigCtx->signKey, NULL, &(dsigCtx->keyInfoReadCtx.keyReq)))) {
|
871
|
+
xmlSecError(XMLSEC_ERRORS_HERE,
|
872
|
+
NULL,
|
873
|
+
NULL,
|
874
|
+
XMLSEC_ERRORS_R_KEY_NOT_FOUND,
|
875
|
+
XMLSEC_ERRORS_NO_MESSAGE);
|
876
|
+
return(-1);
|
877
|
+
}
|
878
|
+
|
879
|
+
/* set the key to the transform */
|
880
|
+
ret = xmlSecTransformSetKey(dsigCtx->signMethod, dsigCtx->signKey);
|
881
|
+
if(ret < 0) {
|
882
|
+
xmlSecError(XMLSEC_ERRORS_HERE,
|
883
|
+
NULL,
|
884
|
+
"xmlSecTransformSetKey",
|
885
|
+
XMLSEC_ERRORS_R_XMLSEC_FAILED,
|
886
|
+
"transform=%s",
|
887
|
+
xmlSecErrorsSafeString(xmlSecTransformGetName(dsigCtx->signMethod)));
|
888
|
+
return(-1);
|
889
|
+
}
|
890
|
+
|
891
|
+
/* if we are signing document, update <dsig:KeyInfo/> node */
|
892
|
+
if((node != NULL) && (dsigCtx->operation == xmlSecTransformOperationSign)) {
|
893
|
+
ret = xmlSecKeyInfoNodeWrite(node, dsigCtx->signKey, &(dsigCtx->keyInfoWriteCtx));
|
894
|
+
if(ret < 0) {
|
895
|
+
xmlSecError(XMLSEC_ERRORS_HERE,
|
896
|
+
NULL,
|
897
|
+
"xmlSecKeyInfoNodeWrite",
|
898
|
+
XMLSEC_ERRORS_R_XMLSEC_FAILED,
|
899
|
+
XMLSEC_ERRORS_NO_MESSAGE);
|
900
|
+
return(-1);
|
901
|
+
}
|
902
|
+
}
|
903
|
+
|
904
|
+
return(0);
|
905
|
+
}
|
906
|
+
|
907
|
+
/**
|
908
|
+
* xmlSecDSigCtxProcessObjectNode:
|
909
|
+
*
|
910
|
+
* The Object Element (http://www.w3.org/TR/xmldsig-core/#sec-Object)
|
911
|
+
*
|
912
|
+
* Object is an optional element that may occur one or more times. When
|
913
|
+
* present, this element may contain any data. The Object element may include
|
914
|
+
* optional MIME type, ID, and encoding attributes.
|
915
|
+
*
|
916
|
+
* Schema Definition:
|
917
|
+
*
|
918
|
+
* <element name="Object" type="ds:ObjectType"/>
|
919
|
+
* <complexType name="ObjectType" mixed="true">
|
920
|
+
* <sequence minOccurs="0" maxOccurs="unbounded">
|
921
|
+
* <any namespace="##any" processContents="lax"/>
|
922
|
+
* </sequence>
|
923
|
+
* <attribute name="Id" type="ID" use="optional"/>
|
924
|
+
* <attribute name="MimeType" type="string" use="optional"/>
|
925
|
+
* <attribute name="Encoding" type="anyURI" use="optional"/>
|
926
|
+
* </complexType>
|
927
|
+
*
|
928
|
+
* DTD:
|
929
|
+
*
|
930
|
+
* <!ELEMENT Object (#PCDATA|Signature|SignatureProperties|Manifest %Object.ANY;)* >
|
931
|
+
* <!ATTLIST Object Id ID #IMPLIED
|
932
|
+
* MimeType CDATA #IMPLIED
|
933
|
+
* Encoding CDATA #IMPLIED >
|
934
|
+
*/
|
935
|
+
static int
|
936
|
+
xmlSecDSigCtxProcessObjectNode(xmlSecDSigCtxPtr dsigCtx, xmlNodePtr node) {
|
937
|
+
xmlNodePtr cur;
|
938
|
+
int ret;
|
939
|
+
|
940
|
+
xmlSecAssert2(dsigCtx != NULL, -1);
|
941
|
+
xmlSecAssert2(dsigCtx->status == xmlSecDSigStatusUnknown, -1);
|
942
|
+
xmlSecAssert2(node != NULL, -1);
|
943
|
+
|
944
|
+
/* we care about Manifest nodes only; ignore everything else */
|
945
|
+
cur = xmlSecGetNextElementNode(node->children);
|
946
|
+
while(cur != NULL) {
|
947
|
+
if(xmlSecCheckNodeName(cur, xmlSecNodeManifest, xmlSecDSigNs)) {
|
948
|
+
ret = xmlSecDSigCtxProcessManifestNode(dsigCtx, cur);
|
949
|
+
if(ret < 0){
|
950
|
+
xmlSecError(XMLSEC_ERRORS_HERE,
|
951
|
+
NULL,
|
952
|
+
"xmlSecDSigCtxProcessManifestNode",
|
953
|
+
XMLSEC_ERRORS_R_XMLSEC_FAILED,
|
954
|
+
XMLSEC_ERRORS_NO_MESSAGE);
|
955
|
+
return(-1);
|
956
|
+
}
|
957
|
+
}
|
958
|
+
cur = xmlSecGetNextElementNode(cur->next);
|
959
|
+
}
|
960
|
+
return(0);
|
961
|
+
}
|
962
|
+
|
963
|
+
/**
|
964
|
+
* xmlSecDSigCtxProcessManifestNode:
|
965
|
+
*
|
966
|
+
* The Manifest Element (http://www.w3.org/TR/xmldsig-core/#sec-Manifest)
|
967
|
+
*
|
968
|
+
* The Manifest element provides a list of References. The difference from
|
969
|
+
* the list in SignedInfo is that it is application defined which, if any, of
|
970
|
+
* the digests are actually checked against the objects referenced and what to
|
971
|
+
* do if the object is inaccessible or the digest compare fails. If a Manifest
|
972
|
+
* is pointed to from SignedInfo, the digest over the Manifest itself will be
|
973
|
+
* checked by the core result validation behavior. The digests within such
|
974
|
+
* a Manifest are checked at the application's discretion. If a Manifest is
|
975
|
+
* referenced from another Manifest, even the overall digest of this two level
|
976
|
+
* deep Manifest might not be checked.
|
977
|
+
*
|
978
|
+
* Schema Definition:
|
979
|
+
*
|
980
|
+
* <element name="Manifest" type="ds:ManifestType"/>
|
981
|
+
* <complexType name="ManifestType">
|
982
|
+
* <sequence>
|
983
|
+
* <element ref="ds:Reference" maxOccurs="unbounded"/>
|
984
|
+
* </sequence>
|
985
|
+
* <attribute name="Id" type="ID" use="optional"/>
|
986
|
+
* </complexType>
|
987
|
+
*
|
988
|
+
* DTD:
|
989
|
+
*
|
990
|
+
* <!ELEMENT Manifest (Reference+) >
|
991
|
+
* <!ATTLIST Manifest Id ID #IMPLIED >
|
992
|
+
*/
|
993
|
+
static int
|
994
|
+
xmlSecDSigCtxProcessManifestNode(xmlSecDSigCtxPtr dsigCtx, xmlNodePtr node) {
|
995
|
+
xmlSecDSigReferenceCtxPtr dsigRefCtx;
|
996
|
+
xmlNodePtr cur;
|
997
|
+
int ret;
|
998
|
+
|
999
|
+
xmlSecAssert2(dsigCtx != NULL, -1);
|
1000
|
+
xmlSecAssert2(dsigCtx->status == xmlSecDSigStatusUnknown, -1);
|
1001
|
+
xmlSecAssert2(node != NULL, -1);
|
1002
|
+
|
1003
|
+
/* calculate references */
|
1004
|
+
cur = xmlSecGetNextElementNode(node->children);
|
1005
|
+
while((cur != NULL) && (xmlSecCheckNodeName(cur, xmlSecNodeReference, xmlSecDSigNs))) {
|
1006
|
+
/* create reference */
|
1007
|
+
dsigRefCtx = xmlSecDSigReferenceCtxCreate(dsigCtx, xmlSecDSigReferenceOriginManifest);
|
1008
|
+
if(dsigRefCtx == NULL) {
|
1009
|
+
xmlSecError(XMLSEC_ERRORS_HERE,
|
1010
|
+
NULL,
|
1011
|
+
"xmlSecDSigReferenceCtxCreate",
|
1012
|
+
XMLSEC_ERRORS_R_XMLSEC_FAILED,
|
1013
|
+
XMLSEC_ERRORS_NO_MESSAGE);
|
1014
|
+
return(-1);
|
1015
|
+
}
|
1016
|
+
|
1017
|
+
/* add to the list */
|
1018
|
+
ret = xmlSecPtrListAdd(&(dsigCtx->manifestReferences), dsigRefCtx);
|
1019
|
+
if(ret < 0) {
|
1020
|
+
xmlSecError(XMLSEC_ERRORS_HERE,
|
1021
|
+
NULL,
|
1022
|
+
"xmlSecPtrListAdd",
|
1023
|
+
XMLSEC_ERRORS_R_XMLSEC_FAILED,
|
1024
|
+
XMLSEC_ERRORS_NO_MESSAGE);
|
1025
|
+
xmlSecDSigReferenceCtxDestroy(dsigRefCtx);
|
1026
|
+
return(-1);
|
1027
|
+
}
|
1028
|
+
|
1029
|
+
/* process */
|
1030
|
+
ret = xmlSecDSigReferenceCtxProcessNode(dsigRefCtx, cur);
|
1031
|
+
if(ret < 0) {
|
1032
|
+
xmlSecError(XMLSEC_ERRORS_HERE,
|
1033
|
+
NULL,
|
1034
|
+
"xmlSecDSigReferenceCtxProcessNode",
|
1035
|
+
XMLSEC_ERRORS_R_XMLSEC_FAILED,
|
1036
|
+
"node=%s",
|
1037
|
+
xmlSecErrorsSafeString(xmlSecNodeGetName(cur)));
|
1038
|
+
return(-1);
|
1039
|
+
}
|
1040
|
+
|
1041
|
+
/* we don;t care if Reference processing failed because
|
1042
|
+
* it's Manifest node */
|
1043
|
+
cur = xmlSecGetNextElementNode(cur->next);
|
1044
|
+
}
|
1045
|
+
|
1046
|
+
/* we should have nothing else here */
|
1047
|
+
if(cur != NULL) {
|
1048
|
+
xmlSecError(XMLSEC_ERRORS_HERE,
|
1049
|
+
NULL,
|
1050
|
+
xmlSecErrorsSafeString(xmlSecNodeGetName(cur)),
|
1051
|
+
XMLSEC_ERRORS_R_UNEXPECTED_NODE,
|
1052
|
+
XMLSEC_ERRORS_NO_MESSAGE);
|
1053
|
+
return(-1);
|
1054
|
+
}
|
1055
|
+
return(0);
|
1056
|
+
}
|
1057
|
+
|
1058
|
+
/**
|
1059
|
+
* xmlSecDSigCtxDebugDump:
|
1060
|
+
* @dsigCtx: the pointer to <dsig:Signature/> processing context.
|
1061
|
+
* @output: the pointer to output FILE.
|
1062
|
+
*
|
1063
|
+
* Prints the debug information about @dsigCtx to @output.
|
1064
|
+
*/
|
1065
|
+
void
|
1066
|
+
xmlSecDSigCtxDebugDump(xmlSecDSigCtxPtr dsigCtx, FILE* output) {
|
1067
|
+
xmlSecAssert(dsigCtx != NULL);
|
1068
|
+
xmlSecAssert(output != NULL);
|
1069
|
+
|
1070
|
+
if(dsigCtx->operation == xmlSecTransformOperationSign) {
|
1071
|
+
fprintf(output, "= SIGNATURE CONTEXT\n");
|
1072
|
+
} else {
|
1073
|
+
fprintf(output, "= VERIFICATION CONTEXT\n");
|
1074
|
+
}
|
1075
|
+
switch(dsigCtx->status) {
|
1076
|
+
case xmlSecDSigStatusUnknown:
|
1077
|
+
fprintf(output, "== Status: unknown\n");
|
1078
|
+
break;
|
1079
|
+
case xmlSecDSigStatusSucceeded:
|
1080
|
+
fprintf(output, "== Status: succeeded\n");
|
1081
|
+
break;
|
1082
|
+
case xmlSecDSigStatusInvalid:
|
1083
|
+
fprintf(output, "== Status: invalid\n");
|
1084
|
+
break;
|
1085
|
+
}
|
1086
|
+
fprintf(output, "== flags: 0x%08x\n", dsigCtx->flags);
|
1087
|
+
fprintf(output, "== flags2: 0x%08x\n", dsigCtx->flags2);
|
1088
|
+
|
1089
|
+
if(dsigCtx->id != NULL) {
|
1090
|
+
fprintf(output, "== Id: \"%s\"\n", dsigCtx->id);
|
1091
|
+
}
|
1092
|
+
|
1093
|
+
fprintf(output, "== Key Info Read Ctx:\n");
|
1094
|
+
xmlSecKeyInfoCtxDebugDump(&(dsigCtx->keyInfoReadCtx), output);
|
1095
|
+
fprintf(output, "== Key Info Write Ctx:\n");
|
1096
|
+
xmlSecKeyInfoCtxDebugDump(&(dsigCtx->keyInfoWriteCtx), output);
|
1097
|
+
|
1098
|
+
fprintf(output, "== Signature Transform Ctx:\n");
|
1099
|
+
xmlSecTransformCtxDebugDump(&(dsigCtx->transformCtx), output);
|
1100
|
+
|
1101
|
+
if(dsigCtx->signMethod != NULL) {
|
1102
|
+
fprintf(output, "== Signature Method:\n");
|
1103
|
+
xmlSecTransformDebugDump(dsigCtx->signMethod, output);
|
1104
|
+
}
|
1105
|
+
|
1106
|
+
if(dsigCtx->signKey != NULL) {
|
1107
|
+
fprintf(output, "== Signature Key:\n");
|
1108
|
+
xmlSecKeyDebugDump(dsigCtx->signKey, output);
|
1109
|
+
}
|
1110
|
+
|
1111
|
+
fprintf(output, "== SignedInfo References List:\n");
|
1112
|
+
xmlSecPtrListDebugDump(&(dsigCtx->signedInfoReferences), output);
|
1113
|
+
|
1114
|
+
fprintf(output, "== Manifest References List:\n");
|
1115
|
+
xmlSecPtrListDebugDump(&(dsigCtx->manifestReferences), output);
|
1116
|
+
|
1117
|
+
if((dsigCtx->result != NULL) &&
|
1118
|
+
(xmlSecBufferGetData(dsigCtx->result) != NULL)) {
|
1119
|
+
|
1120
|
+
fprintf(output, "== Result - start buffer:\n");
|
1121
|
+
fwrite(xmlSecBufferGetData(dsigCtx->result),
|
1122
|
+
xmlSecBufferGetSize(dsigCtx->result),
|
1123
|
+
1, output);
|
1124
|
+
fprintf(output, "\n== Result - end buffer\n");
|
1125
|
+
}
|
1126
|
+
if(((dsigCtx->flags & XMLSEC_DSIG_FLAGS_STORE_SIGNATURE) != 0) &&
|
1127
|
+
(xmlSecDSigCtxGetPreSignBuffer(dsigCtx) != NULL) &&
|
1128
|
+
(xmlSecBufferGetData(xmlSecDSigCtxGetPreSignBuffer(dsigCtx)) != NULL)) {
|
1129
|
+
|
1130
|
+
fprintf(output, "== PreSigned data - start buffer:\n");
|
1131
|
+
fwrite(xmlSecBufferGetData(xmlSecDSigCtxGetPreSignBuffer(dsigCtx)),
|
1132
|
+
xmlSecBufferGetSize(xmlSecDSigCtxGetPreSignBuffer(dsigCtx)),
|
1133
|
+
1, output);
|
1134
|
+
fprintf(output, "\n== PreSigned data - end buffer\n");
|
1135
|
+
}
|
1136
|
+
}
|
1137
|
+
|
1138
|
+
/**
|
1139
|
+
* xmlSecDSigCtxDebugXmlDump:
|
1140
|
+
* @dsigCtx: the pointer to <dsig:Signature/> processing context.
|
1141
|
+
* @output: the pointer to output FILE.
|
1142
|
+
*
|
1143
|
+
* Prints the debug information about @dsigCtx to @output in XML format.
|
1144
|
+
*/
|
1145
|
+
void
|
1146
|
+
xmlSecDSigCtxDebugXmlDump(xmlSecDSigCtxPtr dsigCtx, FILE* output) {
|
1147
|
+
xmlSecAssert(dsigCtx != NULL);
|
1148
|
+
xmlSecAssert(output != NULL);
|
1149
|
+
|
1150
|
+
if(dsigCtx->operation == xmlSecTransformOperationSign) {
|
1151
|
+
fprintf(output, "<SignatureContext \n");
|
1152
|
+
} else {
|
1153
|
+
fprintf(output, "<VerificationContext \n");
|
1154
|
+
}
|
1155
|
+
switch(dsigCtx->status) {
|
1156
|
+
case xmlSecDSigStatusUnknown:
|
1157
|
+
fprintf(output, "status=\"unknown\" >\n");
|
1158
|
+
break;
|
1159
|
+
case xmlSecDSigStatusSucceeded:
|
1160
|
+
fprintf(output, "status=\"succeeded\" >\n");
|
1161
|
+
break;
|
1162
|
+
case xmlSecDSigStatusInvalid:
|
1163
|
+
fprintf(output, "status=\"invalid\" >\n");
|
1164
|
+
break;
|
1165
|
+
}
|
1166
|
+
|
1167
|
+
fprintf(output, "<Flags>%08x</Flags>\n", dsigCtx->flags);
|
1168
|
+
fprintf(output, "<Flags2>%08x</Flags2>\n", dsigCtx->flags2);
|
1169
|
+
|
1170
|
+
fprintf(output, "<Id>");
|
1171
|
+
xmlSecPrintXmlString(output, dsigCtx->id);
|
1172
|
+
fprintf(output, "</Id>\n");
|
1173
|
+
|
1174
|
+
fprintf(output, "<KeyInfoReadCtx>\n");
|
1175
|
+
xmlSecKeyInfoCtxDebugXmlDump(&(dsigCtx->keyInfoReadCtx), output);
|
1176
|
+
fprintf(output, "</KeyInfoReadCtx>\n");
|
1177
|
+
|
1178
|
+
fprintf(output, "<KeyInfoWriteCtx>\n");
|
1179
|
+
xmlSecKeyInfoCtxDebugXmlDump(&(dsigCtx->keyInfoWriteCtx), output);
|
1180
|
+
fprintf(output, "</KeyInfoWriteCtx>\n");
|
1181
|
+
|
1182
|
+
fprintf(output, "<SignatureTransformCtx>\n");
|
1183
|
+
xmlSecTransformCtxDebugXmlDump(&(dsigCtx->transformCtx), output);
|
1184
|
+
fprintf(output, "</SignatureTransformCtx>\n");
|
1185
|
+
|
1186
|
+
if(dsigCtx->signMethod != NULL) {
|
1187
|
+
fprintf(output, "<SignatureMethod>\n");
|
1188
|
+
xmlSecTransformDebugXmlDump(dsigCtx->signMethod, output);
|
1189
|
+
fprintf(output, "</SignatureMethod>\n");
|
1190
|
+
}
|
1191
|
+
|
1192
|
+
if(dsigCtx->signKey != NULL) {
|
1193
|
+
fprintf(output, "<SignatureKey>\n");
|
1194
|
+
xmlSecKeyDebugXmlDump(dsigCtx->signKey, output);
|
1195
|
+
fprintf(output, "</SignatureKey>\n");
|
1196
|
+
}
|
1197
|
+
|
1198
|
+
fprintf(output, "<SignedInfoReferences>\n");
|
1199
|
+
xmlSecPtrListDebugXmlDump(&(dsigCtx->signedInfoReferences), output);
|
1200
|
+
fprintf(output, "</SignedInfoReferences>\n");
|
1201
|
+
|
1202
|
+
fprintf(output, "<ManifestReferences>\n");
|
1203
|
+
xmlSecPtrListDebugXmlDump(&(dsigCtx->manifestReferences), output);
|
1204
|
+
fprintf(output, "</ManifestReferences>\n");
|
1205
|
+
|
1206
|
+
if((dsigCtx->result != NULL) &&
|
1207
|
+
(xmlSecBufferGetData(dsigCtx->result) != NULL)) {
|
1208
|
+
|
1209
|
+
fprintf(output, "<Result>");
|
1210
|
+
fwrite(xmlSecBufferGetData(dsigCtx->result),
|
1211
|
+
xmlSecBufferGetSize(dsigCtx->result),
|
1212
|
+
1, output);
|
1213
|
+
fprintf(output, "</Result>\n");
|
1214
|
+
}
|
1215
|
+
if(((dsigCtx->flags & XMLSEC_DSIG_FLAGS_STORE_SIGNATURE) != 0) &&
|
1216
|
+
(xmlSecDSigCtxGetPreSignBuffer(dsigCtx) != NULL) &&
|
1217
|
+
(xmlSecBufferGetData(xmlSecDSigCtxGetPreSignBuffer(dsigCtx)) != NULL)) {
|
1218
|
+
|
1219
|
+
fprintf(output, "<PreSignedData>");
|
1220
|
+
fwrite(xmlSecBufferGetData(xmlSecDSigCtxGetPreSignBuffer(dsigCtx)),
|
1221
|
+
xmlSecBufferGetSize(xmlSecDSigCtxGetPreSignBuffer(dsigCtx)),
|
1222
|
+
1, output);
|
1223
|
+
fprintf(output, "</PreSignedData>\n");
|
1224
|
+
}
|
1225
|
+
|
1226
|
+
if(dsigCtx->operation == xmlSecTransformOperationSign) {
|
1227
|
+
fprintf(output, "</SignatureContext>\n");
|
1228
|
+
} else {
|
1229
|
+
fprintf(output, "</VerificationContext>\n");
|
1230
|
+
}
|
1231
|
+
}
|
1232
|
+
|
1233
|
+
/**************************************************************************
|
1234
|
+
*
|
1235
|
+
* xmlSecDSigReferenceCtx
|
1236
|
+
*
|
1237
|
+
*************************************************************************/
|
1238
|
+
/**
|
1239
|
+
* xmlSecDSigReferenceCtxCreate:
|
1240
|
+
* @dsigCtx: the pointer to parent <dsig:Signature/> node processing context.
|
1241
|
+
* @origin: the reference origin (<dsig:SignedInfo/> or <dsig:Manifest/> node).
|
1242
|
+
*
|
1243
|
+
* Creates new <dsig:Reference/> element processing context. Caller is responsible
|
1244
|
+
* for destroying the returned context by calling #xmlSecDSigReferenceCtxDestroy
|
1245
|
+
* function.
|
1246
|
+
*
|
1247
|
+
* Returns: pointer to newly created context or NULL if an error occurs.
|
1248
|
+
*/
|
1249
|
+
xmlSecDSigReferenceCtxPtr
|
1250
|
+
xmlSecDSigReferenceCtxCreate(xmlSecDSigCtxPtr dsigCtx, xmlSecDSigReferenceOrigin origin) {
|
1251
|
+
xmlSecDSigReferenceCtxPtr dsigRefCtx;
|
1252
|
+
int ret;
|
1253
|
+
|
1254
|
+
xmlSecAssert2(dsigCtx != NULL, NULL);
|
1255
|
+
|
1256
|
+
dsigRefCtx = (xmlSecDSigReferenceCtxPtr) xmlMalloc(sizeof(xmlSecDSigReferenceCtx));
|
1257
|
+
if(dsigRefCtx == NULL) {
|
1258
|
+
xmlSecError(XMLSEC_ERRORS_HERE,
|
1259
|
+
NULL,
|
1260
|
+
NULL,
|
1261
|
+
XMLSEC_ERRORS_R_MALLOC_FAILED,
|
1262
|
+
"sizeof(xmlSecDSigReferenceCtx)=%d",
|
1263
|
+
sizeof(xmlSecDSigReferenceCtx));
|
1264
|
+
return(NULL);
|
1265
|
+
}
|
1266
|
+
|
1267
|
+
ret = xmlSecDSigReferenceCtxInitialize(dsigRefCtx, dsigCtx, origin);
|
1268
|
+
if(ret < 0) {
|
1269
|
+
xmlSecError(XMLSEC_ERRORS_HERE,
|
1270
|
+
NULL,
|
1271
|
+
"xmlSecDSigReferenceCtxInitialize",
|
1272
|
+
XMLSEC_ERRORS_R_XMLSEC_FAILED,
|
1273
|
+
XMLSEC_ERRORS_NO_MESSAGE);
|
1274
|
+
xmlSecDSigReferenceCtxDestroy(dsigRefCtx);
|
1275
|
+
return(NULL);
|
1276
|
+
}
|
1277
|
+
return(dsigRefCtx);
|
1278
|
+
}
|
1279
|
+
|
1280
|
+
/**
|
1281
|
+
* xmlSecDSigReferenceCtxDestroy:
|
1282
|
+
* @dsigRefCtx: the pointer to <dsig:Reference/> element processing context.
|
1283
|
+
*
|
1284
|
+
* Destroy context object created with #xmlSecDSigReferenceCtxCreate function.
|
1285
|
+
*/
|
1286
|
+
void
|
1287
|
+
xmlSecDSigReferenceCtxDestroy(xmlSecDSigReferenceCtxPtr dsigRefCtx) {
|
1288
|
+
xmlSecAssert(dsigRefCtx != NULL);
|
1289
|
+
|
1290
|
+
xmlSecDSigReferenceCtxFinalize(dsigRefCtx);
|
1291
|
+
xmlFree(dsigRefCtx);
|
1292
|
+
}
|
1293
|
+
|
1294
|
+
/**
|
1295
|
+
* xmlSecDSigReferenceCtxInitialize:
|
1296
|
+
* @dsigRefCtx: the pointer to <dsig:Reference/> element processing context.
|
1297
|
+
* @dsigCtx: the pointer to parent <dsig:Signature/> node processing context.
|
1298
|
+
* @origin: the reference origin (<dsig:SignedInfo/> or <dsig:Manifest/> node).
|
1299
|
+
*
|
1300
|
+
* Initializes new <dsig:Reference/> element processing context. Caller is responsible
|
1301
|
+
* for cleaning up the returned context by calling #xmlSecDSigReferenceCtxFinalize
|
1302
|
+
* function.
|
1303
|
+
*
|
1304
|
+
* Returns: 0 on succes or aa negative value otherwise.
|
1305
|
+
*/
|
1306
|
+
int
|
1307
|
+
xmlSecDSigReferenceCtxInitialize(xmlSecDSigReferenceCtxPtr dsigRefCtx, xmlSecDSigCtxPtr dsigCtx,
|
1308
|
+
xmlSecDSigReferenceOrigin origin) {
|
1309
|
+
int ret;
|
1310
|
+
|
1311
|
+
xmlSecAssert2(dsigCtx != NULL, -1);
|
1312
|
+
xmlSecAssert2(dsigRefCtx != NULL, -1);
|
1313
|
+
|
1314
|
+
memset(dsigRefCtx, 0, sizeof(xmlSecDSigReferenceCtx));
|
1315
|
+
|
1316
|
+
dsigRefCtx->dsigCtx = dsigCtx;
|
1317
|
+
dsigRefCtx->origin = origin;
|
1318
|
+
|
1319
|
+
/* initializes transforms dsigRefCtx */
|
1320
|
+
ret = xmlSecTransformCtxInitialize(&(dsigRefCtx->transformCtx));
|
1321
|
+
if(ret < 0) {
|
1322
|
+
xmlSecError(XMLSEC_ERRORS_HERE,
|
1323
|
+
NULL,
|
1324
|
+
"xmlSecTransformCtxInitialize",
|
1325
|
+
XMLSEC_ERRORS_R_XMLSEC_FAILED,
|
1326
|
+
XMLSEC_ERRORS_NO_MESSAGE);
|
1327
|
+
return(-1);
|
1328
|
+
}
|
1329
|
+
|
1330
|
+
/* copy enabled transforms */
|
1331
|
+
if(dsigCtx->enabledReferenceTransforms != NULL) {
|
1332
|
+
ret = xmlSecPtrListCopy(&(dsigRefCtx->transformCtx.enabledTransforms),
|
1333
|
+
dsigCtx->enabledReferenceTransforms);
|
1334
|
+
if(ret < 0) {
|
1335
|
+
xmlSecError(XMLSEC_ERRORS_HERE,
|
1336
|
+
NULL,
|
1337
|
+
"xmlSecPtrListCopy",
|
1338
|
+
XMLSEC_ERRORS_R_XMLSEC_FAILED,
|
1339
|
+
XMLSEC_ERRORS_NO_MESSAGE);
|
1340
|
+
return(-1);
|
1341
|
+
}
|
1342
|
+
}
|
1343
|
+
dsigRefCtx->transformCtx.preExecCallback = dsigCtx->referencePreExecuteCallback;
|
1344
|
+
dsigRefCtx->transformCtx.enabledUris = dsigCtx->enabledReferenceUris;
|
1345
|
+
|
1346
|
+
if((dsigCtx->flags & XMLSEC_DSIG_FLAGS_USE_VISA3D_HACK) != 0) {
|
1347
|
+
dsigRefCtx->transformCtx.flags |= XMLSEC_TRANSFORMCTX_FLAGS_USE_VISA3D_HACK;
|
1348
|
+
}
|
1349
|
+
return(0);
|
1350
|
+
}
|
1351
|
+
|
1352
|
+
/**
|
1353
|
+
* xmlSecDSigReferenceCtxFinalize:
|
1354
|
+
* @dsigRefCtx: the pointer to <dsig:Reference/> element processing context.
|
1355
|
+
*
|
1356
|
+
* Cleans up context object created with #xmlSecDSigReferenceCtxInitialize function.
|
1357
|
+
*/
|
1358
|
+
void
|
1359
|
+
xmlSecDSigReferenceCtxFinalize(xmlSecDSigReferenceCtxPtr dsigRefCtx) {
|
1360
|
+
xmlSecAssert(dsigRefCtx != NULL);
|
1361
|
+
|
1362
|
+
xmlSecTransformCtxFinalize(&(dsigRefCtx->transformCtx));
|
1363
|
+
if(dsigRefCtx->id != NULL) {
|
1364
|
+
xmlFree(dsigRefCtx->id);
|
1365
|
+
}
|
1366
|
+
if(dsigRefCtx->uri != NULL) {
|
1367
|
+
xmlFree(dsigRefCtx->uri);
|
1368
|
+
}
|
1369
|
+
if(dsigRefCtx->type != NULL) {
|
1370
|
+
xmlFree(dsigRefCtx->type);
|
1371
|
+
}
|
1372
|
+
memset(dsigRefCtx, 0, sizeof(xmlSecDSigReferenceCtx));
|
1373
|
+
}
|
1374
|
+
|
1375
|
+
/**
|
1376
|
+
* xmlSecDSigReferenceCtxGetPreDigestBuffer:
|
1377
|
+
* @dsigRefCtx: the pointer to <dsig:Reference/> element processing context.
|
1378
|
+
*
|
1379
|
+
* Gets the results of <dsig:Reference/> node processing just before digesting
|
1380
|
+
* (valid only if #XMLSEC_DSIG_FLAGS_STORE_SIGNEDINFO_REFERENCES or
|
1381
|
+
* #XMLSEC_DSIG_FLAGS_STORE_MANIFEST_REFERENCES flas of signature context
|
1382
|
+
* is set).
|
1383
|
+
*
|
1384
|
+
* Returns: pointer to the buffer or NULL if an error occurs.
|
1385
|
+
*/
|
1386
|
+
xmlSecBufferPtr
|
1387
|
+
xmlSecDSigReferenceCtxGetPreDigestBuffer(xmlSecDSigReferenceCtxPtr dsigRefCtx) {
|
1388
|
+
xmlSecAssert2(dsigRefCtx != NULL, NULL);
|
1389
|
+
|
1390
|
+
return((dsigRefCtx->preDigestMemBufMethod != NULL) ?
|
1391
|
+
xmlSecTransformMemBufGetBuffer(dsigRefCtx->preDigestMemBufMethod) : NULL);
|
1392
|
+
}
|
1393
|
+
|
1394
|
+
/**
|
1395
|
+
* xmlSecDSigReferenceCtxProcessNode:
|
1396
|
+
* @dsigRefCtx: the pointer to <dsig:Reference/> element processing context.
|
1397
|
+
* @node: the pointer to <dsig:Reference/> node.
|
1398
|
+
|
1399
|
+
* The Reference Element (http://www.w3.org/TR/xmldsig-core/#sec-Reference)
|
1400
|
+
*
|
1401
|
+
* Reference is an element that may occur one or more times. It specifies
|
1402
|
+
* a digest algorithm and digest value, and optionally an identifier of the
|
1403
|
+
* object being signed, the type of the object, and/or a list of transforms
|
1404
|
+
* to be applied prior to digesting. The identification (URI) and transforms
|
1405
|
+
* describe how the digested content (i.e., the input to the digest method)
|
1406
|
+
* was created. The Type attribute facilitates the processing of referenced
|
1407
|
+
* data. For example, while this specification makes no requirements over
|
1408
|
+
* external data, an application may wish to signal that the referent is a
|
1409
|
+
* Manifest. An optional ID attribute permits a Reference to be referenced
|
1410
|
+
* from elsewhere.
|
1411
|
+
*
|
1412
|
+
* Returns: 0 on succes or aa negative value otherwise.
|
1413
|
+
*/
|
1414
|
+
int
|
1415
|
+
xmlSecDSigReferenceCtxProcessNode(xmlSecDSigReferenceCtxPtr dsigRefCtx, xmlNodePtr node) {
|
1416
|
+
xmlSecTransformCtxPtr transformCtx;
|
1417
|
+
xmlNodePtr digestValueNode;
|
1418
|
+
xmlNodePtr cur;
|
1419
|
+
int ret;
|
1420
|
+
|
1421
|
+
xmlSecAssert2(dsigRefCtx != NULL, -1);
|
1422
|
+
xmlSecAssert2(dsigRefCtx->dsigCtx != NULL, -1);
|
1423
|
+
xmlSecAssert2(dsigRefCtx->digestMethod == NULL, -1);
|
1424
|
+
xmlSecAssert2(dsigRefCtx->digestMethod == NULL, -1);
|
1425
|
+
xmlSecAssert2(dsigRefCtx->preDigestMemBufMethod == NULL, -1);
|
1426
|
+
xmlSecAssert2(node != NULL, -1);
|
1427
|
+
xmlSecAssert2(node->doc != NULL, -1);
|
1428
|
+
|
1429
|
+
transformCtx = &(dsigRefCtx->transformCtx);
|
1430
|
+
|
1431
|
+
/* read attributes first */
|
1432
|
+
dsigRefCtx->uri = xmlGetProp(node, xmlSecAttrURI);
|
1433
|
+
dsigRefCtx->id = xmlGetProp(node, xmlSecAttrId);
|
1434
|
+
dsigRefCtx->type= xmlGetProp(node, xmlSecAttrType);
|
1435
|
+
|
1436
|
+
/* set start URI (and check that it is enabled!) */
|
1437
|
+
ret = xmlSecTransformCtxSetUri(transformCtx, dsigRefCtx->uri, node);
|
1438
|
+
if(ret < 0) {
|
1439
|
+
xmlSecError(XMLSEC_ERRORS_HERE,
|
1440
|
+
NULL,
|
1441
|
+
"xmlSecTransformCtxSetUri",
|
1442
|
+
XMLSEC_ERRORS_R_XMLSEC_FAILED,
|
1443
|
+
"uri=%s",
|
1444
|
+
xmlSecErrorsSafeString(dsigRefCtx->uri));
|
1445
|
+
return(-1);
|
1446
|
+
}
|
1447
|
+
|
1448
|
+
/* first is optional Transforms node */
|
1449
|
+
cur = xmlSecGetNextElementNode(node->children);
|
1450
|
+
if((cur != NULL) && (xmlSecCheckNodeName(cur, xmlSecNodeTransforms, xmlSecDSigNs))) {
|
1451
|
+
ret = xmlSecTransformCtxNodesListRead(transformCtx,
|
1452
|
+
cur, xmlSecTransformUsageDSigTransform);
|
1453
|
+
if(ret < 0) {
|
1454
|
+
xmlSecError(XMLSEC_ERRORS_HERE,
|
1455
|
+
NULL,
|
1456
|
+
"xmlSecTransformCtxNodesListRead",
|
1457
|
+
XMLSEC_ERRORS_R_XMLSEC_FAILED,
|
1458
|
+
"node=%s",
|
1459
|
+
xmlSecErrorsSafeString(xmlSecNodeGetName(cur)));
|
1460
|
+
return(-1);
|
1461
|
+
}
|
1462
|
+
|
1463
|
+
cur = xmlSecGetNextElementNode(cur->next);
|
1464
|
+
}
|
1465
|
+
|
1466
|
+
/* insert membuf if requested */
|
1467
|
+
if(((dsigRefCtx->origin == xmlSecDSigReferenceOriginSignedInfo) &&
|
1468
|
+
((dsigRefCtx->dsigCtx->flags & XMLSEC_DSIG_FLAGS_STORE_SIGNEDINFO_REFERENCES) != 0)) ||
|
1469
|
+
((dsigRefCtx->origin == xmlSecDSigReferenceOriginManifest) &&
|
1470
|
+
((dsigRefCtx->dsigCtx->flags & XMLSEC_DSIG_FLAGS_STORE_MANIFEST_REFERENCES) != 0))) {
|
1471
|
+
|
1472
|
+
xmlSecAssert2(dsigRefCtx->preDigestMemBufMethod == NULL, -1);
|
1473
|
+
dsigRefCtx->preDigestMemBufMethod = xmlSecTransformCtxCreateAndAppend(
|
1474
|
+
transformCtx,
|
1475
|
+
xmlSecTransformMemBufId);
|
1476
|
+
if(dsigRefCtx->preDigestMemBufMethod == NULL) {
|
1477
|
+
xmlSecError(XMLSEC_ERRORS_HERE,
|
1478
|
+
NULL,
|
1479
|
+
"xmlSecTransformCtxCreateAndAppend",
|
1480
|
+
XMLSEC_ERRORS_R_XMLSEC_FAILED,
|
1481
|
+
"transform=%s",
|
1482
|
+
xmlSecErrorsSafeString(xmlSecTransformKlassGetName(xmlSecTransformMemBufId)));
|
1483
|
+
return(-1);
|
1484
|
+
}
|
1485
|
+
}
|
1486
|
+
|
1487
|
+
/* next node is required DigestMethod. */
|
1488
|
+
if((cur != NULL) && (xmlSecCheckNodeName(cur, xmlSecNodeDigestMethod, xmlSecDSigNs))) {
|
1489
|
+
dsigRefCtx->digestMethod = xmlSecTransformCtxNodeRead(&(dsigRefCtx->transformCtx),
|
1490
|
+
cur, xmlSecTransformUsageDigestMethod);
|
1491
|
+
if(dsigRefCtx->digestMethod == NULL) {
|
1492
|
+
xmlSecError(XMLSEC_ERRORS_HERE,
|
1493
|
+
NULL,
|
1494
|
+
"xmlSecTransformCtxNodeRead",
|
1495
|
+
XMLSEC_ERRORS_R_XMLSEC_FAILED,
|
1496
|
+
"node=%s",
|
1497
|
+
xmlSecErrorsSafeString(xmlSecNodeGetName(cur)));
|
1498
|
+
return(-1);
|
1499
|
+
}
|
1500
|
+
|
1501
|
+
cur = xmlSecGetNextElementNode(cur->next);
|
1502
|
+
} else if(dsigRefCtx->dsigCtx->defSignMethodId != xmlSecTransformIdUnknown) {
|
1503
|
+
/* the dsig spec does require DigestMethod node
|
1504
|
+
* to be present but in some case it application might decide to
|
1505
|
+
* minimize traffic */
|
1506
|
+
dsigRefCtx->digestMethod = xmlSecTransformCtxCreateAndAppend(&(dsigRefCtx->transformCtx),
|
1507
|
+
dsigRefCtx->dsigCtx->defSignMethodId);
|
1508
|
+
if(dsigRefCtx->digestMethod == NULL) {
|
1509
|
+
xmlSecError(XMLSEC_ERRORS_HERE,
|
1510
|
+
NULL,
|
1511
|
+
"xmlSecTransformCtxAppend",
|
1512
|
+
XMLSEC_ERRORS_R_XMLSEC_FAILED,
|
1513
|
+
XMLSEC_ERRORS_NO_MESSAGE);
|
1514
|
+
return(-1);
|
1515
|
+
}
|
1516
|
+
} else {
|
1517
|
+
xmlSecError(XMLSEC_ERRORS_HERE,
|
1518
|
+
NULL,
|
1519
|
+
xmlSecErrorsSafeString(xmlSecNodeGetName(cur)),
|
1520
|
+
XMLSEC_ERRORS_R_INVALID_NODE,
|
1521
|
+
"expected=%s",
|
1522
|
+
xmlSecErrorsSafeString(xmlSecNodeDigestMethod));
|
1523
|
+
return(-1);
|
1524
|
+
}
|
1525
|
+
dsigRefCtx->digestMethod->operation = dsigRefCtx->dsigCtx->operation;
|
1526
|
+
|
1527
|
+
/* last node is required DigestValue */
|
1528
|
+
if((cur != NULL) && (xmlSecCheckNodeName(cur, xmlSecNodeDigestValue, xmlSecDSigNs))) {
|
1529
|
+
digestValueNode = cur;
|
1530
|
+
cur = xmlSecGetNextElementNode(cur->next);
|
1531
|
+
} else {
|
1532
|
+
xmlSecError(XMLSEC_ERRORS_HERE,
|
1533
|
+
NULL,
|
1534
|
+
xmlSecErrorsSafeString(xmlSecNodeGetName(cur)),
|
1535
|
+
XMLSEC_ERRORS_R_XMLSEC_FAILED,
|
1536
|
+
"node=%s",
|
1537
|
+
xmlSecErrorsSafeString(xmlSecNodeDigestValue));
|
1538
|
+
return(-1);
|
1539
|
+
}
|
1540
|
+
|
1541
|
+
/* if we have something else then it's an error */
|
1542
|
+
if(cur != NULL) {
|
1543
|
+
xmlSecError(XMLSEC_ERRORS_HERE,
|
1544
|
+
NULL,
|
1545
|
+
xmlSecErrorsSafeString(xmlSecNodeGetName(cur)),
|
1546
|
+
XMLSEC_ERRORS_R_UNEXPECTED_NODE,
|
1547
|
+
XMLSEC_ERRORS_NO_MESSAGE);
|
1548
|
+
return(-1);
|
1549
|
+
}
|
1550
|
+
|
1551
|
+
/* if we need to write result to xml node then we need base64 encode result */
|
1552
|
+
if(dsigRefCtx->dsigCtx->operation == xmlSecTransformOperationSign) {
|
1553
|
+
xmlSecTransformPtr base64Encode;
|
1554
|
+
|
1555
|
+
/* we need to add base64 encode transform */
|
1556
|
+
base64Encode = xmlSecTransformCtxCreateAndAppend(transformCtx, xmlSecTransformBase64Id);
|
1557
|
+
if(base64Encode == NULL) {
|
1558
|
+
xmlSecError(XMLSEC_ERRORS_HERE,
|
1559
|
+
NULL,
|
1560
|
+
"xmlSecTransformCtxCreateAndAppend",
|
1561
|
+
XMLSEC_ERRORS_R_XMLSEC_FAILED,
|
1562
|
+
XMLSEC_ERRORS_NO_MESSAGE);
|
1563
|
+
return(-1);
|
1564
|
+
}
|
1565
|
+
base64Encode->operation = xmlSecTransformOperationEncode;
|
1566
|
+
}
|
1567
|
+
|
1568
|
+
/* finally get transforms results */
|
1569
|
+
ret = xmlSecTransformCtxExecute(transformCtx, node->doc);
|
1570
|
+
if(ret < 0) {
|
1571
|
+
xmlSecError(XMLSEC_ERRORS_HERE,
|
1572
|
+
NULL,
|
1573
|
+
"xmlSecTransformCtxExecute",
|
1574
|
+
XMLSEC_ERRORS_R_XMLSEC_FAILED,
|
1575
|
+
XMLSEC_ERRORS_NO_MESSAGE);
|
1576
|
+
return(-1);
|
1577
|
+
}
|
1578
|
+
dsigRefCtx->result = transformCtx->result;
|
1579
|
+
|
1580
|
+
if(dsigRefCtx->dsigCtx->operation == xmlSecTransformOperationSign) {
|
1581
|
+
if((dsigRefCtx->result == NULL) || (xmlSecBufferGetData(dsigRefCtx->result) == NULL)) {
|
1582
|
+
xmlSecError(XMLSEC_ERRORS_HERE,
|
1583
|
+
NULL,
|
1584
|
+
"xmlSecTransformCtxExecute",
|
1585
|
+
XMLSEC_ERRORS_R_XMLSEC_FAILED,
|
1586
|
+
XMLSEC_ERRORS_NO_MESSAGE);
|
1587
|
+
return(-1);
|
1588
|
+
}
|
1589
|
+
|
1590
|
+
/* write signed data to xml */
|
1591
|
+
xmlNodeSetContentLen(digestValueNode,
|
1592
|
+
xmlSecBufferGetData(dsigRefCtx->result),
|
1593
|
+
xmlSecBufferGetSize(dsigRefCtx->result));
|
1594
|
+
|
1595
|
+
/* set success status and we are done */
|
1596
|
+
dsigRefCtx->status = xmlSecDSigStatusSucceeded;
|
1597
|
+
} else {
|
1598
|
+
/* verify SignatureValue node content */
|
1599
|
+
ret = xmlSecTransformVerifyNodeContent(dsigRefCtx->digestMethod,
|
1600
|
+
digestValueNode, transformCtx);
|
1601
|
+
if(ret < 0) {
|
1602
|
+
xmlSecError(XMLSEC_ERRORS_HERE,
|
1603
|
+
NULL,
|
1604
|
+
"xmlSecTransformVerifyNodeContent",
|
1605
|
+
XMLSEC_ERRORS_R_XMLSEC_FAILED,
|
1606
|
+
XMLSEC_ERRORS_NO_MESSAGE);
|
1607
|
+
return(-1);
|
1608
|
+
}
|
1609
|
+
|
1610
|
+
/* set status and we are done */
|
1611
|
+
if(dsigRefCtx->digestMethod->status == xmlSecTransformStatusOk) {
|
1612
|
+
dsigRefCtx->status = xmlSecDSigStatusSucceeded;
|
1613
|
+
} else {
|
1614
|
+
dsigRefCtx->status = xmlSecDSigStatusInvalid;
|
1615
|
+
}
|
1616
|
+
}
|
1617
|
+
|
1618
|
+
return(0);
|
1619
|
+
}
|
1620
|
+
|
1621
|
+
/**
|
1622
|
+
* xmlSecDSigReferenceCtxDebugDump:
|
1623
|
+
* @dsigRefCtx: the pointer to <dsig:Reference/> element processing context.
|
1624
|
+
* @output: the pointer to output FILE.
|
1625
|
+
*
|
1626
|
+
* Prints debug information about @dsigRefCtx to @output.
|
1627
|
+
*/
|
1628
|
+
void
|
1629
|
+
xmlSecDSigReferenceCtxDebugDump(xmlSecDSigReferenceCtxPtr dsigRefCtx, FILE* output) {
|
1630
|
+
xmlSecAssert(dsigRefCtx != NULL);
|
1631
|
+
xmlSecAssert(dsigRefCtx->dsigCtx != NULL);
|
1632
|
+
xmlSecAssert(output != NULL);
|
1633
|
+
|
1634
|
+
if(dsigRefCtx->dsigCtx->operation == xmlSecTransformOperationSign) {
|
1635
|
+
fprintf(output, "= REFERENCE CALCULATION CONTEXT\n");
|
1636
|
+
} else {
|
1637
|
+
fprintf(output, "= REFERENCE VERIFICATION CONTEXT\n");
|
1638
|
+
}
|
1639
|
+
switch(dsigRefCtx->status) {
|
1640
|
+
case xmlSecDSigStatusUnknown:
|
1641
|
+
fprintf(output, "== Status: unknown\n");
|
1642
|
+
break;
|
1643
|
+
case xmlSecDSigStatusSucceeded:
|
1644
|
+
fprintf(output, "== Status: succeeded\n");
|
1645
|
+
break;
|
1646
|
+
case xmlSecDSigStatusInvalid:
|
1647
|
+
fprintf(output, "== Status: invalid\n");
|
1648
|
+
break;
|
1649
|
+
}
|
1650
|
+
if(dsigRefCtx->id != NULL) {
|
1651
|
+
fprintf(output, "== Id: \"%s\"\n", dsigRefCtx->id);
|
1652
|
+
}
|
1653
|
+
if(dsigRefCtx->uri != NULL) {
|
1654
|
+
fprintf(output, "== URI: \"%s\"\n", dsigRefCtx->uri);
|
1655
|
+
}
|
1656
|
+
if(dsigRefCtx->type != NULL) {
|
1657
|
+
fprintf(output, "== Type: \"%s\"\n", dsigRefCtx->type);
|
1658
|
+
}
|
1659
|
+
|
1660
|
+
fprintf(output, "== Reference Transform Ctx:\n");
|
1661
|
+
xmlSecTransformCtxDebugDump(&(dsigRefCtx->transformCtx), output);
|
1662
|
+
|
1663
|
+
if(dsigRefCtx->digestMethod != NULL) {
|
1664
|
+
fprintf(output, "== Digest Method:\n");
|
1665
|
+
xmlSecTransformDebugDump(dsigRefCtx->digestMethod, output);
|
1666
|
+
}
|
1667
|
+
|
1668
|
+
if((xmlSecDSigReferenceCtxGetPreDigestBuffer(dsigRefCtx) != NULL) &&
|
1669
|
+
(xmlSecBufferGetData(xmlSecDSigReferenceCtxGetPreDigestBuffer(dsigRefCtx)) != NULL)) {
|
1670
|
+
|
1671
|
+
fprintf(output, "== PreDigest data - start buffer:\n");
|
1672
|
+
fwrite(xmlSecBufferGetData(xmlSecDSigReferenceCtxGetPreDigestBuffer(dsigRefCtx)),
|
1673
|
+
xmlSecBufferGetSize(xmlSecDSigReferenceCtxGetPreDigestBuffer(dsigRefCtx)),
|
1674
|
+
1, output);
|
1675
|
+
fprintf(output, "\n== PreDigest data - end buffer\n");
|
1676
|
+
}
|
1677
|
+
|
1678
|
+
if((dsigRefCtx->result != NULL) &&
|
1679
|
+
(xmlSecBufferGetData(dsigRefCtx->result) != NULL)) {
|
1680
|
+
|
1681
|
+
fprintf(output, "== Result - start buffer:\n");
|
1682
|
+
fwrite(xmlSecBufferGetData(dsigRefCtx->result),
|
1683
|
+
xmlSecBufferGetSize(dsigRefCtx->result), 1,
|
1684
|
+
output);
|
1685
|
+
fprintf(output, "\n== Result - end buffer\n");
|
1686
|
+
}
|
1687
|
+
}
|
1688
|
+
|
1689
|
+
/**
|
1690
|
+
* xmlSecDSigReferenceCtxDebugXmlDump:
|
1691
|
+
* @dsigRefCtx: the pointer to <dsig:Reference/> element processing context.
|
1692
|
+
* @output: the pointer to output FILE.
|
1693
|
+
*
|
1694
|
+
* Prints debug information about @dsigRefCtx to @output in output format.
|
1695
|
+
*/
|
1696
|
+
void
|
1697
|
+
xmlSecDSigReferenceCtxDebugXmlDump(xmlSecDSigReferenceCtxPtr dsigRefCtx, FILE* output) {
|
1698
|
+
xmlSecAssert(dsigRefCtx != NULL);
|
1699
|
+
xmlSecAssert(dsigRefCtx->dsigCtx != NULL);
|
1700
|
+
xmlSecAssert(output != NULL);
|
1701
|
+
|
1702
|
+
if(dsigRefCtx->dsigCtx->operation == xmlSecTransformOperationSign) {
|
1703
|
+
fprintf(output, "<ReferenceCalculationContext ");
|
1704
|
+
} else {
|
1705
|
+
fprintf(output, "<ReferenceVerificationContext ");
|
1706
|
+
}
|
1707
|
+
switch(dsigRefCtx->status) {
|
1708
|
+
case xmlSecDSigStatusUnknown:
|
1709
|
+
fprintf(output, "status=\"unknown\" >\n");
|
1710
|
+
break;
|
1711
|
+
case xmlSecDSigStatusSucceeded:
|
1712
|
+
fprintf(output, "status=\"succeeded\" >\n");
|
1713
|
+
break;
|
1714
|
+
case xmlSecDSigStatusInvalid:
|
1715
|
+
fprintf(output, "status=\"invalid\" >\n");
|
1716
|
+
break;
|
1717
|
+
}
|
1718
|
+
|
1719
|
+
fprintf(output, "<Id>");
|
1720
|
+
xmlSecPrintXmlString(output, dsigRefCtx->id);
|
1721
|
+
fprintf(output, "</Id>\n");
|
1722
|
+
|
1723
|
+
fprintf(output, "<URI>");
|
1724
|
+
xmlSecPrintXmlString(output, dsigRefCtx->uri);
|
1725
|
+
fprintf(output, "</URI>\n");
|
1726
|
+
|
1727
|
+
fprintf(output, "<Type>");
|
1728
|
+
xmlSecPrintXmlString(output, dsigRefCtx->type);
|
1729
|
+
fprintf(output, "</Type>\n");
|
1730
|
+
|
1731
|
+
fprintf(output, "<ReferenceTransformCtx>\n");
|
1732
|
+
xmlSecTransformCtxDebugXmlDump(&(dsigRefCtx->transformCtx), output);
|
1733
|
+
fprintf(output, "</ReferenceTransformCtx>\n");
|
1734
|
+
|
1735
|
+
if(dsigRefCtx->digestMethod != NULL) {
|
1736
|
+
fprintf(output, "<DigestMethod>\n");
|
1737
|
+
xmlSecTransformDebugXmlDump(dsigRefCtx->digestMethod, output);
|
1738
|
+
fprintf(output, "</DigestMethod>\n");
|
1739
|
+
}
|
1740
|
+
|
1741
|
+
if((dsigRefCtx->result != NULL) &&
|
1742
|
+
(xmlSecBufferGetData(dsigRefCtx->result) != NULL)) {
|
1743
|
+
|
1744
|
+
fprintf(output, "<Result>");
|
1745
|
+
fwrite(xmlSecBufferGetData(dsigRefCtx->result),
|
1746
|
+
xmlSecBufferGetSize(dsigRefCtx->result), 1,
|
1747
|
+
output);
|
1748
|
+
fprintf(output, "</Result>\n");
|
1749
|
+
}
|
1750
|
+
|
1751
|
+
if((xmlSecDSigReferenceCtxGetPreDigestBuffer(dsigRefCtx) != NULL) &&
|
1752
|
+
(xmlSecBufferGetData(xmlSecDSigReferenceCtxGetPreDigestBuffer(dsigRefCtx)) != NULL)) {
|
1753
|
+
|
1754
|
+
fprintf(output, "<PreDigestData>");
|
1755
|
+
fwrite(xmlSecBufferGetData(xmlSecDSigReferenceCtxGetPreDigestBuffer(dsigRefCtx)),
|
1756
|
+
xmlSecBufferGetSize(xmlSecDSigReferenceCtxGetPreDigestBuffer(dsigRefCtx)),
|
1757
|
+
1, output);
|
1758
|
+
fprintf(output, "</PreDigestData>\n");
|
1759
|
+
}
|
1760
|
+
if(dsigRefCtx->dsigCtx->operation == xmlSecTransformOperationSign) {
|
1761
|
+
fprintf(output, "</ReferenceCalculationContext>\n");
|
1762
|
+
} else {
|
1763
|
+
fprintf(output, "</ReferenceVerificationContext>\n");
|
1764
|
+
}
|
1765
|
+
}
|
1766
|
+
|
1767
|
+
|
1768
|
+
/**************************************************************************
|
1769
|
+
*
|
1770
|
+
* xmlSecDSigReferenceCtxListKlass
|
1771
|
+
*
|
1772
|
+
*************************************************************************/
|
1773
|
+
static xmlSecPtrListKlass xmlSecDSigReferenceCtxListKlass = {
|
1774
|
+
BAD_CAST "dsig-reference-list",
|
1775
|
+
NULL, /* xmlSecPtrDuplicateItemMethod duplicateItem; */
|
1776
|
+
(xmlSecPtrDestroyItemMethod)xmlSecDSigReferenceCtxDestroy, /* xmlSecPtrDestroyItemMethod destroyItem; */
|
1777
|
+
(xmlSecPtrDebugDumpItemMethod)xmlSecDSigReferenceCtxDebugDump, /* xmlSecPtrDebugDumpItemMethod debugDumpItem; */
|
1778
|
+
(xmlSecPtrDebugDumpItemMethod)xmlSecDSigReferenceCtxDebugXmlDump, /* xmlSecPtrDebugDumpItemMethod debugXmlDumpItem; */
|
1779
|
+
};
|
1780
|
+
|
1781
|
+
/**
|
1782
|
+
* xmlSecDSigReferenceCtxListGetKlass:
|
1783
|
+
*
|
1784
|
+
* The <dsig:Reference/> element processing contexts list klass.
|
1785
|
+
*
|
1786
|
+
* Returns: <dsig:Reference/> element processing context list klass.
|
1787
|
+
*/
|
1788
|
+
xmlSecPtrListId
|
1789
|
+
xmlSecDSigReferenceCtxListGetKlass(void) {
|
1790
|
+
return(&xmlSecDSigReferenceCtxListKlass);
|
1791
|
+
}
|
1792
|
+
|
1793
|
+
#endif /* XMLSEC_NO_XMLDSIG */
|
1794
|
+
|
1795
|
+
|