Handle exceptions from X092certificate2

refs #6200
This commit is contained in:
Jean Flach 2018-04-05 13:36:12 +02:00
parent e08231f4df
commit e470e8927a
1 changed files with 6 additions and 3 deletions

View File

@ -176,9 +176,12 @@ namespace Icinga
}
SetRetrievalStatus(100);
try {
X509Certificate2 cert = new X509Certificate2(_TrustedFile);
Invoke((MethodInvoker)delegate { ShowCertificatePrompt(cert); });
} catch (Exception e) {
ShowErrorText("Failed to receive certificate: " + e.Message);
}
}
private void ConfigureService()