Merge pull request #409 from Alkarex/patch-1
[mono.git] / mcs / class / corlib / System.Security.Cryptography / DSACryptoServiceProvider.cs
index f6500cd3cd194790b84d88f792a34fcfa6399264..6c4f84ea3b795ec521ae5decd8106005f137ba53 100644 (file)
@@ -31,7 +31,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if !NET_2_1
+#if !MOONLIGHT
 
 using System.IO;
 using System.Globalization;
@@ -41,14 +41,8 @@ using Mono.Security.Cryptography;
 
 namespace System.Security.Cryptography {
 
-#if NET_2_0
        [ComVisible (true)]
        public sealed class DSACryptoServiceProvider : DSA, ICspAsymmetricAlgorithm {
-#elif NET_1_1
-       public sealed class DSACryptoServiceProvider : DSA {
-#else
-       public class DSACryptoServiceProvider : DSA {
-#endif
                private const int PROV_DSS_DH = 13;             // from WinCrypt.h
 
                private KeyPairPersistence store;
@@ -98,10 +92,8 @@ namespace System.Security.Cryptography {
                        persistKey = (parameters != null);
                        if (parameters == null) {
                                parameters = new CspParameters (PROV_DSS_DH);
-#if NET_1_1
                                if (useMachineKeyStore)
                                        parameters.Flags |= CspProviderFlags.UseMachineKeyStore;
-#endif
                                store = new KeyPairPersistence (parameters);
                                // no need to load - it cannot exists
                        }
@@ -129,24 +121,13 @@ namespace System.Security.Cryptography {
                        get { return dsa.KeySize; }
                }
 
-#if !NET_2_0
-               public override KeySizes[] LegalKeySizes {
-                       get { return LegalKeySizesValue; }
-               }
-#endif
-
                public bool PersistKeyInCsp {
                        get { return persistKey; }
                        set { persistKey = value; }
                }
 
-#if NET_2_0
                [ComVisible (false)]
-               public 
-#else
-               internal
-#endif
-               bool PublicOnly {
+               public bool PublicOnly {
                        get { return dsa.PublicOnly; }
                }
 
@@ -154,14 +135,12 @@ namespace System.Security.Cryptography {
                        get { return "http://www.w3.org/2000/09/xmldsig#dsa-sha1"; }
                }
 
-#if NET_1_1
-               private static bool useMachineKeyStore = false;
+               private static bool useMachineKeyStore;
 
                public static bool UseMachineKeyStore {
                        get { return useMachineKeyStore; }
                        set { useMachineKeyStore = value; }
                }
-#endif
 
                public override DSAParameters ExportParameters (bool includePrivateParameters) 
                {
@@ -270,7 +249,6 @@ namespace System.Security.Cryptography {
                                persisted = true;
                        }
                }
-#if NET_2_0
                // ICspAsymmetricAlgorithm
 
                [MonoTODO ("call into KeyPairPersistence to get details")]
@@ -313,7 +291,6 @@ namespace System.Security.Cryptography {
                                }
                        }
                }
-#endif
        }
 }