summaryrefslogtreecommitdiff
path: root/docs/api/xmlsec-examples-sign-dynamimc-template.html
diff options
context:
space:
mode:
Diffstat (limited to 'docs/api/xmlsec-examples-sign-dynamimc-template.html')
-rw-r--r--docs/api/xmlsec-examples-sign-dynamimc-template.html57
1 files changed, 38 insertions, 19 deletions
diff --git a/docs/api/xmlsec-examples-sign-dynamimc-template.html b/docs/api/xmlsec-examples-sign-dynamimc-template.html
index 2d47acdb..9605503a 100644
--- a/docs/api/xmlsec-examples-sign-dynamimc-template.html
+++ b/docs/api/xmlsec-examples-sign-dynamimc-template.html
@@ -36,8 +36,31 @@
.navigation .title {
font-size: 200%;
}</style>
+<style type="text/css">
+table.CALSTABLE > tbody > tr:nth-child(1) > td:nth-child(1) {
+ width: 20em;
+}
+.synopsis, .classsynopsis {
+ background: #eeeeee;
+ border: solid 1px #aaaaaa;
+}
+.programlisting {
+ background: #eeeeee;
+ border: solid 1px #000000;
+}
+.navigation {
+ background: #eeeeee;
+ border: solid 1px #000000;
+}
+.navigation a {
+ color: initial;
+}
+.navigation a:visited {
+ color: initial;
+}
+</style>
</head>
-<body><table witdh="100%" valign="top"><tr valign="top">
+<body><table width="100%" valign="top"><tr valign="top">
<td valign="top" align="left" width="210">
<img src="../images/logo.gif" alt="XML Security Library" border="0"><p></p>
<ul>
@@ -78,11 +101,11 @@
</td>
<td valign="top"><table width="100%" valign="top"><tr><td valign="top" align="left" id="xmlsecContent">
<table width="100%" class="navigation" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle">
-<td><a accesskey="p" href="xmlsec-examples-sign-template-file.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
-<td><a accesskey="u" href="xmlsec-examples.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
-<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
+<td><a accesskey="p" href="xmlsec-examples-sign-template-file.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
+<td><a accesskey="u" href="xmlsec-examples.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<th width="100%" align="center">XML Security Library Reference Manual</th>
-<td><a accesskey="n" href="xmlsec-examples-sign-x509.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
+<td><a accesskey="n" href="xmlsec-examples-sign-x509.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<br clear="all"><div class="SECT1">
<h1 class="SECT1"><a name="XMLSEC-EXAMPLES-SIGN-DYNAMIMC-TEMPLATE">Signing a dynamicaly created template.</a></h1>
@@ -91,12 +114,12 @@
<p></p>
<div class="INFORMALEXAMPLE">
<p></p>
-<a name="AEN667"></a><pre class="PROGRAMLISTING">/**
+<a name="AEN812"></a><pre class="PROGRAMLISTING">/**
* XML Security Library example: Signing a file with a dynamicaly created template.
*
* Signs a file using a dynamicaly created template and key from PEM file.
* The signature has one reference with one enveloped transform to sign
- * the whole document except the &lt;dsig:Signature/&gt; node itself.
+ * the whole document except the <a href="http://www.w3.org/TR/xmldsig-core/#sec-Signature" target="_top">&lt;dsig:Signature/&gt;</a> node itself.
*
* Usage:
* sign2 &lt;xml-doc&gt; &lt;pem-key&gt;
@@ -110,7 +133,7 @@
* This is free software; see Copyright file in the source
* distribution for preciese wording.
*
- * Copyright (C) 2002-2003 Aleksey Sanin &lt;aleksey@aleksey.com&gt;
+ * Copyright (C) 2002-2016 Aleksey Sanin &lt;aleksey@aleksey.com&gt;
*/
#include &lt;stdlib.h&gt;
#include &lt;string.h&gt;
@@ -266,7 +289,7 @@ sign_file(const char* xml_file, const char* key_file) {
goto done;
}
- /* add &lt;dsig:Signature/&gt; node to the doc */
+ /* add <a href="http://www.w3.org/TR/xmldsig-core/#sec-Signature" target="_top">&lt;dsig:Signature/&gt;</a> node to the doc */
xmlAddChild(xmlDocGetRootElement(doc), signNode);
/* add reference */
@@ -283,7 +306,7 @@ sign_file(const char* xml_file, const char* key_file) {
goto done;
}
- /* add &lt;dsig:KeyInfo/&gt; and &lt;dsig:KeyName/&gt; nodes to put key name in the signed document */
+ /* add <a href="http://www.w3.org/TR/xmldsig-core/#sec-KeyInfo" target="_top">&lt;dsig:KeyInfo/&gt;</a> and <a href="http://www.w3.org/TR/xmldsig-core/#sec-KeyName" target="_top">&lt;dsig:KeyName/&gt;</a> nodes to put key name in the signed document */
keyInfoNode = xmlSecTmplSignatureEnsureKeyInfo(signNode, NULL);
if(keyInfoNode == NULL) {
fprintf(stderr, "Error: failed to add key info\n");
@@ -346,7 +369,7 @@ done:
<p></p>
<div class="INFORMALEXAMPLE">
<p></p>
-<a name="AEN672"></a><pre class="PROGRAMLISTING">&lt;?xml version="1.0" encoding="UTF-8"?&gt;
+<a name="AEN821"></a><pre class="PROGRAMLISTING">&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;!--
XML Security Library example: Original XML doc file for sign2 example.
--&gt;
@@ -363,9 +386,9 @@ XML Security Library example: Original XML doc file for sign2 example.
<p></p>
<div class="INFORMALEXAMPLE">
<p></p>
-<a name="AEN677"></a><pre class="PROGRAMLISTING">&lt;?xml version="1.0" encoding="UTF-8"?&gt;
+<a name="AEN826"></a><pre class="PROGRAMLISTING">&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;!--
-XML Security Library example: Signed XML doc file (sign2 example).
+XML Security Library example: Original XML doc file for sign2 example.
--&gt;
&lt;Envelope xmlns="urn:envelope"&gt;
&lt;Data&gt;
@@ -383,12 +406,8 @@ XML Security Library example: Signed XML doc file (sign2 example).
&lt;DigestValue&gt;HjY8ilZAIEM2tBbPn5mYO1ieIX4=&lt;/DigestValue&gt;
&lt;/Reference&gt;
&lt;/SignedInfo&gt;
-&lt;SignatureValue&gt;SIaj/6KY3C1SmDXU2++Gm31U1xTadFp04WhBgfsJFbxrL+q7GKSKN9kfQ+UpN9+i
-D5fWmuavXEHe4Gw6RMaMEkq2URQo7F68+d5J/ajq8/l4n+xE6/reGScVwT6L4dEP
-XXVJcAi2ZnQ3O7GTNvNGCPibL9mUcyCWBFZ92Uemtc/vJFCQ7ZyKMdMfACgxOwyN
-T/9971oog241/2doudhonc0I/3mgPYWkZdX6yvr62mEjnG+oUZkhWYJ4ewZJ4hM4
-JjbFqZO+OEzDRSbw3DkmuBA/mtlx+3t13SESfEub5hqoMdVmtth/eTb64dsPdl9r
-3k1ACVX9f8aHfQQdJOmLFQ==&lt;/SignatureValue&gt;
+&lt;SignatureValue&gt;GnYgZdzPeXd/gPTJmQ506qmxWkd3VK1Y23kh5Qpq8y4LMNY+LJJeCWK5wpo/vufR
+nIH/KUqvIvtk9nb2IjF5Uw==&lt;/SignatureValue&gt;
&lt;KeyInfo&gt;
&lt;KeyName&gt;rsakey.pem&lt;/KeyName&gt;
&lt;/KeyInfo&gt;