Fix ssl trustmanager error handling

git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@1447 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
mguessan 2010-09-14 21:13:31 +00:00
parent 488b01756c
commit a5fedf4ed6
1 changed files with 5 additions and 5 deletions

View File

@ -125,17 +125,17 @@ public class DavGatewayX509TrustManager implements X509TrustManager {
buffer.append(BundleMessage.format("UI_FINGERPRINT")).append(": ").append(sha1Hash).append('\n');
buffer.append('\n');
buffer.append(BundleMessage.format("UI_UNTRUSTED_CERTIFICATE")).append('\n');
while (!yes.equals(answer) && !no.equals(answer)) {
System.out.println(buffer.toString());
try {
try {
while (!yes.equals(answer) && !no.equals(answer)) {
System.out.println(buffer.toString());
answer = inReader.readLine();
if (answer == null) {
answer = no;
}
answer = answer.toLowerCase();
} catch (IOException e) {
System.err.println(e);
}
} catch (IOException e) {
System.err.println(e);
}
return yes.equals(answer);
}