419899 Do not wrap SSL Exception as EoFException

This commit is contained in:
Greg Wilkins 2013-10-21 16:29:20 +11:00
parent 33e2055468
commit c44537fca8
2 changed files with 2 additions and 7 deletions

View File

@ -116,8 +116,8 @@ public class HostnameVerificationTest
// Therefore this test may catch a SSLHandshakeException, or a ClosedChannelException.
// If it is the former, we verify that its cause is a CertificateException.
// ExecutionException wraps an EofException that wraps the SSLHandshakeException
Throwable cause = x.getCause().getCause();
// ExecutionException wraps an SSLHandshakeException
Throwable cause = x.getCause();
if (cause instanceof SSLHandshakeException)
assertThat(cause.getCause().getCause(), instanceOf(CertificateException.class));
else

View File

@ -632,11 +632,6 @@ public class SslConnection extends AbstractConnection
}
}
}
catch (SSLException e)
{
getEndPoint().close();
throw new EofException(e);
}
catch (Exception e)
{
getEndPoint().close();