Merge pull request #409 from Alkarex/patch-1
[mono.git] / mcs / class / corlib / Mono.Security.Cryptography / KeyPairPersistence.cs
index ad43b08c49505c5d4122e3d90b071bac115473a3..c118cc3785c7633399b4d0fff3da33ba6cdbf9a4 100644 (file)
@@ -26,6 +26,8 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
+#if !MOONLIGHT
+
 using System;
 using System.Globalization;
 using System.IO;
@@ -98,10 +100,10 @@ namespace Mono.Security.Cryptography {
 #endif
        class KeyPairPersistence {
        
-               private static bool _userPathExists = false; // check at 1st use
+               private static bool _userPathExists; // check at 1st use
                private static string _userPath;
                
-               private static bool _machinePathExists = false; // check at 1st use
+               private static bool _machinePathExists; // check at 1st use
                private static string _machinePath;
 
                private CspParameters _params;
@@ -323,7 +325,7 @@ namespace Mono.Security.Cryptography {
                        // check for Unix platforms - see FAQ for more details
                        // http://www.mono-project.com/FAQ:_Technical#How_to_detect_the_execution_platform_.3F
                        int platform = (int) Environment.OSVersion.Platform;
-                       if ((platform == 4) || (platform == 128))
+                       if ((platform == 4) || (platform == 128) || (platform == 6))
                                return true;
 
                        // while we ask the runtime for Windows OS
@@ -452,3 +454,6 @@ namespace Mono.Security.Cryptography {
                }
        }
 }
+
+#endif
+