OSDN Git Service

Windows 8.1にてUserStreamが動作しない問題を修正
authorKenji Wada <ch3cooh393@gmail.com>
Thu, 27 Jun 2013 14:57:04 +0000 (23:57 +0900)
committerKenji Wada <ch3cooh393@gmail.com>
Thu, 27 Jun 2013 14:57:04 +0000 (23:57 +0900)
OpenTween/Connection/HttpConnection.cs

index 61247a2..9249ac8 100644 (file)
@@ -1,4 +1,4 @@
-// OpenTween - Client of Twitter
+// OpenTween - Client of Twitter
 // Copyright (c) 2007-2011 kiri_feather (@kiri_feather) <kiri.feather@gmail.com>
 //           (c) 2008-2011 Moz (@syo68k)
 //           (c) 2008-2011 takeshik (@takeshik) <http://www.takeshik.org/>
@@ -704,6 +704,13 @@ namespace OpenTween
             }
             proxyKind = proxyType;
 
+            // Windows 8.1の場合SecurityProtocolを明確に指定する必要がある  
+            var osVersion = Environment.OSVersion.Version;  
+            if (osVersion.Major == 6 && osVersion.Minor == 2)  
+            {  
+                ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3;  
+            }  
+
             Win32Api.SetProxy(proxyType, proxyAddress, proxyPort, proxyUser, proxyPassword);
         }
     }