diff options
Diffstat (limited to 'docs/api/xmlsec-encrypt-with-session-key.html')
-rw-r--r-- | docs/api/xmlsec-encrypt-with-session-key.html | 67 |
1 files changed, 43 insertions, 24 deletions
diff --git a/docs/api/xmlsec-encrypt-with-session-key.html b/docs/api/xmlsec-encrypt-with-session-key.html index 7b9ed51b..7f1db6c5 100644 --- a/docs/api/xmlsec-encrypt-with-session-key.html +++ b/docs/api/xmlsec-encrypt-with-session-key.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-encrypt-dynamic-template.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-encrypt-dynamic-template.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-decrypt-with-signle-key.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td> +<td><a accesskey="n" href="xmlsec-decrypt-with-signle-key.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-ENCRYPT-WITH-SESSION-KEY">Encrypting data with a session key.</a></h1> @@ -91,7 +114,7 @@ <p></p> <div class="INFORMALEXAMPLE"> <p></p> -<a name="AEN783"></a><pre class="PROGRAMLISTING">/** +<a name="AEN948"></a><pre class="PROGRAMLISTING">/** * XML Security Library example: Encrypting XML file with a session key and dynamicaly created template. * * Encrypts XML file using a dynamicaly created template file and a session @@ -109,7 +132,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> @@ -344,20 +367,20 @@ encrypt_file(xmlSecKeysMngrPtr mngr, const char* xml_file, const char* key_name) goto done; } - /* we want to put encrypted data in the <enc:CipherValue/> node */ + /* we want to put encrypted data in the <a href="http://www.w3.org/TR/xmlenc-core/#sec-CipherValue" target="_top"><enc:CipherValue/></a> node */ if(xmlSecTmplEncDataEnsureCipherValue(encDataNode) == NULL) { fprintf(stderr, "Error: failed to add CipherValue node\n"); goto done; } - /* add <dsig:KeyInfo/> */ + /* add <a href="http://www.w3.org/TR/xmldsig-core/#sec-KeyInfo" target="_top"><dsig:KeyInfo/></a> */ keyInfoNode = xmlSecTmplEncDataEnsureKeyInfo(encDataNode, NULL); if(keyInfoNode == NULL) { fprintf(stderr, "Error: failed to add key info\n"); goto done; } - /* add <enc:EncryptedKey/> to store the encrypted session key */ + /* add <a href="http://www.w3.org/TR/xmlenc-core/#sec-EncryptedKey" target="_top"><enc:EncryptedKey/></a> to store the encrypted session key */ encKeyNode = xmlSecTmplKeyInfoAddEncryptedKey(keyInfoNode, xmlSecTransformRsaPkcs1Id, NULL, NULL, NULL); @@ -366,13 +389,13 @@ encrypt_file(xmlSecKeysMngrPtr mngr, const char* xml_file, const char* key_name) goto done; } - /* we want to put encrypted key in the <enc:CipherValue/> node */ + /* we want to put encrypted key in the <a href="http://www.w3.org/TR/xmlenc-core/#sec-CipherValue" target="_top"><enc:CipherValue/></a> node */ if(xmlSecTmplEncDataEnsureCipherValue(encKeyNode) == NULL) { fprintf(stderr, "Error: failed to add CipherValue node\n"); goto done; } - /* add <dsig:KeyInfo/> and <dsig:KeyName/> nodes to <enc:EncryptedKey/> */ + /* 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 <a href="http://www.w3.org/TR/xmlenc-core/#sec-EncryptedKey" target="_top"><enc:EncryptedKey/></a> */ keyInfoNode2 = xmlSecTmplEncDataEnsureKeyInfo(encKeyNode, NULL); if(keyInfoNode2 == NULL) { fprintf(stderr, "Error: failed to add key info\n"); @@ -438,7 +461,7 @@ done: <p></p> <div class="INFORMALEXAMPLE"> <p></p> -<a name="AEN788"></a><pre class="PROGRAMLISTING"><?xml version="1.0" encoding="UTF-8"?> +<a name="AEN960"></a><pre class="PROGRAMLISTING"><?xml version="1.0" encoding="UTF-8"?> <!-- XML Security Library example: Original XML doc file before encryption (encrypt3 example). --> @@ -455,31 +478,27 @@ XML Security Library example: Original XML doc file before encryption (encrypt3 <p></p> <div class="INFORMALEXAMPLE"> <p></p> -<a name="AEN793"></a><pre class="PROGRAMLISTING"><?xml version="1.0" encoding="UTF-8"?> +<a name="AEN965"></a><pre class="PROGRAMLISTING"><?xml version="1.0" encoding="UTF-8"?> <!-- -XML Security Library example: XML doc file encrypted with a session DES key (encrypt3 example). +XML Security Library example: Original XML doc file before encryption (encrypt3 example). --> <EncryptedData xmlns="http://www.w3.org/2001/04/xmlenc#" Type="http://www.w3.org/2001/04/xmlenc#Element"> <EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#tripledes-cbc"/> <KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#"> <EncryptedKey xmlns="http://www.w3.org/2001/04/xmlenc#"> -<EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p"/> +<EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-1_5"/> <KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#"> <KeyName>rsakey.pem</KeyName> </KeyInfo> <CipherData> -<CipherValue>IPiEu9Nv+EsGyvVeXO9nl5iZhhi+uzQH1I3/DTs3+eamBvioyaawRIlvTql7LYL5 -Mi91Qs8ozfW/fWZ8zB8AE2PosaX37SqiuEta68+65/Ed4v1rkGN0Awux8+gJqJmp -c2kJhzAoQIAIGAW4nTGP9tl9QUHfwKh2KPA104vezk70ijvF7TrbTmhdfmULAuWK -Tbsg8sXAPhGmPh5KckM2Xe387iPh4ue2+2TGdWqwXygVdvIUIbcIMq6F+/mWlcmf -Gs5FVI7CTjaLmeyO4ho+FGmicmqH2hEkZW0a2ktDh4BU/MxYF6L7oayrVWDGp2IH -dzQAwUT2qJcFjElO8xUz3g==</CipherValue> +<CipherValue>QYYKljhcX20QyP20hYmq8CSES875oIdbrsjMOxnb0VnYDn01Jk00OIPpb9gdIdZg +MLOtSy26mWrQ+XqfPGuyaA==</CipherValue> </CipherData> </EncryptedKey> </KeyInfo> <CipherData> -<CipherValue>xrfPSA+BEI+8ca23RN34gtee5lOMx8Cn+ZGWyxitiktdZ1+XREH+57li63VutCwp -s6ifbZgXIBsFdxPpMBUFlyTWAAO+NLooIwGoczXi14z62lHr7Ck6FA==</CipherValue> +<CipherValue>+UiDv73SE8K8KwXuOmHLHK7N2hNWDakTAEu6NprbCdULC1w/LXT9FLtNRJetmwwO +XpBqTY56AAMeMgpxPWN3SPO0ETeQw7pR+bp0IjUvcGlFSXz6yE1qgQ==</CipherValue> </CipherData> </EncryptedData></pre> <p></p> |