final TrustLevel[] trustLevel = new TrustLevel[1];
PlatformUI.getWorkbench().getDisplay().syncExec( new Runnable()
{
public void run()
{
CertificateTrustDialog dialog = new CertificateTrustDialog( PlatformUI.getWorkbench().getDisplay()
.getActiveShell(), host, certChain, failCauses );
dialog.open();
trustLevel[0] = dialog.getTrustLevel();
}
} );
return trustLevel[0];
}