Merge pull request #495 from nicolas-raoul/fix-for-issue2907-with-no-formatting-changes
[mono.git] / mcs / class / System.ServiceModel / System.ServiceModel.Channels / SslStreamSecurityBindingElement.cs
index e9f14563c7804c69d945742180e33619dcf0562f..3201ef86eb664118064f372eb0298e88d5d9b6d9 100644 (file)
@@ -82,7 +82,10 @@ namespace System.ServiceModel.Channels
                [MonoTODO]
                public XmlElement GetTransportTokenAssertion ()
                {
-                       throw new NotImplementedException ();
+                       var doc = new XmlDocument ();
+                       var element = doc.CreateElement (
+                               "msf", "SslTransportSecurity", PolicyImportHelper.FramingPolicyNS);
+                       return element;
                }
 
                [MonoTODO]
@@ -130,9 +133,11 @@ namespace System.ServiceModel.Channels
                [MonoTODO]
                void IPolicyExportExtension.ExportPolicy (
                        MetadataExporter exporter,
-                       PolicyConversionContext policyContext)
+                       PolicyConversionContext context)
                {
-                       throw new NotImplementedException ();
+                       var token = GetTransportTokenAssertion ();
+                       var transportBinding = TransportBindingElement.CreateTransportBinding (token);
+                       context.GetBindingAssertions ().Add (transportBinding);
                }
                #endregion
        }