Repository: ignite
Updated Branches:
  refs/heads/master c66196378 -> e58aae48b


IGNITE-3111 .NET can be now configured SSL without Spring

This closes #3498


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/e58aae48
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/e58aae48
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/e58aae48

Branch: refs/heads/master
Commit: e58aae48b67c74307703d2ae44fe8e3cd4b9649a
Parents: c661963
Author: apopov <tank2.a...@gmail.com>
Authored: Tue Feb 13 13:13:15 2018 +0300
Committer: Igor Sapego <isap...@gridgain.com>
Committed: Tue Feb 13 13:15:18 2018 +0300

----------------------------------------------------------------------
 .../utils/PlatformConfigurationUtils.java       |  70 +++++
 .../Apache.Ignite.Core.Tests.csproj             |  29 ++
 .../Config/KeyStore/client.jks                  | Bin 0 -> 3232 bytes
 .../Config/KeyStore/client.pem                  |  69 +++++
 .../Config/KeyStore/client.pfx                  | Bin 0 -> 3148 bytes
 .../Config/KeyStore/generate.sh                 |  99 +++++++
 .../Config/KeyStore/server.jks                  | Bin 0 -> 3230 bytes
 .../Config/KeyStore/server.pem                  |  69 +++++
 .../Config/KeyStore/server.pfx                  | Bin 0 -> 3148 bytes
 .../Config/KeyStore/trust.jks                   | Bin 0 -> 2432 bytes
 .../Config/full-config.xml                      |   3 +
 .../Config/start-test-grid1-ssl.xml             |  65 +++++
 .../IgniteConfigurationSerializerTest.cs        |   6 +-
 .../Ssl/SslConfigurationTest.cs                 | 286 +++++++++++++++++++
 .../Apache.Ignite.Core.csproj                   |  12 +-
 .../Cluster/Ssl/ISslContextFactory.cs           |  35 +++
 .../Cluster/Ssl/SslContextFactory.cs            | 166 +++++++++++
 .../Apache.Ignite.Core/IgniteConfiguration.cs   |  16 ++
 .../IgniteConfigurationSection.xsd              |  52 ++++
 .../Impl/Cluster/Ssl/SslFactorySerializer.cs    |  58 ++++
 20 files changed, 1030 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/e58aae48/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformConfigurationUtils.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformConfigurationUtils.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformConfigurationUtils.java
index d5fe6f9..79bafe6 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformConfigurationUtils.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformConfigurationUtils.java
@@ -34,6 +34,7 @@ import java.util.ServiceLoader;
 import java.util.Set;
 import javax.cache.configuration.Factory;
 import javax.cache.expiry.ExpiryPolicy;
+import javax.net.ssl.SSLContext;
 import org.apache.ignite.IgniteException;
 import org.apache.ignite.binary.BinaryBasicNameMapper;
 import org.apache.ignite.binary.BinaryRawReader;
@@ -96,6 +97,7 @@ import 
org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
 import org.apache.ignite.spi.eventstorage.EventStorageSpi;
 import org.apache.ignite.spi.eventstorage.NoopEventStorageSpi;
 import org.apache.ignite.spi.eventstorage.memory.MemoryEventStorageSpi;
+import org.apache.ignite.ssl.SslContextFactory;
 import org.apache.ignite.transactions.TransactionConcurrency;
 import org.apache.ignite.transactions.TransactionIsolation;
 
@@ -751,6 +753,9 @@ public class PlatformConfigurationUtils {
         if (in.readBoolean())
             cfg.setDataStorageConfiguration(readDataStorageConfiguration(in));
 
+        if (in.readBoolean())
+            cfg.setSslContextFactory(readSslContextFactory(in));
+
         readPluginConfiguration(cfg, in);
 
         readLocalEventListeners(cfg, in);
@@ -1251,6 +1256,8 @@ public class PlatformConfigurationUtils {
 
         writeDataStorageConfiguration(w, cfg.getDataStorageConfiguration());
 
+        writeSslContextFactory(w, cfg.getSslContextFactory());
+
         w.writeString(cfg.getIgniteHome());
 
         
w.writeLong(ManagementFactory.getMemoryMXBean().getHeapMemoryUsage().getInit());
@@ -1722,6 +1729,38 @@ public class PlatformConfigurationUtils {
     }
 
     /**
+     * Reads the SSL context factory.
+     *
+     * @param in Reader.
+     * @return Config.
+     */
+    private static SslContextFactory readSslContextFactory(BinaryRawReader in) 
{
+        SslContextFactory f = new SslContextFactory();
+
+        f.setKeyAlgorithm(in.readString());
+
+        f.setKeyStoreType(in.readString());
+        f.setKeyStoreFilePath(in.readString());
+        String pwd = in.readString();
+        if (pwd != null)
+            f.setKeyStorePassword(pwd.toCharArray());
+
+        f.setProtocol(in.readString());
+
+        f.setTrustStoreType(in.readString());
+        String path = in.readString();
+        if (path != null)
+            f.setTrustStoreFilePath(path);
+        else
+            f.setTrustManagers(SslContextFactory.getDisabledTrustManager());
+        pwd = in.readString();
+        if (pwd != null)
+            f.setTrustStorePassword(pwd.toCharArray());
+
+        return f;
+    }
+
+    /**
      * Writes the persistent store configuration.
      *
      * @param w Writer.
@@ -1842,6 +1881,37 @@ public class PlatformConfigurationUtils {
     }
 
     /**
+     * Writes the SSL context factory.
+     *
+     * @param w Writer.
+     * @param factory SslContextFactory.
+     */
+    private static void writeSslContextFactory(BinaryRawWriter w, 
Factory<SSLContext> factory) {
+        assert w != null;
+
+        if (!(factory instanceof SslContextFactory)) {
+            w.writeBoolean(false);
+            return;
+        }
+
+        w.writeBoolean(true);
+
+        SslContextFactory sslCtxFactory = (SslContextFactory)factory;
+
+        w.writeString(sslCtxFactory.getKeyAlgorithm());
+
+        w.writeString(sslCtxFactory.getKeyStoreType());
+        w.writeString(sslCtxFactory.getKeyStoreFilePath());
+        w.writeString(new String(sslCtxFactory.getKeyStorePassword()));
+
+        w.writeString(sslCtxFactory.getProtocol());
+
+        w.writeString(sslCtxFactory.getTrustStoreType());
+        w.writeString(sslCtxFactory.getTrustStoreFilePath());
+        w.writeString(new String(sslCtxFactory.getTrustStorePassword()));
+    }
+
+    /**
      * Reads the data region configuration.
      *
      * @param r Reader.

http://git-wip-us.apache.org/repos/asf/ignite/blob/e58aae48/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Apache.Ignite.Core.Tests.csproj
----------------------------------------------------------------------
diff --git 
a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Apache.Ignite.Core.Tests.csproj
 
b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Apache.Ignite.Core.Tests.csproj
index ab16bf1..91e8ed4 100644
--- 
a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Apache.Ignite.Core.Tests.csproj
+++ 
b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Apache.Ignite.Core.Tests.csproj
@@ -203,6 +203,7 @@
     <Compile Include="Plugin\TestIgnitePluginConfiguration.cs" />
     <Compile Include="Plugin\TestIgnitePluginException.cs" />
     <Compile Include="Plugin\TestIgnitePluginProvider.cs" />
+    <Compile Include="Ssl\SslConfigurationTest.cs" />
     <Compile Include="TaskExtensions.cs" />
     <Compile Include="TestAppConfig.cs" />
     <Compile Include="Binary\BinaryBuilderSelfTestFullFooter.cs" />
@@ -455,6 +456,9 @@
     <Content Include="Config\reconnect-test.xml">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </Content>
+    <Content Include="Config\start-test-grid1-ssl.xml">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
     <Content Include="Config\start-test-grid1.xml">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </Content>
@@ -473,6 +477,30 @@
   <ItemGroup>
     <None Include="Apache.Ignite.Core.Tests.nunit" />
     <None Include="Apache.Ignite.Core.Tests.snk" />
+    <None Include="Config\KeyStore\client.jks">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
+    <None Include="Config\KeyStore\client.pem">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
+    <None Include="Config\KeyStore\client.pfx">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
+    <None Include="Config\KeyStore\generate.sh">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
+    <None Include="Config\KeyStore\server.jks">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
+    <None Include="Config\KeyStore\server.pem">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
+    <None Include="Config\KeyStore\server.pfx">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
+    <None Include="Config\KeyStore\trust.jks">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
     <None Include="Deployment\peer_assembly_app.config">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
@@ -492,6 +520,7 @@
     <None Include="packages.config" />
     <Compile Include="TestUtils.Windows.cs" />
   </ItemGroup>
+  <ItemGroup />
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <Target Name="AfterBuild">
     <Copy 
SourceFiles="$(SolutionDir)Apache.Ignite\bin\$(ConfigurationName)\Apache.Ignite.exe;$(SolutionDir)Apache.Ignite\bin\$(ConfigurationName)\Apache.Ignite.exe.config"
 DestinationFolder="$(ProjectDir)$(OutDir)" SkipUnchangedFiles="false" />

http://git-wip-us.apache.org/repos/asf/ignite/blob/e58aae48/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/KeyStore/client.jks
----------------------------------------------------------------------
diff --git 
a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/KeyStore/client.jks 
b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/KeyStore/client.jks
new file mode 100644
index 0000000..1875c71
Binary files /dev/null and 
b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/KeyStore/client.jks 
differ

http://git-wip-us.apache.org/repos/asf/ignite/blob/e58aae48/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/KeyStore/client.pem
----------------------------------------------------------------------
diff --git 
a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/KeyStore/client.pem 
b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/KeyStore/client.pem
new file mode 100644
index 0000000..a71a87e
--- /dev/null
+++ 
b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/KeyStore/client.pem
@@ -0,0 +1,69 @@
+Bag Attributes
+    friendlyName: client
+    localKeyID: 54 69 6D 65 20 31 33 33 39 32 33 39 38 35 39 34 34 36 
+Key Attributes: <No Attributes>
+-----BEGIN RSA PRIVATE KEY-----
+Proc-Type: 4,ENCRYPTED
+DEK-Info: DES-EDE3-CBC,CE61EDD98349D0C7
+
+Kzl16sj8R7YUXPCEZCqCrY4LSAjiKCRFNOagEehvN9Jpswcz4JbatoFmvVvOCgBF
+7kkeCaALhfM5a+46uynZ1sOOFUOn8fUFgguN3lLInWfm6vTuXDPslg0/tRNI0YqW
+ujfxyzrm1/k4RX0oLzRE1jZr69VZsBmZndkz9nkz3anWKLE7X/VIFV6U/N6YNPch
+BG1Fxpt/HtM9p3B5wNDSjCVaeNP1ROKe3APLRY6k+SppTuntHV5q9Ni82r1l3ahU
+zf2QvocSy9MLh+bGusJGHyJJAGuwPHm6ytPwbXGHn5xe4HPIno28j9kN7EL1ZoUs
+q0PhipAkFrGIM4zg6nAwVdzY5iGySDQ3fWpz2MkrKMDRftBwA3o/M321NBUW9/2X
+l+XmjXcJd0dEOslGxveb6UXLL2YvYszjQXRR4dCV/40bMJL3umRhVSay0NteoXfY
+82rQchm2NHKOiDfB4RpD8JJtVQeDSMXc9TH5y2Ua7FZND60JXtFpdnfCVfVZuBJm
+yBafyIsXR7EQzLG4z28Dvp4fs42A3JkF+e9Aq6Y6MmYA1wsvIKKT9HKEifqKmbgG
+4E9WOZn5IWi4ZJ44VAwN/uBGrLm//3OjByeB9y8vszNbyY8dQ8x5XqnF/IzIvgqc
+uKA8xuLAkTFmgRGQ/lmMDR+iMhet5dCtg9Orb9tYVL55JAb/OfsCX0LTJ3Y2RmIx
+CaFpkUP7KKYD+69ajnFCxvfGnGxyBkf+JeuDYIZVFklVT9SUtL9RJh26jUdvHt2A
+LQerBl8UCkVbPxsxYjdawvxuBNTD6tSRykM8zwtWcvIubp+gxE7png==
+-----END RSA PRIVATE KEY-----
+Bag Attributes
+    friendlyName: 
1.2.840.113549.1.9.1=#1613636c69656e7440677269646761696e2e636f6d,CN=client,OU=Dev,O=GridGain,ST=SPb,C=RU
+    localKeyID: 54 69 6D 65 20 31 33 33 39 32 33 39 38 35 39 34 34 36 
+subject=/C=RU/ST=SPb/O=GridGain/OU=Dev/CN=client/emailAddress=cli...@gridgain.com
+issuer=/C=RU/ST=SPb/L=SPb/O=GridGain/OU=Dev/CN=ca/emailAddress=c...@gridgain.com
+-----BEGIN CERTIFICATE-----
+MIIC2TCCAkKgAwIBAgIBJDANBgkqhkiG9w0BAQUFADB3MQswCQYDVQQGEwJSVTEM
+MAoGA1UECBMDU1BiMQwwCgYDVQQHEwNTUGIxETAPBgNVBAoTCEdyaWRHYWluMQww
+CgYDVQQLEwNEZXYxCzAJBgNVBAMTAmNhMR4wHAYJKoZIhvcNAQkBFg9jYUBncmlk
+Z2Fpbi5jb20wHhcNMTIwNjA5MTEwNDE3WhcNMzIwNjA5MTEwNDE3WjBxMQswCQYD
+VQQGEwJSVTEMMAoGA1UECBMDU1BiMREwDwYDVQQKEwhHcmlkR2FpbjEMMAoGA1UE
+CxMDRGV2MQ8wDQYDVQQDEwZjbGllbnQxIjAgBgkqhkiG9w0BCQEWE2NsaWVudEBn
+cmlkZ2Fpbi5jb20wgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBANIHHcYiA+CP
+EBPKNZJ6mtvN4d9Yj43B5/hzs/TK3e4XImLsMhXaElYtrXQX/SDK7Zv5zdj6AkKH
+QkJ9BT8Jw7wvOQx/v4Qxrl+gTgcf6gjk6DvzqMlZUwH+ohbALj2TWsy9y+0uHKal
+EVrHpbYeB9TGpD+3NHwO/CG4SySk/Y4nAgMBAAGjezB5MAkGA1UdEwQCMAAwLAYJ
+YIZIAYb4QgENBB8WHU9wZW5TU0wgR2VuZXJhdGVkIENlcnRpZmljYXRlMB0GA1Ud
+DgQWBBRD/TKyBQyoVxqEupLzUB8hDrSF6DAfBgNVHSMEGDAWgBS1+Ah4ZG58tImL
+KqLVX+xBKbeFUTANBgkqhkiG9w0BAQUFAAOBgQCL2vhjwcJkA1OJGuXsuO2/87Zu
+HMa7gc4pm+Iol1B1gD2ksQEAU2dz/adD3369H7gZdHuk3RYPeYmD5Ppp9eECDsXc
+gNWrNYaqcSTYWRAUe1/St7vB9HzPdOm/eADfQaMnal6fmjfpzTgg65A/2w4GCsqt
+RL98pvdAft8v5WSx7A==
+-----END CERTIFICATE-----
+Bag Attributes
+    friendlyName: 
1.2.840.113549.1.9.1=#160f636140677269646761696e2e636f6d,CN=ca,OU=Dev,O=GridGain,L=SPb,ST=SPb,C=RU
+subject=/C=RU/ST=SPb/L=SPb/O=GridGain/OU=Dev/CN=ca/emailAddress=c...@gridgain.com
+issuer=/C=RU/ST=SPb/L=SPb/O=GridGain/OU=Dev/CN=ca/emailAddress=c...@gridgain.com
+-----BEGIN CERTIFICATE-----
+MIIDSTCCArKgAwIBAgIJAKmuj925215OMA0GCSqGSIb3DQEBBQUAMHcxCzAJBgNV
+BAYTAlJVMQwwCgYDVQQIEwNTUGIxDDAKBgNVBAcTA1NQYjERMA8GA1UEChMIR3Jp
+ZEdhaW4xDDAKBgNVBAsTA0RldjELMAkGA1UEAxMCY2ExHjAcBgkqhkiG9w0BCQEW
+D2NhQGdyaWRnYWluLmNvbTAeFw0xMjA2MDkwNjU1MTJaFw0zMjA2MDQwNjU1MTJa
+MHcxCzAJBgNVBAYTAlJVMQwwCgYDVQQIEwNTUGIxDDAKBgNVBAcTA1NQYjERMA8G
+A1UEChMIR3JpZEdhaW4xDDAKBgNVBAsTA0RldjELMAkGA1UEAxMCY2ExHjAcBgkq
+hkiG9w0BCQEWD2NhQGdyaWRnYWluLmNvbTCBnzANBgkqhkiG9w0BAQEFAAOBjQAw
+gYkCgYEAtd16DCObyM63NKF/cvRcE+8cr1dc3c7mSnTEQ61WfqPJ2QqsQAB6e+5+
+q9Np1SaJyqFTTag6483ibrU+DkGPGgEXndRHtQHQPbStWsf47DBBW2bMi6+bkPox
+Cp6BhYO1DQUG5tP9CQ/g32mLQLB7LH0KtS1JcKpAClCjjWZC8b8CAwEAAaOB3DCB
+2TAdBgNVHQ4EFgQUtfgIeGRufLSJiyqi1V/sQSm3hVEwgakGA1UdIwSBoTCBnoAU
+tfgIeGRufLSJiyqi1V/sQSm3hVGhe6R5MHcxCzAJBgNVBAYTAlJVMQwwCgYDVQQI
+EwNTUGIxDDAKBgNVBAcTA1NQYjERMA8GA1UEChMIR3JpZEdhaW4xDDAKBgNVBAsT
+A0RldjELMAkGA1UEAxMCY2ExHjAcBgkqhkiG9w0BCQEWD2NhQGdyaWRnYWluLmNv
+bYIJAKmuj925215OMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADgYEAhrzd
+qusVLHO3wtyu0o+EAFyoDv5avCBTFsQLeDDPMyfDcEO6wfxhTanfH8C7gZc0rRnv
+2nbkVbfortHIOfU2wch5gClju0cXSTIXSKOAWPIMp3HLxC/l+KpFo3epFz0rsMVB
+M1ymOOdRDdAcTxcTTGY7WJXquEM3ZbT5Gh4RLDk=
+-----END CERTIFICATE-----

http://git-wip-us.apache.org/repos/asf/ignite/blob/e58aae48/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/KeyStore/client.pfx
----------------------------------------------------------------------
diff --git 
a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/KeyStore/client.pfx 
b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/KeyStore/client.pfx
new file mode 100644
index 0000000..494a63e
Binary files /dev/null and 
b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/KeyStore/client.pfx 
differ

http://git-wip-us.apache.org/repos/asf/ignite/blob/e58aae48/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/KeyStore/generate.sh
----------------------------------------------------------------------
diff --git 
a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/KeyStore/generate.sh 
b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/KeyStore/generate.sh
new file mode 100644
index 0000000..9b1d6fa
--- /dev/null
+++ 
b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/KeyStore/generate.sh
@@ -0,0 +1,99 @@
+#!/bin/sh
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# Initialize openssl & CA.
+#
+# Instruction: 
https://access.redhat.com/documentation/en-US/Red_Hat_JBoss_Fuse/6.0/html/Web_Services_Security_Guide/files/i305191.html
+#
+
+# Path to CA certificate.
+ca_cert=/usr/ssl/ca/ca.pem
+
+#
+# Create artifacts for specified name: key pair-> cert request -> ca-signed 
certificate.
+# Save private key and CA-signed certificate into key storages: PEM, JKS, PFX 
(PKCS12).
+#
+# param $1 Artifact name.
+# param $2 Password for all keys and storages.
+#
+function createStore {
+       artifact=$1
+       pwd=$2
+
+       echo
+       echo Clean up all old artifacts: ${artifact}.*
+       rm -f ${artifact}.*
+
+       echo
+       echo Generate a certificate and private key pair for ${artifact}.
+       keytool -genkey -keyalg RSA -keysize 1024 -dname 
"emailAddress=${artifact}@ignite.com, CN=${artifact}, OU=Dev, O=Ignite, L=SPb, 
ST=SPb, C=RU" -validity 7305 -alias ${artifact} -keypass ${pwd} -keystore 
${artifact}.jks -storepass ${pwd}
+
+       echo
+       echo Create a certificate signing request for ${artifact}.
+       keytool -certreq -alias ${artifact} -file ${artifact}.csr -keypass 
${pwd} -keystore ${artifact}.jks -storepass ${pwd}
+
+       echo
+       echo "Sign the CSR using CA (default SSL configuration)."
+       openssl ca -days 7305 -in ${artifact}.csr -out ${artifact}.pem
+
+       echo
+       echo Convert to PEM format.
+       openssl x509 -in ${artifact}.pem -out ${artifact}.pem -outform PEM
+
+       echo
+       echo Concatenate the CA certificate file and ${artifact}.pem 
certificate file into certificates chain.
+       cat ${artifact}.pem ${ca_cert} > ${artifact}.chain
+
+       echo
+       echo Update the keystore, ${artifact}.jks, by importing the CA 
certificate.
+       keytool -import -alias ca          -file ${ca_cert} -keypass ${pwd} 
-noprompt -trustcacerts -keystore ${artifact}.jks -storepass ${pwd}
+
+       echo
+       echo Update the keystore, ${artifact}.jks, by importing the full 
certificate chain for the ${artifact}.
+       keytool -import -alias ${artifact} -file ${artifact}.chain -keypass 
${pwd} -noprompt -trustcacerts -keystore ${artifact}.jks -storepass ${pwd}
+
+       echo
+       echo Generate PKCS12 storage for the private key and certificate chain.
+       keytool -importkeystore \
+               -srcstoretype JKS -deststoretype PKCS12 \
+               -srckeystore ${artifact}.jks -destkeystore ${artifact}.pfx \
+               -srcstorepass ${pwd} -deststorepass ${pwd} \
+               -srcalias ${artifact} -destalias ${artifact} \
+               -srckeypass ${pwd} -destkeypass ${pwd} \
+               -noprompt
+
+       echo
+       echo Generate PEM storage for the private key and certificate chain.
+       openssl pkcs12 \
+               -in ${artifact}.pfx -out ${artifact}.pem \
+               -passin pass:${pwd} -passout pass:${pwd}
+
+       rm -f ${artifact}.chain ${artifact}.csr
+}
+
+pwd="123456"
+
+createStore "client" ${pwd}
+createStore "server" ${pwd}
+
+echo
+echo Update trust store with certificates: CA, client, server.
+keytool -import -alias ca -file ${ca_cert} -keypass ${pwd} -noprompt 
-trustcacerts -keystore trust.jks -storepass ${pwd}
+#keytool -importkeystore -srckeystore client.jks -destkeystore trust.jks 
-srcstorepass ${pwd} -deststorepass ${pwd} -alias client -noprompt
+#keytool -importkeystore -srckeystore server.jks -destkeystore trust.jks 
-srcstorepass ${pwd} -deststorepass ${pwd} -alias server -noprompt
+keytool -export -alias client -keystore client.jks -storepass ${pwd} | keytool 
-importcert -alias client -noprompt -keystore trust.jks -storepass ${pwd}
+keytool -export -alias server -keystore server.jks -storepass ${pwd} | keytool 
-importcert -alias server -noprompt -keystore trust.jks -storepass ${pwd}

http://git-wip-us.apache.org/repos/asf/ignite/blob/e58aae48/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/KeyStore/server.jks
----------------------------------------------------------------------
diff --git 
a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/KeyStore/server.jks 
b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/KeyStore/server.jks
new file mode 100644
index 0000000..006ecec
Binary files /dev/null and 
b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/KeyStore/server.jks 
differ

http://git-wip-us.apache.org/repos/asf/ignite/blob/e58aae48/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/KeyStore/server.pem
----------------------------------------------------------------------
diff --git 
a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/KeyStore/server.pem 
b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/KeyStore/server.pem
new file mode 100644
index 0000000..b8d2174
--- /dev/null
+++ 
b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/KeyStore/server.pem
@@ -0,0 +1,69 @@
+Bag Attributes
+    friendlyName: server
+    localKeyID: 54 69 6D 65 20 31 33 33 39 32 33 39 38 36 35 34 32 34 
+Key Attributes: <No Attributes>
+-----BEGIN RSA PRIVATE KEY-----
+Proc-Type: 4,ENCRYPTED
+DEK-Info: DES-EDE3-CBC,FA0E52C780B7D5E8
+
+3B9LjnvxRjASvnPUp3c6ICSk02znhERV1XRQLRR7rhGnMJVI1FJHzRFJsLTmOE/B
+irHCzKtOAw3MDlDhRoAncLiZcvaoUwzWCU2SZ0IS7ERLi+wDoV22ftGfXV815x0Y
+L2ut3BatgkzFpY6QUGK9ReEenLfZ6AfGhImjAubYvPr1Z3q+fk5ZoNz9Z9ZgpmEX
+BfQb1A1XHXvlu/dUXdn46t2DSpYD7RgqTRKCmCJeerWrZak2CwvCCIPC5w0+IHbT
+nBTyTquhig3bbsybZHjnNsttLeBPQrhnc0K+ydbNDcHS3OQB7sqPYce5fz2Y2dnF
+Adva9r7o9K06e3P0/TSTyHQJyHiFsns157wBOXElRQvGGi8XtDaKHIYIJROeRbKU
+2kRYcDOdwN7aRt9k3q7Jo52IyHQ78asL1f1kN4kt1IHl5CVFMPyWPgXeSj+hMzOF
+hkV0dWfSX8ZdIZOVzFMZOrqf5dXzAGs3GIbkaWX2lG5DWVnVobch82kDuTYnCIJs
+9N7VwwptUCsYqM5WWDo1OUYfvljEhoYyIXNxhn94Fe2lIXYttymsaIW/Dt/rwh9K
+ukKGOnehtayNQKaOtiWfnqUxHLJTUZOTGd3ImJQb6A/Ygs79xO1xeWPlYQilNdEN
+A/d2x6Auo3P0Axf+FMMNZDfuXzd02FAnYWz2McQT8RXCG0/CIsrYTydVnFRyXTrM
+/AjzPgp54r9l3/xBg1GSPwjKb75Vsw4WMG0HUDvBRIGTw3tr3+ng30/JtN93H7Ga
+TMqUuOzG1qgRhT0yFUz5pknGesjTnVKzd9TbYD9KtuNHFsTC+7y5Hw==
+-----END RSA PRIVATE KEY-----
+Bag Attributes
+    friendlyName: 
1.2.840.113549.1.9.1=#161373657276657240677269646761696e2e636f6d,CN=server,OU=Dev,O=GridGain,ST=SPb,C=RU
+    localKeyID: 54 69 6D 65 20 31 33 33 39 32 33 39 38 36 35 34 32 34 
+subject=/C=RU/ST=SPb/O=GridGain/OU=Dev/CN=server/emailAddress=ser...@gridgain.com
+issuer=/C=RU/ST=SPb/L=SPb/O=GridGain/OU=Dev/CN=ca/emailAddress=c...@gridgain.com
+-----BEGIN CERTIFICATE-----
+MIIC2TCCAkKgAwIBAgIBJTANBgkqhkiG9w0BAQUFADB3MQswCQYDVQQGEwJSVTEM
+MAoGA1UECBMDU1BiMQwwCgYDVQQHEwNTUGIxETAPBgNVBAoTCEdyaWRHYWluMQww
+CgYDVQQLEwNEZXYxCzAJBgNVBAMTAmNhMR4wHAYJKoZIhvcNAQkBFg9jYUBncmlk
+Z2Fpbi5jb20wHhcNMTIwNjA5MTEwNDIyWhcNMzIwNjA5MTEwNDIyWjBxMQswCQYD
+VQQGEwJSVTEMMAoGA1UECBMDU1BiMREwDwYDVQQKEwhHcmlkR2FpbjEMMAoGA1UE
+CxMDRGV2MQ8wDQYDVQQDEwZzZXJ2ZXIxIjAgBgkqhkiG9w0BCQEWE3NlcnZlckBn
+cmlkZ2Fpbi5jb20wgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBANb9uaho52Cs
+V5qd70ID38ElGyLH7ac366biFypx9wdkqtie8H8qNjm+JUpHQnDqfxFEh8Pnny6K
+ytLd8yvtvBibWXFOCxwPw1xCf63q+vMGGnrz6T9uv3L2JDUNhexuLycei8Uf6K6J
+jvstGKOSD4uvA5USzn2Hf1yJrEAL5nfVAgMBAAGjezB5MAkGA1UdEwQCMAAwLAYJ
+YIZIAYb4QgENBB8WHU9wZW5TU0wgR2VuZXJhdGVkIENlcnRpZmljYXRlMB0GA1Ud
+DgQWBBSEo9T8PK4ZFCB6lCQ1Vheyop8sMjAfBgNVHSMEGDAWgBS1+Ah4ZG58tImL
+KqLVX+xBKbeFUTANBgkqhkiG9w0BAQUFAAOBgQCv9LKixciXDP4p2grYGBoE3WMG
+Du1S+seCrg+NGcRihtQEwGCwYZ8O2UHtqjKeBeKe8wLo8X+niUdjUO3pFftsQhg4
+iMViBxlEXtnGGi+UAm4m2F9SDsPmyHZ4BWxjD/n49HhU4ZFure6BySkx5l59oyPp
+Yj+nsBrWq7aK4tD7sg==
+-----END CERTIFICATE-----
+Bag Attributes
+    friendlyName: 
1.2.840.113549.1.9.1=#160f636140677269646761696e2e636f6d,CN=ca,OU=Dev,O=GridGain,L=SPb,ST=SPb,C=RU
+subject=/C=RU/ST=SPb/L=SPb/O=GridGain/OU=Dev/CN=ca/emailAddress=c...@gridgain.com
+issuer=/C=RU/ST=SPb/L=SPb/O=GridGain/OU=Dev/CN=ca/emailAddress=c...@gridgain.com
+-----BEGIN CERTIFICATE-----
+MIIDSTCCArKgAwIBAgIJAKmuj925215OMA0GCSqGSIb3DQEBBQUAMHcxCzAJBgNV
+BAYTAlJVMQwwCgYDVQQIEwNTUGIxDDAKBgNVBAcTA1NQYjERMA8GA1UEChMIR3Jp
+ZEdhaW4xDDAKBgNVBAsTA0RldjELMAkGA1UEAxMCY2ExHjAcBgkqhkiG9w0BCQEW
+D2NhQGdyaWRnYWluLmNvbTAeFw0xMjA2MDkwNjU1MTJaFw0zMjA2MDQwNjU1MTJa
+MHcxCzAJBgNVBAYTAlJVMQwwCgYDVQQIEwNTUGIxDDAKBgNVBAcTA1NQYjERMA8G
+A1UEChMIR3JpZEdhaW4xDDAKBgNVBAsTA0RldjELMAkGA1UEAxMCY2ExHjAcBgkq
+hkiG9w0BCQEWD2NhQGdyaWRnYWluLmNvbTCBnzANBgkqhkiG9w0BAQEFAAOBjQAw
+gYkCgYEAtd16DCObyM63NKF/cvRcE+8cr1dc3c7mSnTEQ61WfqPJ2QqsQAB6e+5+
+q9Np1SaJyqFTTag6483ibrU+DkGPGgEXndRHtQHQPbStWsf47DBBW2bMi6+bkPox
+Cp6BhYO1DQUG5tP9CQ/g32mLQLB7LH0KtS1JcKpAClCjjWZC8b8CAwEAAaOB3DCB
+2TAdBgNVHQ4EFgQUtfgIeGRufLSJiyqi1V/sQSm3hVEwgakGA1UdIwSBoTCBnoAU
+tfgIeGRufLSJiyqi1V/sQSm3hVGhe6R5MHcxCzAJBgNVBAYTAlJVMQwwCgYDVQQI
+EwNTUGIxDDAKBgNVBAcTA1NQYjERMA8GA1UEChMIR3JpZEdhaW4xDDAKBgNVBAsT
+A0RldjELMAkGA1UEAxMCY2ExHjAcBgkqhkiG9w0BCQEWD2NhQGdyaWRnYWluLmNv
+bYIJAKmuj925215OMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADgYEAhrzd
+qusVLHO3wtyu0o+EAFyoDv5avCBTFsQLeDDPMyfDcEO6wfxhTanfH8C7gZc0rRnv
+2nbkVbfortHIOfU2wch5gClju0cXSTIXSKOAWPIMp3HLxC/l+KpFo3epFz0rsMVB
+M1ymOOdRDdAcTxcTTGY7WJXquEM3ZbT5Gh4RLDk=
+-----END CERTIFICATE-----

http://git-wip-us.apache.org/repos/asf/ignite/blob/e58aae48/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/KeyStore/server.pfx
----------------------------------------------------------------------
diff --git 
a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/KeyStore/server.pfx 
b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/KeyStore/server.pfx
new file mode 100644
index 0000000..798e2f9
Binary files /dev/null and 
b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/KeyStore/server.pfx 
differ

http://git-wip-us.apache.org/repos/asf/ignite/blob/e58aae48/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/KeyStore/trust.jks
----------------------------------------------------------------------
diff --git 
a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/KeyStore/trust.jks 
b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/KeyStore/trust.jks
new file mode 100644
index 0000000..a00f125
Binary files /dev/null and 
b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/KeyStore/trust.jks 
differ

http://git-wip-us.apache.org/repos/asf/ignite/blob/e58aae48/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/full-config.xml
----------------------------------------------------------------------
diff --git 
a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/full-config.xml 
b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/full-config.xml
index e1ca13a..774e362 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/full-config.xml
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/full-config.xml
@@ -156,4 +156,7 @@
                                         metricsRateTimeInterval="00:00:03" 
metricsSubIntervalCount="6"
                                         swapPath="swap2" 
checkpointPageBufferSize="8" />
     </dataStorageConfiguration>
+    <sslContextFactory type='SslContextFactory' protocol='SSL'
+                       keyStoreFilePath='KeyStore/server.jks' 
keyStorePassword='123456' 
+                       trustStoreFilePath='KeyStore/trust.jks' 
trustStorePassword='123456'/>
 </igniteConfiguration>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/e58aae48/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/start-test-grid1-ssl.xml
----------------------------------------------------------------------
diff --git 
a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/start-test-grid1-ssl.xml
 
b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/start-test-grid1-ssl.xml
new file mode 100644
index 0000000..5f3bfe6
--- /dev/null
+++ 
b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/start-test-grid1-ssl.xml
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+
+<beans xmlns="http://www.springframework.org/schema/beans";
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+       xsi:schemaLocation="http://www.springframework.org/schema/beans
+        http://www.springframework.org/schema/beans/spring-beans.xsd";>
+    <bean id="grid.cfg" 
class="org.apache.ignite.configuration.IgniteConfiguration">
+        <property name="localHost" value="127.0.0.1"/>
+        <property name="connectorConfiguration"><null/></property>
+
+        <property name="igniteInstanceName" value="grid1"/>
+
+        <property name="cacheConfiguration">
+            <list>
+                <bean 
class="org.apache.ignite.configuration.CacheConfiguration">
+                    <property name="name" value="cache1"/>
+                    <property name="rebalanceMode" value="SYNC"/>
+                </bean>
+            </list>
+        </property>
+
+        <property name="discoverySpi">
+            <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
+                <property name="ipFinder">
+                    <bean 
class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
+                        <property name="addresses">
+                            <list>
+                                <!-- In distributed environment, replace with 
actual host IP address. -->
+                                <value>127.0.0.1:47500</value>
+                            </list>
+                        </property>
+                    </bean>
+                </property>
+                <property name="socketTimeout" value="300" />
+            </bean>
+        </property>
+
+        <!-- Ssl context. -->
+        <property name="sslContextFactory">
+            <bean class="org.apache.ignite.ssl.SslContextFactory">
+                <property name="keyStoreFilePath" 
value="Config/KeyStore/server.jks"/>
+                <property name="keyStorePassword" value="123456"/>
+                <property name="trustStoreFilePath" 
value="Config/KeyStore/trust.jks"/>
+                <property name="trustStorePassword" value="123456"/>
+            </bean>
+        </property>        
+    </bean>
+</beans>

http://git-wip-us.apache.org/repos/asf/ignite/blob/e58aae48/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationSerializerTest.cs
----------------------------------------------------------------------
diff --git 
a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationSerializerTest.cs
 
b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationSerializerTest.cs
index da80e41..412f4bc 100644
--- 
a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationSerializerTest.cs
+++ 
b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationSerializerTest.cs
@@ -38,6 +38,7 @@ namespace Apache.Ignite.Core.Tests
     using Apache.Ignite.Core.Cache.Eviction;
     using Apache.Ignite.Core.Cache.Expiry;
     using Apache.Ignite.Core.Cache.Store;
+    using Apache.Ignite.Core.Cluster.Ssl;
     using Apache.Ignite.Core.Common;
     using Apache.Ignite.Core.Communication.Tcp;
     using Apache.Ignite.Core.Configuration;
@@ -336,6 +337,8 @@ namespace Apache.Ignite.Core.Tests
             Assert.AreEqual(6, dr.MetricsSubIntervalCount);
             Assert.AreEqual("swap2", dr.SwapPath);
             Assert.IsFalse(dr.MetricsEnabled);
+
+            Assert.IsInstanceOf<SslContextFactory>(cfg.SslContextFactory);
         }
 
         /// <summary>
@@ -997,7 +1000,8 @@ namespace Apache.Ignite.Core.Tests
                             SwapPath = Path.GetTempPath()
                         }
                     }
-                }
+                },
+                SslContextFactory = new SslContextFactory()
             };
         }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/e58aae48/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Ssl/SslConfigurationTest.cs
----------------------------------------------------------------------
diff --git 
a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Ssl/SslConfigurationTest.cs 
b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Ssl/SslConfigurationTest.cs
new file mode 100644
index 0000000..0b1b6db
--- /dev/null
+++ 
b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Ssl/SslConfigurationTest.cs
@@ -0,0 +1,286 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+namespace Apache.Ignite.Core.Tests.Ssl 
+{
+    using System.Linq;
+    using Apache.Ignite.Core.Cluster.Ssl;
+    using Apache.Ignite.Core.Common;
+    using NUnit.Framework;
+
+    /// <summary>
+    /// Ignite start/stop tests.
+    /// </summary>
+    [Category(TestUtils.CategoryIntensive)]
+    public class SslConfigurationTest
+    {
+        /** Test Password. */
+        private const string Password = "123456";
+
+        /** Key Store file. */
+        private const string KeyStoreFilePath = @"Config/KeyStore/server.jks";
+
+        /** Trust Store file. */
+        private const string TrustStoreFilePath = @"Config/KeyStore/trust.jks";
+
+        /// <summary>
+        /// Test teardown.
+        /// </summary>
+        [TearDown]
+        public void TearDown()
+        {
+            TestUtils.KillProcesses();
+            Ignition.StopAll(true);
+        }
+
+        /// <summary>
+        /// Returns SSL Context factory for tests.
+        /// </summary>
+        private SslContextFactory GetSslContextFactory()
+        {
+            return new SslContextFactory(KeyStoreFilePath, Password, 
TrustStoreFilePath, Password);
+        }
+
+        /// <summary>
+        /// Tests Node Start with SslContextFactory
+        /// </summary>
+        [Test]
+        public void TestStart([Values(null, TrustStoreFilePath)] string 
trustStoreFilePath)
+        {
+            var factory = GetSslContextFactory();
+            factory.TrustStoreFilePath = trustStoreFilePath;
+
+            var cfg = new IgniteConfiguration(TestUtils.GetTestConfiguration())
+            {
+                SslContextFactory = factory
+            };
+
+            var grid = Ignition.Start(cfg);
+
+            Assert.IsNotNull(grid);
+
+            Assert.AreEqual(1, grid.GetCluster().GetNodes().Count);
+
+            var cfgFactory = grid.GetConfiguration().SslContextFactory;
+
+            Assert.True(cfgFactory is SslContextFactory);
+            var sslContextFactory = (SslContextFactory)cfgFactory;
+            
+            Assert.AreEqual(Password, sslContextFactory.KeyStorePassword);
+            Assert.AreEqual(Password, sslContextFactory.TrustStorePassword);
+            Assert.AreEqual(KeyStoreFilePath, 
sslContextFactory.KeyStoreFilePath);
+            Assert.AreEqual(trustStoreFilePath, 
sslContextFactory.TrustStoreFilePath);
+        }
+
+        /// <summary>
+        /// Tests IgniteException when SSL configuration
+        /// </summary>
+        [Test]
+        public void TestConfigurationExceptions()
+        {
+            var cfg = new IgniteConfiguration(TestUtils.GetTestConfiguration())
+            {
+                SslContextFactory = new 
SslContextFactory(@"WrongPath/server.jks", Password, 
+                                                          TrustStoreFilePath, 
Password)
+            };
+
+            var ex = Assert.Throws<IgniteException>(() => Ignition.Start(cfg));
+            Assert.True(ex.Message.StartsWith(@"Failed to initialize key store 
(key store file was not found): " + 
+                @"[path=WrongPath/server.jks"));
+
+            cfg.SslContextFactory = new SslContextFactory(KeyStoreFilePath, 
Password,
+                                                          
@"WrongPath/trust.jks", Password);
+
+            ex = Assert.Throws<IgniteException>(() => Ignition.Start(cfg));
+            Assert.True(ex.Message.StartsWith(@"Failed to initialize key store 
(key store file was not found): " + 
+                @"[path=WrongPath/trust.jks"));
+
+            cfg.SslContextFactory = new SslContextFactory(KeyStoreFilePath, 
"654321",
+                                                          TrustStoreFilePath, 
Password);
+
+            ex = Assert.Throws<IgniteException>(() => Ignition.Start(cfg));
+            Assert.AreEqual(@"Failed to initialize key store (I/O error 
occurred): Config/KeyStore/server.jks",
+                ex.Message);
+
+            cfg.SslContextFactory = new SslContextFactory(KeyStoreFilePath, 
Password,
+                                                          TrustStoreFilePath, 
"654321");
+
+            ex = Assert.Throws<IgniteException>(() => Ignition.Start(cfg));
+            Assert.AreEqual(@"Failed to initialize key store (I/O error 
occurred): Config/KeyStore/trust.jks",
+                ex.Message);
+        }
+
+        /// <summary>
+        /// Tests Node Start with SslContextFactory from Spring xml.
+        /// </summary>
+        [Test]
+        public void TestStartWithConfigPath()
+        {
+            var cfg = new IgniteConfiguration
+            {
+                SpringConfigUrl = @"config/start-test-grid1-ssl.xml",
+                JvmClasspath = TestUtils.CreateTestClasspath()
+            };
+
+            var grid = Ignition.Start(cfg);
+
+            Assert.IsNotNull(grid);
+
+            Assert.AreEqual(1, grid.GetCluster().GetNodes().Count);
+
+            var factory = grid.GetConfiguration().SslContextFactory;
+
+            Assert.True(factory is SslContextFactory);
+            var sslContextFactory = (SslContextFactory)factory;
+
+            Assert.AreEqual(Password, sslContextFactory.KeyStorePassword);
+            Assert.AreEqual(Password, sslContextFactory.TrustStorePassword);
+            Assert.AreEqual(KeyStoreFilePath, 
sslContextFactory.KeyStoreFilePath);
+            Assert.AreEqual(TrustStoreFilePath, 
sslContextFactory.TrustStoreFilePath);
+        }
+
+        /// <summary>
+        /// Simple test with 2 SSL nodes.
+        /// </summary>
+        [Test]
+        public void TestTwoServers()
+        {
+            var cfg1 = new IgniteConfiguration
+            {
+                SpringConfigUrl = @"config/start-test-grid1-ssl.xml",
+                JvmOptions = TestUtils.TestJavaOptions(),
+                JvmClasspath = TestUtils.CreateTestClasspath(),
+            };
+
+            var cfg2 = new IgniteConfiguration
+            {
+                SpringConfigUrl = @"config/start-test-grid2.xml",
+                JvmOptions = TestUtils.TestJavaOptions(),
+                JvmClasspath = TestUtils.CreateTestClasspath(),
+                SslContextFactory = GetSslContextFactory()
+            };
+
+            var grid1 = Ignition.Start(cfg1);
+
+            Assert.AreEqual("grid1", grid1.Name);
+            Assert.AreSame(grid1, Ignition.GetIgnite());
+            Assert.AreSame(grid1, Ignition.GetAll().Single());
+
+            var grid2 = Ignition.Start(cfg2);
+
+            Assert.AreEqual("grid2", grid2.Name);
+            Assert.Throws<IgniteException>(() => Ignition.GetIgnite());
+
+            Assert.AreSame(grid1, Ignition.GetIgnite("grid1"));
+            Assert.AreSame(grid1, Ignition.TryGetIgnite("grid1"));
+
+            Assert.AreSame(grid2, Ignition.GetIgnite("grid2"));
+            Assert.AreSame(grid2, Ignition.TryGetIgnite("grid2"));
+
+            Assert.AreEqual(new[] {grid1, grid2}, Ignition.GetAll().OrderBy(x 
=> x.Name).ToArray());
+
+            Assert.AreEqual(2, grid1.GetCluster().GetNodes().Count);
+            Assert.AreEqual(2, grid2.GetCluster().GetNodes().Count);
+
+            Ignition.StopAll(true);
+        }
+
+        /// <summary>
+        /// Simple test with 1 SSL node and 1 no-SSL node.
+        /// </summary>
+        [Test]
+        public void TestSslConfigurationMismatch()
+        {
+            var cfg = new IgniteConfiguration
+            {
+                SpringConfigUrl = @"config/start-test-grid1.xml",
+                JvmOptions = TestUtils.TestJavaOptions(),
+                JvmClasspath = TestUtils.CreateTestClasspath(),
+            };
+
+            var sslCfg = new IgniteConfiguration
+            {
+                SpringConfigUrl = @"config/start-test-grid2.xml",
+                JvmOptions = TestUtils.TestJavaOptions(),
+                JvmClasspath = TestUtils.CreateTestClasspath(),
+                SslContextFactory = GetSslContextFactory()
+            };
+
+            Ignition.Start(cfg);
+
+            var ex = Assert.Throws<IgniteException>(() => 
Ignition.Start(sslCfg));
+            Assert.True(ex.Message.StartsWith(@"Unable to establish secure 
connection. " + 
+                                              @"Was remote cluster configured 
with SSL?"));
+
+            Ignition.StopAll(true);
+
+            Ignition.Start(sslCfg);
+
+            ex = Assert.Throws<IgniteException>(() => Ignition.Start(cfg));
+            Assert.True(ex.Message.StartsWith(@"Unable to establish secure 
connection. " +
+                                              @"Was remote cluster configured 
with SSL?"));
+        }
+
+
+        /// <summary>
+        /// Tests the client-server mode.
+        /// </summary>
+        [Test]
+        public void TestClientServer([Values(null, TrustStoreFilePath)] string 
trustStoreFilePath)
+        {
+            var factory = GetSslContextFactory();
+            factory.TrustStoreFilePath = trustStoreFilePath;
+
+            var servCfg = new 
IgniteConfiguration(TestUtils.GetTestConfiguration())
+            {
+                SpringConfigUrl = @"config/start-test-grid1.xml",
+                SslContextFactory = factory
+            };
+
+            var clientCfg = new 
IgniteConfiguration(TestUtils.GetTestConfiguration())
+            {
+                SpringConfigUrl = @"config/start-test-grid2.xml",
+                SslContextFactory = factory
+            };
+
+            try
+            {
+                using (var serv = Ignition.Start(servCfg))  // start 
server-mode ignite first
+                {
+                    Assert.IsFalse(serv.GetCluster().GetLocalNode().IsClient);
+
+                    Ignition.ClientMode = true;
+
+                    using (var grid = Ignition.Start(clientCfg))
+                    {
+                        
Assert.IsTrue(grid.GetCluster().GetLocalNode().IsClient);
+
+                        Assert.AreEqual(2, grid.GetCluster().GetNodes().Count);
+                        Assert.AreEqual(2, serv.GetCluster().GetNodes().Count);
+
+                        Assert.AreEqual(1, 
grid.GetCluster().ForServers().GetNodes().Count);
+                        Assert.AreEqual(1, 
serv.GetCluster().ForServers().GetNodes().Count);
+                    }
+                }
+            }
+            finally 
+            {
+                Ignition.ClientMode = false;
+            }
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/e58aae48/modules/platforms/dotnet/Apache.Ignite.Core/Apache.Ignite.Core.csproj
----------------------------------------------------------------------
diff --git 
a/modules/platforms/dotnet/Apache.Ignite.Core/Apache.Ignite.Core.csproj 
b/modules/platforms/dotnet/Apache.Ignite.Core/Apache.Ignite.Core.csproj
index d99b60e..80b15c1 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Apache.Ignite.Core.csproj
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Apache.Ignite.Core.csproj
@@ -70,6 +70,7 @@
     <Compile Include="Client\IgniteClientException.cs" />
     <Compile Include="Client\IIgniteClient.cs" />
     <Compile Include="Common\ExceptionFactory.cs" />
+    <Compile Include="Cluster\Ssl\ISslContextFactory.cs" />
     <Compile Include="Configuration\Package-Info.cs" />
     <Compile Include="Configuration\ClientConnectorConfiguration.cs" />
     <Compile Include="Datastream\DataStreamerDefaults.cs" />
@@ -93,6 +94,8 @@
     <Compile Include="Client\ClientStatusCode.cs" />
     <Compile Include="Events\LocalEventListener.cs" />
     <Compile Include="Impl\Cluster\BaselineNode.cs" />
+    <Compile Include="Cluster\Ssl\SslContextFactory.cs" />
+    <Compile Include="Impl\Cluster\Ssl\SslFactorySerializer.cs" />
     <Compile Include="Impl\DataStorageMetrics.cs" />
     <Compile Include="Impl\IIgniteInternal.cs" />
     <Compile Include="Impl\Client\Cache\CacheClient.cs" />
@@ -567,15 +570,16 @@
       <SubType>Designer</SubType>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
-    <None Include="NuGet\Uninstall.ps1" />
-    <None Include="NuGet\PostBuild.ps1" />
-    <None Include="NuGet\Install.ps1" />
-    <None Include="Apache.Ignite.Core.snk" />
     <None Include="IgniteConfigurationSection.xsd">
       <SubType>Designer</SubType>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
+    <None Include="NuGet\Uninstall.ps1" />
+    <None Include="NuGet\PostBuild.ps1" />
+    <None Include="NuGet\Install.ps1" />
+    <None Include="Apache.Ignite.Core.snk" />
   </ItemGroup>
+  <ItemGroup />
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <!-- To modify your build process, add your task inside one of the targets 
below and uncomment it.
        Other similar extension points exist, see Microsoft.Common.targets.

http://git-wip-us.apache.org/repos/asf/ignite/blob/e58aae48/modules/platforms/dotnet/Apache.Ignite.Core/Cluster/Ssl/ISslContextFactory.cs
----------------------------------------------------------------------
diff --git 
a/modules/platforms/dotnet/Apache.Ignite.Core/Cluster/Ssl/ISslContextFactory.cs 
b/modules/platforms/dotnet/Apache.Ignite.Core/Cluster/Ssl/ISslContextFactory.cs
new file mode 100644
index 0000000..6de1038
--- /dev/null
+++ 
b/modules/platforms/dotnet/Apache.Ignite.Core/Cluster/Ssl/ISslContextFactory.cs
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+namespace Apache.Ignite.Core.Cluster.Ssl
+{
+    /// <summary>
+    /// Interface for SSL Context Factory.
+    /// </summary>
+    public interface ISslContextFactory
+    {
+        /// <summary>
+        /// Path to key store file.
+        /// </summary>
+        string KeyStoreFilePath { get; set; }
+
+        /// <summary>
+        /// Key store password.
+        /// </summary>
+        string KeyStorePassword { get; set; }
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/e58aae48/modules/platforms/dotnet/Apache.Ignite.Core/Cluster/Ssl/SslContextFactory.cs
----------------------------------------------------------------------
diff --git 
a/modules/platforms/dotnet/Apache.Ignite.Core/Cluster/Ssl/SslContextFactory.cs 
b/modules/platforms/dotnet/Apache.Ignite.Core/Cluster/Ssl/SslContextFactory.cs
new file mode 100644
index 0000000..cfde71f
--- /dev/null
+++ 
b/modules/platforms/dotnet/Apache.Ignite.Core/Cluster/Ssl/SslContextFactory.cs
@@ -0,0 +1,166 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+namespace Apache.Ignite.Core.Cluster.Ssl
+{
+    using System;
+    using System.Diagnostics;
+    using Apache.Ignite.Core.Binary;
+
+    /// <summary>
+    /// This SSL context factory that provides ssl context configuration with 
specified key and trust stores.
+    /// </summary>
+    [Serializable]
+    public class SslContextFactory : ISslContextFactory
+    {
+        /// <summary> Default value for <see cref="KeyAlgorithm"/>. </summary>
+        public const string DefaultKeyAlgorithm = "SunX509";
+
+        /// <summary> Default value for <see cref="KeyStoreType"/> and <see 
cref="TrustStoreType"/>. </summary>
+        public const string DefaultStoreType = "JKS";
+
+        /// <summary> Default value for <see cref="Protocol"/>. </summary>
+        public const string DefaultSslProtocol = "TLS";
+
+        /// <summary>
+        /// Key manager algorithm that will be used to create a key manager. 
Notice that in most cased default value 
+        /// <see cref="DefaultKeyAlgorithm"/> suites well, however, on Android 
platform this value need to be set 
+        /// to X509.
+        /// </summary>
+        public string KeyAlgorithm { get; set; }
+
+        /// <summary>
+        /// Key store type used for context creation. <see 
cref="DefaultStoreType"/> by default.
+        /// </summary>
+        public string KeyStoreType { get; set; }
+
+        /// <inheritdoc />
+        public string KeyStoreFilePath { get; set; }
+
+        /// <inheritdoc />
+        public string KeyStorePassword { get; set; }
+
+        /// <summary>
+        /// Protocol for secure transport. <see cref="DefaultSslProtocol"/> by 
default.
+        /// </summary>
+        public string Protocol { get; set; }
+
+        /// <summary>
+        /// Path to trust store file. Could be null if any SSL Certificate 
should be accepted/succeed.
+        /// </summary>
+        public string TrustStoreFilePath { get; set; }
+
+        /// <summary>
+        /// Trust store password.
+        /// </summary>
+        public string TrustStorePassword { get; set; }
+
+        /// <summary>
+        /// Trust store type used for context creation. <see 
cref="DefaultStoreType"/> by default.
+        /// </summary>
+        public string TrustStoreType { get; set; }
+
+        /// <summary>
+        /// Creates a new instance of the <see cref="SslContextFactory"/> 
class.
+        /// </summary>
+        /// <param name="keyStoreFilePath">Path to key store file.</param>
+        /// <param name="keyStorePassword">Key store password.</param>
+        /// <param name="trustStoreFilePath">Path to trust store file.</param>
+        /// <param name="trustStorePassword">Trust store password.</param>
+        public SslContextFactory(string keyStoreFilePath, string 
keyStorePassword,
+                                 string trustStoreFilePath, string 
trustStorePassword) 
+            : this(keyStoreFilePath, keyStorePassword)
+        {
+            TrustStoreFilePath = trustStoreFilePath;
+            TrustStorePassword = trustStorePassword;
+        }
+
+        /// <summary>
+        /// Creates a new instance of the <see cref="SslContextFactory"/> 
class.
+        /// Trust store file is not set that results in accepting any SSL 
Certificate.
+        /// </summary>
+        /// <param name="keyStoreFilePath">Path to key store file.</param>
+        /// <param name="keyStorePassword">Key store password.</param>
+        public SslContextFactory(string keyStoreFilePath, string 
keyStorePassword) : this()
+        {
+            KeyStoreFilePath = keyStoreFilePath;
+            KeyStorePassword = keyStorePassword;
+        }
+
+        /// <summary>
+        /// Default constructor.
+        /// </summary>
+        public SslContextFactory()
+        {
+            KeyAlgorithm = DefaultKeyAlgorithm;
+            TrustStoreType = DefaultStoreType;
+            KeyStoreType = DefaultStoreType;
+            Protocol = DefaultSslProtocol;
+        }
+
+        /// <summary>
+        /// Initializes a new instance of the <see cref="SslContextFactory"/> 
class.
+        /// </summary>
+        /// <param name="reader">The reader.</param>
+        internal SslContextFactory(IBinaryRawReader reader)
+        {
+            Read(reader);
+        }
+
+        /// <summary>
+        /// Reads data into this instance from the specified reader.
+        /// </summary>
+        /// <param name="reader">The reader.</param>
+        private void Read(IBinaryRawReader reader)
+        {
+            Debug.Assert(reader != null);
+
+            KeyAlgorithm = reader.ReadString();
+
+            KeyStoreType = reader.ReadString();
+            KeyStoreFilePath = reader.ReadString();
+            KeyStorePassword = reader.ReadString();
+
+            Protocol = reader.ReadString();
+
+            TrustStoreType = reader.ReadString();
+            TrustStoreFilePath = reader.ReadString();
+            TrustStorePassword = reader.ReadString();
+        }
+
+        /// <summary>
+        /// Writes this instance to the specified writer.
+        /// </summary>
+        /// <param name="writer">The writer.</param>
+        internal void Write(IBinaryRawWriter writer)
+        {
+            Debug.Assert(writer != null);
+
+            writer.WriteString(KeyAlgorithm);
+
+            writer.WriteString(KeyStoreType);
+            writer.WriteString(KeyStoreFilePath);
+            writer.WriteString(KeyStorePassword);
+
+            writer.WriteString(Protocol);
+
+            writer.WriteString(TrustStoreType);
+            writer.WriteString(TrustStoreFilePath);
+            writer.WriteString(TrustStorePassword);
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/e58aae48/modules/platforms/dotnet/Apache.Ignite.Core/IgniteConfiguration.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/IgniteConfiguration.cs 
b/modules/platforms/dotnet/Apache.Ignite.Core/IgniteConfiguration.cs
index 0ddf9a8..5cf5f64 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/IgniteConfiguration.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/IgniteConfiguration.cs
@@ -30,6 +30,7 @@ namespace Apache.Ignite.Core
     using Apache.Ignite.Core.Cache;
     using Apache.Ignite.Core.Cache.Configuration;
     using Apache.Ignite.Core.Cluster;
+    using Apache.Ignite.Core.Cluster.Ssl;
     using Apache.Ignite.Core.Common;
     using Apache.Ignite.Core.Communication;
     using Apache.Ignite.Core.Communication.Tcp;
@@ -42,6 +43,7 @@ namespace Apache.Ignite.Core
     using Apache.Ignite.Core.Events;
     using Apache.Ignite.Core.Impl;
     using Apache.Ignite.Core.Impl.Binary;
+    using Apache.Ignite.Core.Impl.Cluster.Ssl;
     using Apache.Ignite.Core.Impl.Common;
     using Apache.Ignite.Core.Lifecycle;
     using Apache.Ignite.Core.Log;
@@ -497,6 +499,9 @@ namespace Apache.Ignite.Core
                 writer.WriteBoolean(false);
             }
 
+            // SSL Context factory.
+            SslFactorySerializer.Write(writer, SslContextFactory);
+
             // Plugins (should be last).
             if (PluginConfigurations != null)
             {
@@ -717,6 +722,9 @@ namespace Apache.Ignite.Core
             {
                 DataStorageConfiguration = new DataStorageConfiguration(r);
             }
+
+            // SSL context factory.
+            SslContextFactory = SslFactorySerializer.Read(r);
         }
 
         /// <summary>
@@ -1242,6 +1250,14 @@ namespace Apache.Ignite.Core
         public DataStorageConfiguration DataStorageConfiguration { get; set; }
 
         /// <summary>
+        /// Gets or sets the SSL context factory that will be used for 
creating a secure socket layer b/w nodes.
+        /// <para />
+        /// Default is null (no SSL).
+        /// <para />
+        /// </summary>
+        public ISslContextFactory SslContextFactory { get; set; }
+
+        /// <summary>
         /// Gets or sets a value indicating how user assemblies should be 
loaded on remote nodes.
         /// <para />
         /// For example, when executing <see 
cref="ICompute.Call{TRes}(IComputeFunc{TRes})"/>,

http://git-wip-us.apache.org/repos/asf/ignite/blob/e58aae48/modules/platforms/dotnet/Apache.Ignite.Core/IgniteConfigurationSection.xsd
----------------------------------------------------------------------
diff --git 
a/modules/platforms/dotnet/Apache.Ignite.Core/IgniteConfigurationSection.xsd 
b/modules/platforms/dotnet/Apache.Ignite.Core/IgniteConfigurationSection.xsd
index 53cbb40..9d004c3 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/IgniteConfigurationSection.xsd
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/IgniteConfigurationSection.xsd
@@ -1865,6 +1865,58 @@
                         </xs:attribute>
                     </xs:complexType>
                 </xs:element>
+                <xs:element name="sslContextFactory" minOccurs="0">
+                    <xs:annotation>
+                        <xs:documentation>Factory for SSL 
Context.</xs:documentation>
+                    </xs:annotation>
+                    <xs:complexType>
+                        <xs:attribute name="keyAlgorithm" type="xs:string">
+                            <xs:annotation>
+                                <xs:documentation>Key manager algorithm that 
will be used to create a key manager.</xs:documentation>
+                            </xs:annotation>
+                        </xs:attribute>
+                        <xs:attribute name="keyStoreType" type="xs:string">
+                            <xs:annotation>
+                                <xs:documentation>Key store type used for 
context creation.</xs:documentation>
+                            </xs:annotation>
+                        </xs:attribute>
+                        <xs:attribute name="keyStoreFilePath" type="xs:string">
+                            <xs:annotation>
+                                <xs:documentation>Path to key store 
file.</xs:documentation>
+                            </xs:annotation>
+                        </xs:attribute>
+                        <xs:attribute name="keyStorePassword" type="xs:string">
+                            <xs:annotation>
+                                <xs:documentation>Key store 
password.</xs:documentation>
+                            </xs:annotation>
+                        </xs:attribute>
+                        <xs:attribute name="protocol" type="xs:string">
+                            <xs:annotation>
+                                <xs:documentation>Protocol for secure 
transport.</xs:documentation>
+                            </xs:annotation>
+                        </xs:attribute>
+                        <xs:attribute name="trustStoreType" type="xs:string">
+                            <xs:annotation>
+                                <xs:documentation>Trust store type used for 
context creation.</xs:documentation>
+                            </xs:annotation>
+                        </xs:attribute>
+                        <xs:attribute name="trustStoreFilePath" 
type="xs:string">
+                            <xs:annotation>
+                                <xs:documentation>Path to trust store 
file.</xs:documentation>
+                            </xs:annotation>
+                        </xs:attribute>
+                        <xs:attribute name="trustStorePassword" 
type="xs:string">
+                            <xs:annotation>
+                                <xs:documentation>Trust store 
password.</xs:documentation>
+                            </xs:annotation>
+                        </xs:attribute>
+                        <xs:attribute name="type" type="xs:string" 
use="required">
+                            <xs:annotation>
+                              <xs:documentation>Assembly-qualified type 
name.</xs:documentation>
+                            </xs:annotation>
+                        </xs:attribute>
+                    </xs:complexType>
+                </xs:element>
                 <xs:element name="pluginConfigurations" minOccurs="0">
                     <xs:annotation>
                         <xs:documentation>Plugin 
configurations.</xs:documentation>

http://git-wip-us.apache.org/repos/asf/ignite/blob/e58aae48/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cluster/Ssl/SslFactorySerializer.cs
----------------------------------------------------------------------
diff --git 
a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cluster/Ssl/SslFactorySerializer.cs
 
b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cluster/Ssl/SslFactorySerializer.cs
new file mode 100644
index 0000000..e117479
--- /dev/null
+++ 
b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cluster/Ssl/SslFactorySerializer.cs
@@ -0,0 +1,58 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+namespace Apache.Ignite.Core.Impl.Cluster.Ssl
+{
+    using System.Diagnostics;
+    using Apache.Ignite.Core.Binary;
+    using Apache.Ignite.Core.Cluster.Ssl;
+
+    /// <summary>
+    /// Serializer/deserializer for <see cref="ISslContextFactory"/>.
+    /// </summary>
+    internal static class SslFactorySerializer
+    {
+        /// <summary>
+        /// Writes the SSL context factory.
+        /// </summary>
+        internal static void Write(IBinaryRawWriter writer, ISslContextFactory 
factory)
+        {
+            Debug.Assert(writer != null);
+
+            var contextFactory = factory as SslContextFactory;
+
+            if (contextFactory != null)
+            {
+                writer.WriteBoolean(true);
+
+                contextFactory.Write(writer);
+            }
+            else
+            {
+                writer.WriteBoolean(false);
+            }
+        }
+
+        /// <summary>
+        /// Reads the SSL context factory.
+        /// </summary>
+        internal static ISslContextFactory Read(IBinaryRawReader reader)
+        {
+            return reader.ReadBoolean() ? new SslContextFactory(reader) : null;
+        }
+    }
+}

Reply via email to