diff --git a/addons/plugin_outlook/static/openerp-outlook-plugin/OpenERPClient/OpenERPConnect.cs b/addons/plugin_outlook/static/openerp-outlook-plugin/OpenERPClient/OpenERPConnect.cs index d6672828ed0..f9314adc417 100644 --- a/addons/plugin_outlook/static/openerp-outlook-plugin/OpenERPClient/OpenERPConnect.cs +++ b/addons/plugin_outlook/static/openerp-outlook-plugin/OpenERPClient/OpenERPConnect.cs @@ -377,20 +377,6 @@ namespace OpenERPClient return version; } - public bool check_connectivity() - { - /* - It will check connection on given server url. - - :return : True or False. - */ - - this.Open(OpenERPClient.OpenERPService.Common); - bool flag = this.rpcclient.check_connectivity(); - this.Close(); - return flag; - } - } diff --git a/addons/plugin_outlook/static/openerp-outlook-plugin/OpenERPClient/XMLRPCClient.cs b/addons/plugin_outlook/static/openerp-outlook-plugin/OpenERPClient/XMLRPCClient.cs index ebe9ec142e2..23768b02b4f 100644 --- a/addons/plugin_outlook/static/openerp-outlook-plugin/OpenERPClient/XMLRPCClient.cs +++ b/addons/plugin_outlook/static/openerp-outlook-plugin/OpenERPClient/XMLRPCClient.cs @@ -47,10 +47,6 @@ namespace OpenERPClient [XmlRpcMethod("server_version")] string ServerVersion(); - [XmlRpcMethod("check_connectivity")] - bool check_connectivity(); - - } public interface Ixmlrpcconnect : IOpenERPCommon, IOpenERPDB, IOpenERPObject { @@ -84,11 +80,6 @@ namespace OpenERPClient { return rpcclient.ServerVersion(); } - - public bool check_connectivity() - { - return rpcclient.check_connectivity(); - } #endregion diff --git a/addons/plugin_outlook/static/openerp-outlook-plugin/OpenERPOutlookPlugin/frm_openerp_connection.Designer.cs b/addons/plugin_outlook/static/openerp-outlook-plugin/OpenERPOutlookPlugin/frm_openerp_connection.Designer.cs index aeca33da72f..ce88d2e713d 100644 --- a/addons/plugin_outlook/static/openerp-outlook-plugin/OpenERPOutlookPlugin/frm_openerp_connection.Designer.cs +++ b/addons/plugin_outlook/static/openerp-outlook-plugin/OpenERPOutlookPlugin/frm_openerp_connection.Designer.cs @@ -64,6 +64,7 @@ this.chkSSL.TabIndex = 19; this.chkSSL.Text = "SSL (https)"; this.chkSSL.UseVisualStyleBackColor = true; + this.chkSSL.CheckedChanged += new System.EventHandler(this.chkSSL_CheckedChanged); // // txt_server_port // diff --git a/addons/plugin_outlook/static/openerp-outlook-plugin/OpenERPOutlookPlugin/frm_openerp_connection.cs b/addons/plugin_outlook/static/openerp-outlook-plugin/OpenERPOutlookPlugin/frm_openerp_connection.cs index 1c663f58fe2..5e09fc153a2 100644 --- a/addons/plugin_outlook/static/openerp-outlook-plugin/OpenERPOutlookPlugin/frm_openerp_connection.cs +++ b/addons/plugin_outlook/static/openerp-outlook-plugin/OpenERPOutlookPlugin/frm_openerp_connection.cs @@ -20,6 +20,13 @@ using System; using System.Windows.Forms; using OpenERPClient; +using System.Net; +using System.IO; +using System.Text; +using System.Security; +using System.Net; +using System.Security.Cryptography.X509Certificates; +using System.Net.Security; namespace OpenERPOutlookPlugin { @@ -50,6 +57,15 @@ namespace OpenERPOutlookPlugin } } + public static bool ValidateServerCertificate( + object sender, + X509Certificate certificate, + X509Chain chain, + SslPolicyErrors sslPolicyErrors) + { + // Somehow the cert always has PolicyErrors so I am returning true regardless. + return true; + } private void btn_server_ok_Click(object sender, EventArgs e) { @@ -59,7 +75,10 @@ namespace OpenERPOutlookPlugin OpenERPConnect openerp_connect = openerp_outlook.Connection; string url = Tools.JoinURL(this.txt_server_host.Text, this.txt_server_port.Text, this.chkSSL.Checked); this.txtServerURL.Text = url; - openerp_connect.check_connectivity(); + if (this.chkSSL.Checked) + { + ServicePointManager.ServerCertificateValidationCallback += new RemoteCertificateValidationCallback(ValidateServerCertificate); + } this.Close(); } catch (Exception ex) @@ -74,6 +93,16 @@ namespace OpenERPOutlookPlugin this.Close(); } - + private void chkSSL_CheckedChanged(object sender, EventArgs e) + { + if (this.chkSSL.Checked) + { + txt_server_port.Text = "443"; + } + else + { + txt_server_port.Text = "8069"; + } + } } } diff --git a/addons/plugin_outlook/static/openerp-outlook-plugin/OpenERPOutlookPluginSetup32.msi b/addons/plugin_outlook/static/openerp-outlook-plugin/OpenERPOutlookPluginSetup32.msi index 9d9dd5d3ad3..64f54f22a65 100644 Binary files a/addons/plugin_outlook/static/openerp-outlook-plugin/OpenERPOutlookPluginSetup32.msi and b/addons/plugin_outlook/static/openerp-outlook-plugin/OpenERPOutlookPluginSetup32.msi differ diff --git a/addons/plugin_outlook/static/openerp-outlook-plugin/OpenERPOutlookPluginSetup64.msi b/addons/plugin_outlook/static/openerp-outlook-plugin/OpenERPOutlookPluginSetup64.msi index 0c2fa88bb24..3b91dafed55 100644 Binary files a/addons/plugin_outlook/static/openerp-outlook-plugin/OpenERPOutlookPluginSetup64.msi and b/addons/plugin_outlook/static/openerp-outlook-plugin/OpenERPOutlookPluginSetup64.msi differ