mirror of https://github.com/Icinga/icinga2.git
Merge pull request #6201 from Icinga/fix/x509-exception
Handle exceptions from X509Certificate2
This commit is contained in:
commit
90d39d7d7c
|
@ -176,9 +176,12 @@ namespace Icinga
|
|||
}
|
||||
|
||||
SetRetrievalStatus(100);
|
||||
|
||||
X509Certificate2 cert = new X509Certificate2(_TrustedFile);
|
||||
Invoke((MethodInvoker)delegate { ShowCertificatePrompt(cert); });
|
||||
try {
|
||||
X509Certificate2 cert = new X509Certificate2(_TrustedFile);
|
||||
Invoke((MethodInvoker)delegate { ShowCertificatePrompt(cert); });
|
||||
} catch (Exception e) {
|
||||
ShowErrorText("Failed to receive certificate: " + e.Message);
|
||||
}
|
||||
}
|
||||
|
||||
private void ConfigureService()
|
||||
|
|
Loading…
Reference in New Issue