1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109
|
<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
-
- This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
- project.
-
- Copyright (C) 1998-2018 OpenLink Software
-
- This project is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the
- Free Software Foundation; only version 2 of the License, dated June 1991.
-
- This program is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
-
- You should have received a copy of the GNU General Public License along
- with this program; if not, write to the Free Software Foundation, Inc.,
- 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-
-
-->
<refentry id="fn_xenc_decrypt_soap">
<refmeta>
<refentrytitle>xenc_decrypt_soap</refentrytitle>
<refmiscinfo>hash</refmiscinfo>
</refmeta>
<refnamediv>
<refname>xenc_decrypt_soap</refname>
<refpurpose>Decrypt and verify a SOAP message</refpurpose>
</refnamediv>
<refsynopsisdiv>
<funcsynopsis id="fsyn_xenc_decrypt_soap">
<funcprototype id="fproto_xenc_decrypt_soap">
<funcdef>varchar <function>xenc_decrypt_soap</function></funcdef>
<paramdef>in <parameter>xml_text</parameter> varchar</paramdef>
<paramdef>in <parameter>soap_version</parameter> int</paramdef>
<paramdef>in <parameter>validate_flag</parameter> int</paramdef>
<paramdef>in <parameter>encoding</parameter> varchar</paramdef>
<paramdef>in <parameter>lang</parameter> varchar</paramdef>
<paramdef>in <parameter>opts</parameter> any</paramdef>
<paramdef>out <parameter>keys</parameter> any</paramdef>
</funcprototype>
</funcsynopsis>
</refsynopsisdiv>
<refsect1 id="desc_xenc_decrypt_soap">
<title>Description</title>
<para>
The function is used to decrypt and optionally verify signature
(depends of a <parameter>validate_flag</parameter> parameter) of a SOAP message.
</para>
</refsect1>
<refsect1 id="params_xenc_decrypt_soap">
<title>Parameters</title>
<refsect2><title>xml_text</title>
<para>A string containing SOAP message</para>
</refsect2>
<refsect2><title>soap_version</title>
<para>An integer indication SOAP version (11 for v1.1, 10 for 1.0 etc)</para>
</refsect2>
<refsect2><title>validate_flag</title>
<para>Bit mask flag. See below for details.</para>
<simplelist>
<member>bit 0 and 1 : 00 - do not validate, 01 (decimal 1) - validate, 10 (decimal 2) - validate if signature exists</member>
<member>bit 2 : 100 (decimal 4) - try to decode, do not signal error if WS-Security is not supplied</member>
</simplelist>
</refsect2>
<refsect2><title>encoding</title>
<para>The message (<parameter>xml_text</parameter>) character encoding</para>
</refsect2>
<refsect2><title>lang</title>
<para>The message (<parameter>xml_text</parameter>) language</para>
</refsect2>
<refsect2><title>opts</title>
<para>A vector containing options for User Name token profile.
For example : vector ('UsernameToken', vector ('label', 'lab1', 'keyAlgorithm' , '[3des algo uri]'))
</para>
</refsect2>
<refsect2><title>keys</title>
<para>if supplied the parameter will be set with keys names used for decryption and signature verification.
The structure is as follows : vector (vector ([enc-key1],[enc-key2],...), vector ('[signing token name]', '[matching token]')). Where enc-key is a key used to decrypt the message fragment; '[signing token name]' is the temporary key used to validate the signature and '[matching token]' is the token (key) from user's space that matches the signing token.
</para>
</refsect2>
</refsect1>
<refsect1 id="ret_xenc_decrypt_soap"><title>Return Types</title>
<para>On success the function returns decrypted SOAP message.</para>
</refsect1>
<refsect1 id="examples_xenc_decrypt_soap">
<title>Examples</title>
<example id="ex_xenc_decrypt_soap"><title>Decrypting SOAP message</title>
<screen><![CDATA[
declare ekeys, opts, decoded any;
opts := vector ('UsernameToken',
vector ('label',
'Application-Label',
'keyAlgorithm',
'http://www.w3.org/2001/04/xmlenc#tripledes-cbc'));
decoded := xenc_decrypt_soap (body_str, 11, 6, 'UTF-8', 'x-any', opts, ekeys);
]]>
</screen>
</example>
</refsect1>
<refsect1 id="seealso_xenc_decrypt_soap">
<title>See Also</title>
<para><link linkend="fn_xenc_encrypt"><function>xenc_encrypt()</function></link></para>
</refsect1>
</refentry>
|