mirror of
https://github.com/Kopano-dev/kopano-ol-extension.git
synced 2023-10-10 13:37:40 +02:00
Added debug option to ignore SSL errors
This commit is contained in:
parent
5c722432da
commit
f860e83500
@ -162,6 +162,14 @@ namespace Acacia
|
|||||||
}
|
}
|
||||||
private static readonly BoolOption RELEASE_ITEM_EVENT_WRAPPERS = new BoolOption("ReleaseItemEventWrappers", true);
|
private static readonly BoolOption RELEASE_ITEM_EVENT_WRAPPERS = new BoolOption("ReleaseItemEventWrappers", true);
|
||||||
|
|
||||||
|
[AcaciaOption("If enabled, certificate errors from Z-Push servers are ignored silently.")]
|
||||||
|
virtual public bool IgnoreCertificateErrors
|
||||||
|
{
|
||||||
|
get { return GetOption(null, IGNORE_CERTIFICATE_ERRORS); }
|
||||||
|
set { SetOption(null, IGNORE_CERTIFICATE_ERRORS, value); }
|
||||||
|
}
|
||||||
|
private static readonly BoolOption IGNORE_CERTIFICATE_ERRORS = new BoolOption("IgnoreCertificateErrors", false);
|
||||||
|
|
||||||
|
|
||||||
#region UI Options
|
#region UI Options
|
||||||
|
|
||||||
|
@ -63,15 +63,22 @@ namespace Acacia.ZPush.Connect
|
|||||||
bool allow = false;
|
bool allow = false;
|
||||||
if (!_allowCertificateErrors.TryGetValue(request.Host, out allow))
|
if (!_allowCertificateErrors.TryGetValue(request.Host, out allow))
|
||||||
{
|
{
|
||||||
ThisAddIn.Instance.InvokeUI(() =>
|
if (GlobalOptions.INSTANCE.IgnoreCertificateErrors)
|
||||||
{
|
{
|
||||||
allow = MessageBox.Show(
|
allow = true;
|
||||||
string.Format(Properties.Resources.SSLFailed_Body, request.Host),
|
}
|
||||||
Properties.Resources.SSLFailed_Title,
|
else
|
||||||
MessageBoxButtons.YesNo,
|
{
|
||||||
MessageBoxIcon.Error
|
ThisAddIn.Instance.InvokeUI(() =>
|
||||||
) == DialogResult.Yes;
|
{
|
||||||
});
|
allow = MessageBox.Show(
|
||||||
|
string.Format(Properties.Resources.SSLFailed_Body, request.Host),
|
||||||
|
Properties.Resources.SSLFailed_Title,
|
||||||
|
MessageBoxButtons.YesNo,
|
||||||
|
MessageBoxIcon.Error
|
||||||
|
) == DialogResult.Yes;
|
||||||
|
});
|
||||||
|
}
|
||||||
_allowCertificateErrors.Add(request.Host, allow);
|
_allowCertificateErrors.Add(request.Host, allow);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user