bring Mono Security to monotouch
authorJb Evain <jbevain@gmail.com>
Wed, 9 Sep 2009 15:34:58 +0000 (15:34 -0000)
committerJb Evain <jbevain@gmail.com>
Wed, 9 Sep 2009 15:34:58 +0000 (15:34 -0000)
svn path=/trunk/mcs/; revision=141615

59 files changed:
mcs/class/Makefile
mcs/class/Mono.Security/Assembly/AssemblyInfo.cs
mcs/class/Mono.Security/Mono.Security.Protocol.Tls/DebugHelper.cs
mcs/class/System/Makefile
mcs/class/System/System.Net.Security/RemoteCertificateValidationCallback.cs
mcs/class/System/System.Net/ServicePointManager.cs
mcs/class/System/System.Net/WebConnection.cs
mcs/class/System/System.Security.Cryptography.X509Certificates/X509Chain.cs
mcs/class/System/monotouch_System.dll.sources
mcs/class/corlib/Assembly/AssemblyInfo.cs
mcs/class/corlib/Mono.Security.Authenticode/AuthenticodeBase.cs
mcs/class/corlib/Mono.Security.Authenticode/AuthenticodeDeformatter.cs
mcs/class/corlib/Mono.Security.Cryptography/KeyPairPersistence.cs
mcs/class/corlib/Mono.Security.Cryptography/PKCS1.cs
mcs/class/corlib/Mono.Security.Cryptography/SymmetricTransform.cs
mcs/class/corlib/Mono.Security/StrongName.cs
mcs/class/corlib/System.Reflection/Assembly.cs
mcs/class/corlib/System.Security.Cryptography.X509Certificates/X509Certificate.cs
mcs/class/corlib/System.Security.Cryptography.X509Certificates/X509Certificate20.cs
mcs/class/corlib/System.Security.Cryptography.X509Certificates/X509ContentType.cs
mcs/class/corlib/System.Security.Cryptography.X509Certificates/X509KeyStorageFlags.cs
mcs/class/corlib/System.Security.Cryptography/CryptoConfig.cs
mcs/class/corlib/System.Security.Cryptography/CryptoConfig_2_1.cs
mcs/class/corlib/System.Security.Cryptography/DES.cs
mcs/class/corlib/System.Security.Cryptography/DESCryptoServiceProvider.cs
mcs/class/corlib/System.Security.Cryptography/DSACryptoServiceProvider.cs
mcs/class/corlib/System.Security.Cryptography/HMACMD5.cs
mcs/class/corlib/System.Security.Cryptography/HMACRIPEMD160.cs
mcs/class/corlib/System.Security.Cryptography/HMACSHA384.cs
mcs/class/corlib/System.Security.Cryptography/HMACSHA512.cs
mcs/class/corlib/System.Security.Cryptography/MACTripleDES.cs
mcs/class/corlib/System.Security.Cryptography/RC2.cs
mcs/class/corlib/System.Security.Cryptography/RC2CryptoServiceProvider.cs
mcs/class/corlib/System.Security.Cryptography/RIPEMD160.cs
mcs/class/corlib/System.Security.Cryptography/RIPEMD160Managed.cs
mcs/class/corlib/System.Security.Cryptography/RSACryptoServiceProvider.cs
mcs/class/corlib/System.Security.Cryptography/Rijndael.cs
mcs/class/corlib/System.Security.Cryptography/RijndaelManaged.cs
mcs/class/corlib/System.Security.Cryptography/RijndaelManagedTransform.cs
mcs/class/corlib/System.Security.Cryptography/SHA1CryptoServiceProvider.cs
mcs/class/corlib/System.Security.Cryptography/SHA384.cs
mcs/class/corlib/System.Security.Cryptography/SHA384Managed.cs
mcs/class/corlib/System.Security.Cryptography/SHA512.cs
mcs/class/corlib/System.Security.Cryptography/SHA512Managed.cs
mcs/class/corlib/System.Security.Cryptography/SymmetricAlgorithm.cs
mcs/class/corlib/System.Security.Cryptography/TripleDES.cs
mcs/class/corlib/System.Security.Cryptography/TripleDESCryptoServiceProvider.cs
mcs/class/corlib/System.Security.Permissions/PublisherIdentityPermissionAttribute.cs
mcs/class/corlib/System.Security.Policy/Evidence.cs
mcs/class/corlib/System.Security.Policy/Hash.cs
mcs/class/corlib/System.Security.Policy/HashMembershipCondition.cs
mcs/class/corlib/System.Security.Policy/PolicyLevel.cs
mcs/class/corlib/System.Security.Policy/PolicyLevel_2_1.cs
mcs/class/corlib/System.Security.Policy/Zone.cs
mcs/class/corlib/System.Security.Policy/ZoneMembershipCondition.cs
mcs/class/corlib/System.Security/SecurityManager.cs
mcs/class/corlib/System.Security/SecurityManager_2_1.cs
mcs/class/corlib/System.Security/SecuritySafeCriticalAttribute.cs
mcs/class/corlib/System.Security/SecurityTransparentAttribute.cs

index adf95e6c1497deb29dc2393a78c5fa538482fe22..acf3d101c9e13c45d752441a47604b1392883e5d 100644 (file)
@@ -144,6 +144,8 @@ monotouch_dirs := \
        Mono.CompilerServices.SymbolWriter      \
        System  \
        System.XML      \
+       Mono.Security   \
+       System  \
        System.Core     \
        System.Json     \
        System.Xml.Linq
index 02820830eaaafa57d327f6ab5d94b6975e5bd389..be89ba657ba9086267bf51e7a5ac61e2690ec5cc 100644 (file)
@@ -59,3 +59,7 @@ using System.Runtime.InteropServices;
 
 [assembly: AssemblyDelaySign (true)]
 [assembly: AssemblyKeyFile ("../mono.pub")]
+
+#if MONOTOUCH
+[assembly: InternalsVisibleTo ("System, PublicKey=00240000048000009400000006020000002400005253413100040000010001008D56C76F9E8649383049F383C44BE0EC204181822A6C31CF5EB7EF486944D032188EA1D3920763712CCB12D75FB77E9811149E6148E5D32FBAAB37611C1878DDC19E20EF135D0CB2CFF2BFEC3D115810C3D9069638FE4BE215DBF795861920E5AB6F7DB2E2CEEF136AC23D5DD2BF031700AEC232F6C6B1C785B4305C123B37AB")]
+#endif
index a4e293709f844a8fe460e28a521f8caa7821bc96..b081185c614aac93976e6c0c136c9a8dfca6bd02 100644 (file)
@@ -36,10 +36,12 @@ namespace Mono.Security.Protocol.Tls
                {
                        if (!isInitialized)
                        {
+#if !MONOTOUCH
                                Debug.Listeners.Add(new TextWriterTraceListener(Console.Out));
                                // Debug.Listeners.Add(new TextWriterTraceListener(@"c:\ssl.log"));
                                Debug.AutoFlush = true;
                                Debug.Indent();
+#endif
 
                                isInitialized = true;
                        }
@@ -83,7 +85,9 @@ namespace Mono.Security.Protocol.Tls
                                int count = (length - i) >= 16 ? 16 : (length - i);
                                for (int j = 0; j < count; j++)
                                {
+#if !MONOTOUCH
                                        Debug.Write(buffer[i + j].ToString("x2") + " ");
+#endif
                                }
                                Debug.WriteLine("");
                        }
index 583ea7cf6efded3486bb4f607948fd224b662d44..f7b2091c2db40d8217a1de83223051c858ca4a6b 100644 (file)
@@ -26,7 +26,8 @@ TEST_MCS_FLAGS = -r:System.Drawing.dll -r:Mono.Security.dll -r:System.Data -nowa
 ifneq (1, $(FRAMEWORK_VERSION_MAJOR))
 LIB_MCS_FLAGS = -nowarn:618 -d:CONFIGURATION_2_0 -unsafe $(RESOURCE_FILES:%=-resource:%)
 TEST_MCS_FLAGS += -r:System.Configuration
-PROFILE_2_OR_4 := $(filter net_2_0 net_4_0, $(PROFILE))        
+PROFILE_2_OR_4 := $(filter net_2_0 net_4_0, $(PROFILE))
+NOT_SL := $(filter net_2_0 net_4_0 monotouch, $(PROFILE))
 endif
 
 EXTRA_DISTFILES = \
@@ -43,7 +44,7 @@ EXTRA_DISTFILES = \
 
 lib_file := $(wildcard ../lib/$(PROFILE)/System.dll)
 ifdef lib_file
-ifdef PROFILE_2_OR_4
+ifdef NOT_SL
 LIB_MCS_FLAGS += -r:PrebuiltSystem=$(lib_file)
 endif
 else
@@ -90,7 +91,7 @@ endif
 
 endif
 
-ifdef PROFILE_2_OR_4
+ifdef NOT_SL
 # $(eval $(call cyclic-dep,Mono.Security.dll,SECURITY_DEP))
 CYCLIC_DEPS += Mono.Security.dll
 ifndef USE_BOOT_COMPILE
index c7ab73a319ad2a6d127e45fb49e55f694b64dd2c..d09d844a91859d44952034b0e7bdde46435a2c9c 100644 (file)
@@ -35,12 +35,12 @@ using System.Security.Cryptography.X509Certificates;
 
 namespace System.Net.Security 
 {
-#if !NET_2_1
+#if !NET_2_1 || MONOTOUCH
        public
 #endif
        delegate bool RemoteCertificateValidationCallback (
                object sender,
-#if !NET_2_1
+#if !NET_2_1 || MONOTOUCH
                X509Certificate certificate,
                X509Chain chain,
 #else
index b066360daf8f6a7c66d1a8bcde5ec7b6ecc143c1..811b0d510fb83b0db0711004f7fb6e55bae68a15 100644 (file)
@@ -247,7 +247,7 @@ namespace System.Net
                        set { _securityProtocol = value; }
                }
 
-#if NET_2_0 && !MONOTOUCH
+#if NET_2_0
                public static RemoteCertificateValidationCallback ServerCertificateValidationCallback
                {
                        get {
index 6c005e4b245b6e1657e76ac6a0dda545b7bc7fa9..1e8fa8bc0f1229e740604df8a8dce5967276876d 100644 (file)
@@ -194,6 +194,9 @@ namespace System.Net
                                if (sslStream != null)
                                        return;
 
+#if MONOTOUCH && SECURITY_DEP
+                               sslStream = typeof (Mono.Security.Protocol.Tls.HttpsClientStream);
+#else
                                // HttpsClientStream is an internal glue class in Mono.Security.dll
                                sslStream = Type.GetType ("Mono.Security.Protocol.Tls.HttpsClientStream, " +
                                                        Consts.AssemblyMono_Security, false);
@@ -204,6 +207,7 @@ namespace System.Net
 
                                        throw new NotSupportedException (msg);
                                }
+#endif
                                piClient = sslStream.GetProperty ("SelectedClientCertificate");
                                piServer = sslStream.GetProperty ("ServerCertificate");
                                piTrustFailure = sslStream.GetProperty ("TrustFailure");
index a35037bccdb749e022ff5594beac585c1ff60032..a8399891d2bb1395ebcff40e264c7a11092f0204 100644 (file)
@@ -857,7 +857,7 @@ namespace System.Security.Cryptography.X509Certificates {
                }
        }
 }
-#elif NET_2_0 && !NET_2_1
+#elif NET_2_0 && (!NET_2_1 || MONOTOUCH)
 namespace System.Security.Cryptography.X509Certificates {
        public class X509Chain {
                public bool Build (X509Certificate2 cert)
index ba8e7d2ae090b67bea4c62c23fcd2983185e74f6..4e5b7c3212dee8c4a3bcc78846738a83c6428c22 100644 (file)
@@ -48,6 +48,8 @@ System.Diagnostics/ThreadPriorityLevel.cs
 System.Diagnostics/ThreadState.cs
 System.Diagnostics/ThreadWaitReason.cs
 System.IO/MonoSyncFileStream.cs
+System.IO/MonoIO.cs
+System.IO/MonoIOError.cs
 
 System.IO.Compression/CompressionMode.cs
 System.IO.Compression/DeflateStream.cs
@@ -286,6 +288,13 @@ System.Net/UploadValuesCompletedEventHandler.cs
 System.Net/UploadStringCompletedEventHandler.cs
 System.Net/DownloadStringCompletedEventHandler.cs
 
+System.Security.Cryptography/AsnEncodedDataCollection.cs
+System.Security.Cryptography/AsnEncodedData.cs
+System.Security.Cryptography/AsnEncodedDataEnumerator.cs
+System.Security.Cryptography/OidCollection.cs
+System.Security.Cryptography/Oid.cs
+System.Security.Cryptography/OidEnumerator.cs
+
 System.Security.Cryptography.X509Certificates/OpenFlags.cs
 System.Security.Cryptography.X509Certificates/PublicKey.cs
 System.Security.Cryptography.X509Certificates/StoreLocation.cs
index 6f3b2261580930295ec7a87214f7fec85457f325..e169a8d5b02cdb10d63f1edff6c9935baba91e21 100644 (file)
@@ -86,7 +86,7 @@ using System.Runtime.InteropServices;
        [assembly: TypeLibVersion (1, 10)]
 #endif
 
-#if NET_2_1
+#if NET_2_1 && !MONOTOUCH
        [assembly: InternalsVisibleTo ("System, PublicKey=00240000048000009400000006020000002400005253413100040000010001008D56C76F9E8649383049F383C44BE0EC204181822A6C31CF5EB7EF486944D032188EA1D3920763712CCB12D75FB77E9811149E6148E5D32FBAAB37611C1878DDC19E20EF135D0CB2CFF2BFEC3D115810C3D9069638FE4BE215DBF795861920E5AB6F7DB2E2CEEF136AC23D5DD2BF031700AEC232F6C6B1C785B4305C123B37AB")]
        [assembly: InternalsVisibleTo ("System.Windows, PublicKey=00240000048000009400000006020000002400005253413100040000010001008D56C76F9E8649383049F383C44BE0EC204181822A6C31CF5EB7EF486944D032188EA1D3920763712CCB12D75FB77E9811149E6148E5D32FBAAB37611C1878DDC19E20EF135D0CB2CFF2BFEC3D115810C3D9069638FE4BE215DBF795861920E5AB6F7DB2E2CEEF136AC23D5DD2BF031700AEC232F6C6B1C785B4305C123B37AB")]
        [assembly: InternalsVisibleTo ("System.Windows.Browser, PublicKey=00240000048000009400000006020000002400005253413100040000010001008D56C76F9E8649383049F383C44BE0EC204181822A6C31CF5EB7EF486944D032188EA1D3920763712CCB12D75FB77E9811149E6148E5D32FBAAB37611C1878DDC19E20EF135D0CB2CFF2BFEC3D115810C3D9069638FE4BE215DBF795861920E5AB6F7DB2E2CEEF136AC23D5DD2BF031700AEC232F6C6B1C785B4305C123B37AB")]
index 0aab36a9fe673aaef95cc1ee609775265fa547c0..bd7ee4b69c43b67eb070aa43dbd172f6372855e6 100644 (file)
@@ -27,7 +27,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if !NET_2_1
+#if !NET_2_1 || MONOTOUCH
 
 using System;
 using System.IO;
index 6e7b19ac688099d773b0e90a27445687b1583688..389b01ddd7fc993eb492799435b9431917147999 100644 (file)
@@ -27,7 +27,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if !NET_2_1
+#if !NET_2_1 || MONOTOUCH
 
 using System;
 using System.IO;
index fcb379a008dd77258cf8133fd59d2cf811e3a617..9a2cad9ba6c99df20f6897aadfbda34cd156ea10 100644 (file)
@@ -26,7 +26,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if !NET_2_1
+#if !NET_2_1 || MONOTOUCH
 
 using System;
 using System.Globalization;
index 3ca015f9e3b35c6780247d9c23f51c5d42627d45..74c5904ded514457e1e43e8bd14e614e49767f43 100644 (file)
@@ -77,7 +77,7 @@ namespace Mono.Security.Cryptography {
                                return emptySHA1;
                        else if (hash is SHA256)
                                return emptySHA256;
-#if !NET_2_1
+#if !NET_2_1 || MONOTOUCH
                        else if (hash is SHA384)
                                return emptySHA384;
                        else if (hash is SHA512)
index c8058b76783d3fc772ec7015c97b3d17c7c2bbaa..17df188e6e968a1684415b7ac641eff9bcd153f0 100644 (file)
@@ -50,7 +50,7 @@ namespace Mono.Security.Cryptography {
                private byte[] temp2;
                private byte[] workBuff;
                private byte[] workout;
-#if !NET_2_1
+#if !NET_2_1 || MONOTOUCH
                // Silverlight 2.0 does not support any feedback mode
                private int FeedBackByte;
                private int FeedBackIter;
@@ -81,7 +81,7 @@ namespace Mono.Security.Cryptography {
                        temp = new byte [BlockSizeByte];
                        Buffer.BlockCopy (rgbIV, 0, temp, 0, System.Math.Min (BlockSizeByte, rgbIV.Length));
                        temp2 = new byte [BlockSizeByte];
-#if !NET_2_1
+#if !NET_2_1 || MONOTOUCH
                        FeedBackByte = (algo.FeedbackSize >> 3);
                        if (FeedBackByte != 0)
                                FeedBackIter = (int) BlockSizeByte / FeedBackByte;
@@ -185,7 +185,7 @@ namespace Mono.Security.Cryptography {
                        }
                }
 
-#if !NET_2_1
+#if !NET_2_1 || MONOTOUCH
                // Cipher-FeedBack (CFB)
                protected virtual void CFB (byte[] input, byte[] output) 
                {
@@ -340,7 +340,7 @@ namespace Mono.Security.Cryptography {
                        return total;
                }
 
-#if NET_2_0 && !NET_2_1
+#if NET_2_0 && !NET_2_1 || MONOTOUCH
                RandomNumberGenerator _rng;
 
                private void Random (byte[] buffer, int start, int length)
index 1c696722492385a57acfb896ea3cc1998e3c6d25..afa43f84dc77a4e39f98f30265b5260f23bed6b3 100644 (file)
@@ -160,7 +160,7 @@ namespace Mono.Security {
                        get {
                                if (rsa == null)
                                        return false;
-#if INSIDE_CORLIB && !NET_2_1
+#if INSIDE_CORLIB && (!NET_2_1 || MONOTOUCH)
                                // the easy way
                                if (RSA is RSACryptoServiceProvider) {
                                        // available as internal for corlib
index c6ed7a38fc5a9f6f322ce51c66bc6ffd373e3227..3e7f81aebfe2f80529c6d9010bb30a57970bdf09 100644 (file)
@@ -796,7 +796,7 @@ namespace System.Reflection {
                }
 #endif
 
-#if !NET_2_1
+#if !NET_2_1 || MONOTOUCH
                // Code Access Security
 
                internal void Resolve () 
index e7a71dc0b5a2ef32f1dbc88372214199f4a9b61a..a2e9b2a4424da1d53f73f312afa29a73f84fbde3 100644 (file)
@@ -38,7 +38,7 @@ using Mono.Security.X509;
 #if NET_2_0
 using System.Runtime.Serialization;
 #endif
-#if !NET_2_1
+#if !NET_2_1 || MONOTOUCH
 using Mono.Security.Authenticode;
 #endif
 
@@ -104,7 +104,7 @@ namespace System.Security.Cryptography.X509Certificates {
                        return new X509Certificate (data);
                }
 
-#if !NET_2_1
+#if !NET_2_1 || MONOTOUCH
                [MonoTODO ("Incomplete - minimal validation in this version")]
                public static X509Certificate CreateFromSignedFile (string filename)
                {
@@ -183,7 +183,7 @@ namespace System.Security.Cryptography.X509Certificates {
 #endif
                }
 
-#if !NET_2_1
+#if !NET_2_1 || MONOTOUCH
                [SecurityPermission (SecurityAction.Demand, UnmanagedCode = true)]
                private void InitFromHandle (IntPtr handle)
                {
index ad898814a12a2cbea37112c7c19675020834574e..dac7779a0bef63f1c40e0c1d03159096fc38b550 100644 (file)
@@ -42,7 +42,7 @@ namespace System.Security.Cryptography.X509Certificates {
 
        [ComVisible (true)]
        [MonoTODO ("X509ContentType.SerializedCert isn't supported (anywhere in the class)")]
-#if NET_2_1
+#if NET_2_1 && !MONOTOUCH
        public partial class X509Certificate {
 #else
        public partial class X509Certificate : IDeserializationCallback, ISerializable {
@@ -180,7 +180,7 @@ namespace System.Security.Cryptography.X509Certificates {
                                switch (contentType) {
                                case X509ContentType.Cert:
                                        return x509.RawData;
-#if !NET_2_1
+#if !NET_2_1 || MONOTOUCH
                                case X509ContentType.Pfx: // this includes Pkcs12
                                        // TODO
                                        throw new NotSupportedException ();
@@ -274,7 +274,7 @@ namespace System.Security.Cryptography.X509Certificates {
                        byte[] rawData = Load (fileName);
                        Import (rawData, (string)null, keyStorageFlags);
                }
-#if !NET_2_1
+#if !NET_2_1 || MONOTOUCH
                void IDeserializationCallback.OnDeserialization (object sender)
                {
                }
index 258f9970b3a7c06c644f104565e5df559817fd83..c2c036849fa575684eaca510d48eaefe21a697d5 100644 (file)
@@ -41,7 +41,7 @@ namespace System.Security.Cryptography.X509Certificates {
        enum X509ContentType {
                Unknown,
                Cert,
-#if !NET_2_1
+#if !NET_2_1 || MONOTOUCH
                // not supported by Silverlight 2.0 (NET_2_1)
                SerializedCert,
                Pfx,
index 1a2d9af32bbb9cece5c0478c43da56d08eaef313..e8e668cee2324b789eb20c3f84156dff7683ec04 100644 (file)
@@ -37,7 +37,7 @@ namespace System.Security.Cryptography.X509Certificates {
        [ComVisible (true)]
        public enum X509KeyStorageFlags {
                DefaultKeySet = 0,
-#if !NET_2_1
+#if !NET_2_1 || MONOTOUCH
                // not supported by Silverlight 2.0 (NET_2_1)
                UserKeySet = 1,
                MachineKeySet = 2,
index bfe75603efd1cf5d6cf484a31ef5fbe1e75b475f..4508c18067f01921620c90e8244bcfda43dc6dfb 100644 (file)
@@ -29,7 +29,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if !NET_2_1
+#if !NET_2_1 || MONOTOUCH
 
 using System.Collections;
 using System.Globalization;
index cc372bba9015fd1a0bbdd235064b2c88fa78f7e3..0bc2c58c4fb12df3e6068d523ef2058916fa5bbf 100644 (file)
@@ -126,7 +126,7 @@ namespace System.Security.Cryptography {
                        }
                        return num;
                }
-#if NET_2_1
+#if NET_2_1 && !MONOTOUCH
                // we need SHA1 support to verify the codecs binary integrity
                public static string MapNameToOID (string name)
                {
index ceb597214f7e53b617dfecec090678c98b62f3ae..5c17493e6cf44f0289edbbb15ce6cf538e9f2253 100644 (file)
@@ -28,7 +28,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if !NET_2_1
+#if !NET_2_1 || MONOTOUCH
 
 using System.Globalization;
 using System.Runtime.InteropServices;
index 4336fe7bc043f0aae44417d538fbcbb14c7cc014..6fbb59677e36663748f316cea4d7c7c2e24e46ac 100644 (file)
@@ -28,7 +28,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if !NET_2_1
+#if !NET_2_1 || MONOTOUCH
 
 using System.Runtime.InteropServices;
 using Mono.Security.Cryptography;
index f6500cd3cd194790b84d88f792a34fcfa6399264..53ce69b4802f67409bf92ae3097e8fde2a680cef 100644 (file)
@@ -31,7 +31,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if !NET_2_1
+#if !NET_2_1 || MONOTOUCH
 
 using System.IO;
 using System.Globalization;
index c504f56733520c767c3b7e8525f3f63d4bafd008..27712ab966e4019fa5ca3d8a4dc0e21738315cd6 100644 (file)
@@ -27,7 +27,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if NET_2_0 && !NET_2_1
+#if NET_2_0 && !NET_2_1 || MONOTOUCH
 
 using System.Runtime.InteropServices;
 
index d6cac70ee3c2efe8800f227a545d28dba45f49c7..60ab05e568ec44de534fe3ac13b1d109cd89aebe 100644 (file)
@@ -27,7 +27,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if NET_2_0 && !NET_2_1
+#if NET_2_0 && !NET_2_1 || MONOTOUCH
 
 using System.Runtime.InteropServices;
 
index f5d272104acbf36abfa79f2ed7b2645155a8f991..025fde94b36aabd098e11b16a1e2cb2289a27a33 100644 (file)
@@ -27,7 +27,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if NET_2_0 && !NET_2_1
+#if NET_2_0 && !NET_2_1 || MONOTOUCH
 
 using System.Runtime.InteropServices;
 
index 113ec2066cd8c728108290680c6a4024a99607e4..630575aecc3f2f61f1731498193c45aa5d99462c 100644 (file)
@@ -27,7 +27,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if NET_2_0 && !NET_2_1
+#if NET_2_0 && !NET_2_1 || MONOTOUCH
 
 using System.Runtime.InteropServices;
 
index 303de11c82e26f6b805a65cd38b1a12cc0967b86..163dc26fd6a2e2471a655d43902ce087eb1c16b7 100644 (file)
@@ -27,7 +27,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if !NET_2_1
+#if !NET_2_1 || MONOTOUCH
 
 using System.Runtime.InteropServices;
 
index e24eccd74fb086cecd20acdaffc1fdf724f6a8c1..6a23a005fb5cdf5bd95167327747070a0c86361a 100644 (file)
@@ -27,7 +27,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if !NET_2_1
+#if !NET_2_1 || MONOTOUCH
 
 using System.Runtime.InteropServices;
 
index e43834b0efd91fc2c5533c6705c0dc4589e0dbf5..c4d5843dd515570e103cf27d0f9136c36649a18b 100644 (file)
@@ -28,7 +28,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if !NET_2_1
+#if !NET_2_1 || MONOTOUCH
 
 using System.Globalization;
 using System.Runtime.InteropServices;
index 257121e63d48dc35a06bf65f694ebfbee7656a3d..798456c1a673e92eb1105217514444fcb81787cc 100644 (file)
@@ -27,7 +27,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if NET_2_0 && !NET_2_1
+#if NET_2_0 && !NET_2_1 || MONOTOUCH
 
 using System.Runtime.InteropServices;
 
index 250cfa80542dd66bc9ffa5f64e57cda5c71291ec..bcb352b3e8589e54f2b1a0ac8568d3ff277e26b3 100644 (file)
@@ -30,7 +30,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if NET_2_0 && !NET_2_1
+#if NET_2_0 && !NET_2_1 || MONOTOUCH
 
 using System.Runtime.InteropServices;
 
index 0b87ee459d60c984b7f78133b8b78d84a217d92c..4e29189d884288d1eedd53ec024e3edafa10d3d9 100644 (file)
@@ -29,7 +29,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if !NET_2_1
+#if !NET_2_1 || MONOTOUCH
 
 using System.IO;
 using System.Runtime.InteropServices;
index 1a67b8e43abccb6d1647ed87383a26b3cf8e7610..8d5b582d6f7fda5a2779fb418629fa9ace8b208f 100644 (file)
@@ -27,7 +27,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if !NET_2_1
+#if !NET_2_1 || MONOTOUCH
 \r
 using System.Runtime.InteropServices;
 \r
index a4de45bc062e2d1306943803fa1223b439223c18..74c9bea2e03b5056314f49b1f5247f33ec51a80c 100644 (file)
@@ -31,7 +31,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if !NET_2_1
+#if !NET_2_1 || MONOTOUCH
 
 using System.Runtime.InteropServices;
 using Mono.Security.Cryptography;
index 31e20cf49187ef2efd2e1c1805515f78eeeb22ba..ca696bda58285abff8e09e9a8e976eb4a38cd02f 100644 (file)
@@ -26,7 +26,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if NET_2_0 && !NET_2_1
+#if NET_2_0 && !NET_2_1 || MONOTOUCH
 
 using System.Runtime.InteropServices;
 
index 512b04cc48540007a7e13c6c3d711996dd708432..d1ff4f37039c323bcc6129d40f1a04d04702c3cd 100644 (file)
@@ -317,7 +317,7 @@ namespace System.Security.Cryptography {
                }
        }
 
-#if !NET_2_1
+#if !NET_2_1 || MONOTOUCH
 
 #if NET_2_0
        [ComVisible (true)]
index 23265a908ddfdb2e00d8e2b752d5951cdf5e0c16..70ba9c7451c1bbc9989dee36f1bb873f0cd238f5 100644 (file)
@@ -29,7 +29,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if !NET_2_1
+#if !NET_2_1 || MONOTOUCH
 
 using System.Runtime.InteropServices;
 \r
index 04a0b46a45b1c10b6dbe533784039e1486bb0088..9737f30fbbe854198a511429e42964f6241de666 100644 (file)
@@ -30,7 +30,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if !NET_2_1
+#if !NET_2_1 || MONOTOUCH
 
 using System.Runtime.InteropServices;
 
index 6ec92207bfaa53f8fe155b9f62bf11175f735965..3597bdd29e47e3a82bd92469f37ad3c853d239fc 100644 (file)
@@ -29,7 +29,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if !NET_2_1
+#if !NET_2_1 || MONOTOUCH
 
 using System.Runtime.InteropServices;
 \r
index 128605fb4690aa1608f82e3c4a61b4a158294ac1..c37bf221526be09b571f781cead52e7b41732069 100644 (file)
@@ -30,7 +30,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if !NET_2_1
+#if !NET_2_1 || MONOTOUCH
 
 using System.Runtime.InteropServices;
 
index 17f1016738c69bfa9c92bc4a827206336e44b1a1..b6bb62d4562eb788899cbb15a5469122ef0d2468 100644 (file)
@@ -44,7 +44,7 @@ namespace System.Security.Cryptography {
                protected byte[] KeyValue; 
                protected KeySizes[] LegalBlockSizesValue; 
                protected KeySizes[] LegalKeySizesValue; 
-#if NET_2_1
+#if NET_2_1 && !MONOTOUCH
                // Silverlight 2.0 only supports CBC
                internal int FeedbackSizeValue;
                internal CipherMode ModeValue;
@@ -67,7 +67,7 @@ namespace System.Security.Cryptography {
                        m_disposed = false;
                }
 
-#if NET_2_1
+#if NET_2_1 && !MONOTOUCH
                // No Finalizer or IDisposable.Dispose in Silverlight 2.0
                // Documentation makes it "clear" that Clear MUST BE CALLED to zero out sensitive information
 #else          
index 98166aaafd4f352877ad3d9c6bfc8d62423a83a2..59285a0e04ceffbabe8827fc619b7766bfe87be1 100644 (file)
@@ -27,7 +27,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if !NET_2_1
+#if !NET_2_1 || MONOTOUCH
 
 using System.Globalization;
 using System.Runtime.InteropServices;
index e1899ef51989974e2c23a86a122be57f294c25ff..98651d248d1195756e31c704c97105e0a0954a39 100644 (file)
@@ -27,7 +27,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if !NET_2_1
+#if !NET_2_1 || MONOTOUCH
 
 using System.Runtime.InteropServices;
 using Mono.Security.Cryptography;
index 78fa1710695aa6d42b7a233c38a071f39e298deb..3266156c6719b2efeee7f8b51ebb8950103a6fd0 100644 (file)
@@ -27,7 +27,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if !NET_2_1
+#if !NET_2_1 || MONOTOUCH
 
 using System.Runtime.InteropServices;
 using SSCX = System.Security.Cryptography.X509Certificates;
index ae4d56ad12b17c06cae4eff88b5cfae5a46c6f69..79328ed0b65c65e3b3f0f7f7524d03e452382672 100644 (file)
@@ -39,7 +39,7 @@ using System.Runtime.InteropServices;
 using System.Security.Permissions;
 using System.Security.Cryptography.X509Certificates;
 
-#if !NET_2_1
+#if !NET_2_1 || MONOTOUCH
 using Mono.Security.Authenticode;
 #endif
 
index 8f978dc645456ee0704cfe4df3886605dac44f32..60342d12970738db73f8dc671ccc663001c41b43 100644 (file)
@@ -29,7 +29,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if !NET_2_1
+#if !NET_2_1 || MONOTOUCH
 
 using System.IO;
 using System.Reflection;
index 6aad2ffa8fa69037dbccccc28236748634efb923..9581d35ccd4008557a9e08b36d9353b1b65a7c8d 100644 (file)
@@ -28,7 +28,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if !NET_2_1
+#if !NET_2_1 || MONOTOUCH
 
 using System.Collections;
 using System.Globalization;
index 8f12a0df7f3cadd703dfcb6f3eb150ac9b3b9739..2ef4b76b3ababd93258c4119b6aab7944e784f76 100644 (file)
@@ -31,7 +31,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if !NET_2_1
+#if !NET_2_1 || MONOTOUCH
 
 using System.Collections; // for IList
 using System.Globalization;
index 8c0c677eb30c546f8b79130bd1b503725da3573e..09186541a46ba4657ba7507ce7cc50819a8cd360 100644 (file)
@@ -31,7 +31,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if NET_2_1
+#if NET_2_1 && !MONOTOUCH
 
 using System.Reflection;
 
index ab5d241c9a9627c8914c57a3320dc8ed0bf50169..523da64af93ff58a9d2d58beca7ad52d707e89f6 100644 (file)
@@ -28,7 +28,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if !NET_2_1
+#if !NET_2_1 || MONOTOUCH
 
 using System.IO;
 using System.Globalization;
index 70a15877956cc584f11945642201b72859188f2e..033e55970dd1b7d5bf726a61e863b4a72e9a8339 100644 (file)
@@ -28,7 +28,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if !NET_2_1
+#if !NET_2_1 || MONOTOUCH
 
 using System.Collections;
 using System.Globalization;
index 7e9ee77a65a0c024bc884e286668fcc24d73f799..d08b1f32e743c5d4782c8c0d840c769250b4f7c6 100644 (file)
@@ -29,7 +29,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if !NET_2_1
+#if !NET_2_1 || MONOTOUCH
 
 using System.Collections;
 using System.Globalization;
index 21f7009d827d3ff18bfcdf4ee34f1cb69ca254fe..dbed76148390aa6cc3b71d6fcec196fa1c8c5917 100644 (file)
@@ -29,7 +29,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if NET_2_1
+#if NET_2_1 && !MONOTOUCH
 
 using System.Reflection;
 using System.Security.Policy;
index b0d6471a604a4cd7c27759a8856f187b9a4e343b..e43cc69619c29ab94df4451cb6a7ea68eb81e6cd 100644 (file)
@@ -30,7 +30,7 @@
 
 namespace System.Security {
 
-#if !NET_2_1
+#if !NET_2_1 || MONOTOUCH
        [MonoTODO ("Only supported by the runtime when CoreCLR is enabled")]
 #endif
        [AttributeUsage (AttributeTargets.All, AllowMultiple=false, Inherited=false)]
index c0744452c0575e03b28dfe824f0e96507bcc5029..47145b85314843996a51ef0ecc41bbaa36237460 100644 (file)
@@ -30,7 +30,7 @@
 
 namespace System.Security {
 
-#if !NET_2_1
+#if !NET_2_1 || MONOTOUCH
        [MonoTODO ("Only supported by the runtime when CoreCLR is enabled")]
 #endif
        [AttributeUsage (AttributeTargets.Assembly, AllowMultiple=false, Inherited=false)]