<!--
 -  
 -  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
 -  
 -  
-->
<?xml version="1.0" encoding="ISO-8859-1"?>
<refentry id="WS-S-3">
  <refmeta>
    <refentrytitle>WS Security</refentrytitle>
    <refmiscinfo>tutorial</refmiscinfo>
  </refmeta>
  <refnamediv>
    <refname>Asymmetric Encryption</refname>
    <refpurpose>Secure SOAP Client using RSA Encryption</refpurpose>
  </refnamediv>

<refsect1 id="WS-S-3a">
<title>Example</title>
<para>
This section demonstrates how to make encrypted SOAP message using
asymmetric algorithm (RSA).
</para>
<itemizedlist mark="bullet">
<listitem>These examples are using a X.509 certificate to define the RSA key for encruption.</listitem>
<listitem>To encrypt the message client uses public key of server's certificate, so only server know private key and can decrypt the message. </listitem>
<listitem>In practice message itself is encrypted with 3DES algorthm using a random session key. </listitem>
<listitem>The session key itself is encrypted with public part of RSA key. </listitem>
<listitem>So the server first decode the session key, and then decrypt the message.</listitem>
</itemizedlist>

<para>
The Virtuoso VSP based clients demonstrate
</para>
<itemizedlist mark="bullet">
<listitem> accessing Virtuoso Web Service with Virtuoso client using asymmetric algorithm</listitem>
<listitem> accessing .NET Web service with Virtuoso client using asymmetric algorithm</listitem>
</itemizedlist>

<para>
To run .NET client against Virtuoso service you need:
</para>
<itemizedlist mark="bullet">
<listitem>Microsoft WSE 2.0 installed</listitem>
<listitem>Edit the Makefile and specify in CSLIBFLAGS where Microsoft.Web.Services.DLL reside.</listitem>
<listitem>compile the example issuing nmake command in the tutorial/services/ws_s_3 directory.</listitem>
<listitem>if you going to compile the client on an other box, make sure that .config file is in the same directory where is .exe file.</listitem>
</itemizedlist>

</refsect1>
</refentry>
