Просмотр исходного кода

only check for the Mac library file once

svn path=/trunk/mcs/; revision=154237
Gonzalo Paniagua Javier 16 лет назад
Родитель
Сommit
1bc30f2f98
1 измененных файлов с 2 добавлено и 1 удалено
  1. 2 1
      mcs/class/System/System.Net/ServicePointManager.cs

+ 2 - 1
mcs/class/System/System.Net/ServicePointManager.cs

@@ -387,6 +387,7 @@ namespace System.Net
 		internal class ChainValidationHelper {
 			object sender;
 			string host;
+			static bool is_macosx = System.IO.File.Exists (MSX.OSX509Certificates.SecurityLibrary);
 
 			public ChainValidationHelper (object sender)
 			{
@@ -439,7 +440,7 @@ namespace System.Net
 				bool result = false;
 				// No certificate root found means no mozroots or monotouch
 #if !MONOTOUCH
-				if (System.IO.File.Exists (MSX.OSX509Certificates.SecurityLibrary)) {
+				if (is_macosx) {
 #endif
 					// Attempt to use OSX certificates
 					// Ideally we should return the SecTrustResult