diff options
Diffstat (limited to 'docs/api/xmlsec-examples-sign-dynamimc-template.html')
-rw-r--r-- | docs/api/xmlsec-examples-sign-dynamimc-template.html | 57 |
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 <dsig:Signature/> node itself. + * the whole document except the <a href="http://www.w3.org/TR/xmldsig-core/#sec-Signature" target="_top"><dsig:Signature/></a> node itself. * * Usage: * sign2 <xml-doc> <pem-key> @@ -110,7 +133,7 @@ * This is free software; see Copyright file in the source * distribution for preciese wording. * - * Copyright (C) 2002-2003 Aleksey Sanin <aleksey@aleksey.com> + * Copyright (C) 2002-2016 Aleksey Sanin <aleksey@aleksey.com> */ #include <stdlib.h> #include <string.h> @@ -266,7 +289,7 @@ sign_file(const char* xml_file, const char* key_file) { goto done; } - /* add <dsig:Signature/> node to the doc */ + /* add <a href="http://www.w3.org/TR/xmldsig-core/#sec-Signature" target="_top"><dsig:Signature/></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 <dsig:KeyInfo/> and <dsig:KeyName/> nodes to put key name in the signed document */ + /* add <a href="http://www.w3.org/TR/xmldsig-core/#sec-KeyInfo" target="_top"><dsig:KeyInfo/></a> and <a href="http://www.w3.org/TR/xmldsig-core/#sec-KeyName" target="_top"><dsig:KeyName/></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"><?xml version="1.0" encoding="UTF-8"?> +<a name="AEN821"></a><pre class="PROGRAMLISTING"><?xml version="1.0" encoding="UTF-8"?> <!-- XML Security Library example: Original XML doc file for sign2 example. --> @@ -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"><?xml version="1.0" encoding="UTF-8"?> +<a name="AEN826"></a><pre class="PROGRAMLISTING"><?xml version="1.0" encoding="UTF-8"?> <!-- -XML Security Library example: Signed XML doc file (sign2 example). +XML Security Library example: Original XML doc file for sign2 example. --> <Envelope xmlns="urn:envelope"> <Data> @@ -383,12 +406,8 @@ XML Security Library example: Signed XML doc file (sign2 example). <DigestValue>HjY8ilZAIEM2tBbPn5mYO1ieIX4=</DigestValue> </Reference> </SignedInfo> -<SignatureValue>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==</SignatureValue> +<SignatureValue>GnYgZdzPeXd/gPTJmQ506qmxWkd3VK1Y23kh5Qpq8y4LMNY+LJJeCWK5wpo/vufR +nIH/KUqvIvtk9nb2IjF5Uw==</SignatureValue> <KeyInfo> <KeyName>rsakey.pem</KeyName> </KeyInfo> |