Author: atsushi
Date: 2007-02-28 23:15:57 -0500 (Wed, 28 Feb 2007)
New Revision: 73577

Modified:
   trunk/olive/class/System.ServiceModel/System.ServiceModel.Channels/ChangeLog
   
trunk/olive/class/System.ServiceModel/System.ServiceModel.Channels/MessageSecurityBindingSupport.cs
   
trunk/olive/class/System.ServiceModel/System.ServiceModel.Channels/SecurityBindingElement.cs
Log:
2007-03-01  Atsushi Enomoto  <[EMAIL PROTECTED]>

        * MessageSecurityBindingSupport.cs : token authenticator is not
          always created on channel-opening stage.
        * SecurityBindingElement.cs : use SslSecurityTokenParameters for
          Sslnego binding factory method.



Modified: 
trunk/olive/class/System.ServiceModel/System.ServiceModel.Channels/ChangeLog
===================================================================
--- 
trunk/olive/class/System.ServiceModel/System.ServiceModel.Channels/ChangeLog    
    2007-03-01 00:03:48 UTC (rev 73576)
+++ 
trunk/olive/class/System.ServiceModel/System.ServiceModel.Channels/ChangeLog    
    2007-03-01 04:15:57 UTC (rev 73577)
@@ -1,3 +1,10 @@
+2007-03-01  Atsushi Enomoto  <[EMAIL PROTECTED]>
+
+       * MessageSecurityBindingSupport.cs : token authenticator is not
+         always created on channel-opening stage.
+       * SecurityBindingElement.cs : use SslSecurityTokenParameters for
+         Sslnego binding factory method.
+
 2007-02-28  Atsushi Enomoto  <[EMAIL PROTECTED]>
 
        * SecureMessageGenerator.cs : inconsistent ReferenceList has caused

Modified: 
trunk/olive/class/System.ServiceModel/System.ServiceModel.Channels/MessageSecurityBindingSupport.cs
===================================================================
--- 
trunk/olive/class/System.ServiceModel/System.ServiceModel.Channels/MessageSecurityBindingSupport.cs
 2007-03-01 00:03:48 UTC (rev 73576)
+++ 
trunk/olive/class/System.ServiceModel/System.ServiceModel.Channels/MessageSecurityBindingSupport.cs
 2007-03-01 04:15:57 UTC (rev 73577)
@@ -175,9 +175,16 @@
                        return manager.CreateSecurityTokenAuthenticator (r, out 
resolver);
                }
 
-               public void CreateTokenAuthenticator (SecurityTokenRequirement 
requirement)
+               protected void PrepareAuthenticator ()
                {
-                       authenticator = 
manager.CreateSecurityTokenAuthenticator (requirement, out auth_token_resolver);
+                       // This check is almost extra, though it is needed
+                       // to check correct signing token existence.
+                       //
+                       // Not sure if it is limited to this condition, but
+                       // Ssl parameters do not support token provider and
+                       // still do not fail. X509 parameters do fail.
+                       if 
(RecipientParameters.InternalSupportsClientAuthentication)
+                               authenticator = CreateTokenAuthenticator 
(RecipientParameters, out auth_token_resolver);
                }
 
                public void Release ()
@@ -282,8 +289,9 @@
 
                        SecurityTokenRequirement r = CreateRequirement ();
                        
RecipientParameters.CallInitializeSecurityTokenRequirement (r);
-                       CreateTokenAuthenticator (r); // FIXME: is it correct??
 
+                       PrepareAuthenticator ();
+
                        // This check is almost extra, though it is needed
                        // to check correct signing token existence.
                        if (EncryptionToken == null)
@@ -361,11 +369,17 @@
 
                        SecurityTokenRequirement r = CreateRequirement ();
                        
RecipientParameters.CallInitializeSecurityTokenRequirement (r);
-                       CreateTokenAuthenticator (r);
 
+                       PrepareAuthenticator ();
+
                        // This check is almost extra, though it is needed
                        // to check correct signing token existence.
-                       if (EncryptionToken == null)
+                       //
+                       // Not sure if it is limited to this condition, but
+                       // Ssl parameters do not support token provider and
+                       // still do not fail. X509 parameters do fail.
+                       if (InitiatorParameters.InternalHasAsymmetricKey &&
+                           EncryptionToken == null)
                                throw new Exception ("INTERNAL ERROR");
                }
 

Modified: 
trunk/olive/class/System.ServiceModel/System.ServiceModel.Channels/SecurityBindingElement.cs
===================================================================
--- 
trunk/olive/class/System.ServiceModel/System.ServiceModel.Channels/SecurityBindingElement.cs
        2007-03-01 00:03:48 UTC (rev 73576)
+++ 
trunk/olive/class/System.ServiceModel/System.ServiceModel.Channels/SecurityBindingElement.cs
        2007-03-01 04:15:57 UTC (rev 73577)
@@ -356,7 +356,7 @@
                        bool requireCancellation)
                {
                        SymmetricSecurityBindingElement be = new 
SymmetricSecurityBindingElement ();
-                       be.ProtectionTokenParameters = 
CreateProtectionTokenParameters (false);
+                       be.ProtectionTokenParameters = new 
SslSecurityTokenParameters (requireClientCertificate, requireCancellation);
                        return be;
                }
 

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to