1
0
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:
Patrick Simpson 2019-01-08 09:47:14 +02:00
parent 5c722432da
commit f860e83500
2 changed files with 23 additions and 8 deletions

View File

@ -162,6 +162,14 @@ namespace Acacia
}
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

View File

@ -62,6 +62,12 @@ namespace Acacia.ZPush.Connect
bool allow = false;
if (!_allowCertificateErrors.TryGetValue(request.Host, out allow))
{
if (GlobalOptions.INSTANCE.IgnoreCertificateErrors)
{
allow = true;
}
else
{
ThisAddIn.Instance.InvokeUI(() =>
{
@ -72,6 +78,7 @@ namespace Acacia.ZPush.Connect
MessageBoxIcon.Error
) == DialogResult.Yes;
});
}
_allowCertificateErrors.Add(request.Host, allow);
}