• R/O
  • SSH
  • HTTPS

ewatch: Commit


Commit MetaInfo

Revision103 (tree)
Zeit2019-07-27 16:52:16
Autorbananajinn

Log Message

サーバー証明書を無条件に受け付ける

Ändern Zusammenfassung

Diff

--- trunk/EWatchC/EWatchC/EWService.cs (revision 102)
+++ trunk/EWatchC/EWatchC/EWService.cs (revision 103)
@@ -17,6 +17,8 @@
1717 using EWatch.Watchers;
1818 using log4net;
1919 using log4net.Config;
20+using System.Security.Cryptography.X509Certificates;
21+using System.Net.Security;
2022
2123 namespace EWatch
2224 {
@@ -106,6 +108,10 @@
106108 public void Initialize()
107109 {
108110 config = new Configuration(true, ConfigFile);
111+ System.Net.ServicePointManager.ServerCertificateValidationCallback =
112+ delegate(object s, X509Certificate cert, X509Chain chain, SslPolicyErrors errors){
113+ return true;
114+ };
109115 }
110116
111117 public void StartWatch()
Show on old repository browser