diff options
Diffstat (limited to 'docs/api/xmlsec-notes-dynamic-encryption-templates.html')
-rw-r--r-- | docs/api/xmlsec-notes-dynamic-encryption-templates.html | 45 |
1 files changed, 34 insertions, 11 deletions
diff --git a/docs/api/xmlsec-notes-dynamic-encryption-templates.html b/docs/api/xmlsec-notes-dynamic-encryption-templates.html index afe4147a..d451f425 100644 --- a/docs/api/xmlsec-notes-dynamic-encryption-templates.html +++ b/docs/api/xmlsec-notes-dynamic-encryption-templates.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-notes-dynamic-signature-templates.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td> -<td><a accesskey="u" href="xmlsec-notes-templates.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-notes-dynamic-signature-templates.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td> +<td><a accesskey="u" href="xmlsec-notes-templates.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-notes-verify-decrypt.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td> +<td><a accesskey="n" href="xmlsec-notes-verify-decrypt.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-NOTES-DYNAMIC-ENCRYPTION-TEMPLATES">Creating dynamic encryption templates.</a></h1> @@ -90,14 +113,14 @@ to the XML Encryption structure as it is described in <a href="http://www.w3.org/TR/xmlenc-core" target="_top">specification</a>. The only difference is that some nodes (for example, - <enc:CipherValue/>) + <a href="http://www.w3.org/TR/xmlenc-core/#sec-CipherValue" target="_top"></a><a href="http://www.w3.org/TR/xmlenc-core/#sec-CipherValue" target="_top"></a><a href="http://www.w3.org/TR/xmlenc-core/#sec-CipherValue" target="_top"></a><a href="http://www.w3.org/TR/xmlenc-core/#sec-CipherValue" target="_top"></a><a href="http://www.w3.org/TR/xmlenc-core/#sec-CipherValue" target="_top"></a><a href="http://www.w3.org/TR/xmlenc-core/#sec-CipherValue" target="_top"></a><a href="http://www.w3.org/TR/xmlenc-core/#sec-CipherValue" target="_top"><enc:CipherValue/></a>) are empty. The XML Security Library sets the content of these nodes after doing necessary calculations. </p> <div class="FIGURE"> -<a name="AEN256"></a><p><b>Figure 2. XML Encryption structure</b></p> +<a name="AEN305"></a><p><b>Figure 2. XML Encryption structure</b></p> <pre class="PROGRAMLISTING"><enc:EncryptedData Id? Type? MimeType? Encoding?> - <enc:EncryptionMethod Algorithm />? + <a href="http://www.w3.org/TR/xmlenc-core/#sec-EncryptionMethod%20Algorithm%20" target="_top"></a><a href="http://www.w3.org/TR/xmlenc-core/#sec-EncryptionMethod%20Algorithm%20" target="_top"></a><a href="http://www.w3.org/TR/xmlenc-core/#sec-EncryptionMethod%20Algorithm%20" target="_top"></a><a href="http://www.w3.org/TR/xmlenc-core/#sec-EncryptionMethod%20Algorithm%20" target="_top"></a><a href="http://www.w3.org/TR/xmlenc-core/#sec-EncryptionMethod%20Algorithm%20" target="_top"></a><a href="http://www.w3.org/TR/xmlenc-core/#sec-EncryptionMethod%20Algorithm%20" target="_top"></a><a href="http://www.w3.org/TR/xmlenc-core/#sec-EncryptionMethod%20Algorithm%20" target="_top"><enc:EncryptionMethod Algorithm /></a>? (<dsig:KeyInfo> <dsig:KeyName>? <dsig:KeyValue>? @@ -120,7 +143,7 @@ </div> <p> </p> <div class="EXAMPLE"> -<a name="AEN260"></a><p><b>Example 2. Creating dynamic encrytion template.</b></p> +<a name="AEN316"></a><p><b>Example 2. Creating dynamic encrytion template.</b></p> <pre class="PROGRAMLISTING">/** * encrypt_file: * @xml_file: the encryption template file name. @@ -158,13 +181,13 @@ encrypt_file(const char* xml_file, const char* key_file) { goto done; } - /* we want to put encrypted data in the <enc:CipherValue/> node */ + /* we want to put encrypted data in the <ulink URL="http://www.w3.org/TR/xmlenc-core/#sec-CipherValue"><ulink URL="http://www.w3.org/TR/xmlenc-core/#sec-CipherValue"><ulink URL="http://www.w3.org/TR/xmlenc-core/#sec-CipherValue"><ulink URL="http://www.w3.org/TR/xmlenc-core/#sec-CipherValue"><ulink URL="http://www.w3.org/TR/xmlenc-core/#sec-CipherValue"><ulink URL="http://www.w3.org/TR/xmlenc-core/#sec-CipherValue"><ulink URL="http://www.w3.org/TR/xmlenc-core/#sec-CipherValue">&lt;enc:CipherValue/&gt;</ulink></ulink></ulink></ulink></ulink></ulink></ulink> node */ if(xmlSecTmplEncDataEnsureCipherValue(encDataNode) == NULL) { fprintf(stderr, "Error: failed to add CipherValue node\n"); goto done; } - /* add <dsig:KeyInfo/> and <dsig:KeyName/> nodes to put key name in the signed document */ + /* add <ulink URL="http://www.w3.org/TR/xmldsig-core/#sec-KeyInfo"><ulink URL="http://www.w3.org/TR/xmldsig-core/#sec-KeyInfo"><ulink URL="http://www.w3.org/TR/xmldsig-core/#sec-KeyInfo"><ulink URL="http://www.w3.org/TR/xmldsig-core/#sec-KeyInfo"><ulink URL="http://www.w3.org/TR/xmldsig-core/#sec-KeyInfo"><ulink URL="http://www.w3.org/TR/xmldsig-core/#sec-KeyInfo"><ulink URL="http://www.w3.org/TR/xmldsig-core/#sec-KeyInfo">&lt;dsig:KeyInfo/&gt;</ulink></ulink></ulink></ulink></ulink></ulink></ulink> and <ulink URL="http://www.w3.org/TR/xmldsig-core/#sec-KeyName"><ulink URL="http://www.w3.org/TR/xmldsig-core/#sec-KeyName"><ulink URL="http://www.w3.org/TR/xmldsig-core/#sec-KeyName"><ulink URL="http://www.w3.org/TR/xmldsig-core/#sec-KeyName"><ulink URL="http://www.w3.org/TR/xmldsig-core/#sec-KeyName"><ulink URL="http://www.w3.org/TR/xmldsig-core/#sec-KeyName"><ulink URL="http://www.w3.org/TR/xmldsig-core/#sec-KeyName">&lt;dsig:KeyName/&gt;</ulink></ulink></ulink></ulink></ulink></ulink></ulink> nodes to put key name in the signed document */ keyInfoNode = xmlSecTmplEncDataEnsureKeyInfo(encDataNode, NULL); if(keyInfoNode == NULL) { fprintf(stderr, "Error: failed to add key info\n"); |