Add another DISABLE_CAS_USE conditional to _SecureChannel.cs
authorMartin Baulig <martin.baulig@xamarin.com>
Thu, 5 Mar 2015 20:37:51 +0000 (21:37 +0100)
committerMarek Safar <marek.safar@gmail.com>
Mon, 2 May 2016 22:08:00 +0000 (00:08 +0200)
mcs/class/referencesource/System/net/System/Net/_SecureChannel.cs

index 21bbfd3ea6c385469fee4acb124d7300f2cae406..43b8cb541fd54480845d671b7c6fbe09c365b4c3 100644 (file)
@@ -584,7 +584,9 @@ namespace System.Net.Security {
         //          Note: We call a user certificate selection delegate under permission
         //          assert but the signature of the delegate is unique so it's safe
         //
+        #if !DISABLE_CAS_USE
         [StorePermission(SecurityAction.Assert, Unrestricted=true)]
+        #endif
         private bool AcquireClientCredentials(ref byte[] thumbPrint)
         {
             GlobalLog.Enter("SecureChannel#" + ValidationHelper.HashString(this) + "::AcquireClientCredentials");
@@ -824,7 +826,9 @@ namespace System.Net.Security {
         //          Note: We call a user certificate selection delegate under permission
         //          assert but the signature of the delegate is unique so it's safe
         //
+        #if !DISABLE_CAS_USE
         [StorePermission(SecurityAction.Assert, Unrestricted=true)]
+        #endif
         private bool AcquireServerCredentials(ref byte[] thumbPrint)
         {
             GlobalLog.Enter("SecureChannel#" + ValidationHelper.HashString(this) + "::AcquireServerCredentials");
@@ -1280,7 +1284,9 @@ namespace System.Net.Security {
         //SECURITY: The scenario is allowed in semitrust StorePermission is asserted for Chain.Build
         //          A user callback has unique signature so it is safe to call it under permisison assert.
         //
+        #if !DISABLE_CAS_USE
         [StorePermission(SecurityAction.Assert, Unrestricted=true)]
+        #endif
         internal bool VerifyRemoteCertificate(RemoteCertValidationCallback remoteCertValidationCallback)
         {
             GlobalLog.Enter("SecureChannel#" + ValidationHelper.HashString(this) + "::VerifyRemoteCertificate");