*/
private void handleCertificateException(UserDataCertificateException ce,
String bindDN, String bindPassword)
throws NamingException, ConfigReadException
{
CertificateDialog dlg = new CertificateDialog(null, ce);
dlg.pack();
Utilities.centerGoldenMean(dlg, Utilities.getParentDialog(this));
dlg.setVisible(true);
if (dlg.getUserAnswer() !=
CertificateDialog.ReturnType.NOT_ACCEPTED)
{
X509Certificate[] chain = ce.getChain();
String authType = ce.getAuthType();
String host = ce.getHost();
if ((chain != null) && (authType != null) && (host != null))
{
LOG.log(Level.INFO, "Accepting certificate presented by host "+host);
getInfo().getTrustManager().acceptCertificate(chain, authType, host);
createdUserDataCtx = createUserDataDirContext(bindDN, bindPassword);
}
else
{
if (chain == null)
{
LOG.log(Level.WARNING,
"The chain is null for the UserDataCertificateException");
}
if (authType == null)
{
LOG.log(Level.WARNING,
"The auth type is null for the UserDataCertificateException");
}
if (host == null)
{
LOG.log(Level.WARNING,
"The host is null for the UserDataCertificateException");
}
}
}
if (dlg.getUserAnswer() ==
CertificateDialog.ReturnType.ACCEPTED_PERMANENTLY)
{
X509Certificate[] chain = ce.getChain();
if (chain != null)
{