Skip to content
This repository has been archived by the owner on Dec 12, 2021. It is now read-only.

Unhandled RuntimeException in LinkResolver #24

Open
IgnoredAmbience opened this issue May 6, 2016 · 2 comments
Open

Unhandled RuntimeException in LinkResolver #24

IgnoredAmbience opened this issue May 6, 2016 · 2 comments

Comments

@IgnoredAmbience
Copy link
Contributor

[04/25/16 11:42 DoCitten.LinkServier SEVERE] Uncaught exception in 'LinkResolver [https://www]' uk.co.harcourtprogramming.docitten.LinkResolver::run <LinkResolver [https://www]:LinkResolvers>
RuntimeException
: javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: No subject alternative DNS name matching www found.
    uk.co.harcourtprogramming.docitten.LinkResolver.run(LinkResolver.java:160)
SSLHandshakeException
: java.security.cert.CertificateException: No subject alternative DNS name matching www found.
    sun.security.ssl.Alerts.getSSLException(Alerts.java:192)
    sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1916)
    sun.security.ssl.Handshaker.fatalSE(Handshaker.java:279)
    sun.security.ssl.Handshaker.fatalSE(Handshaker.java:273)
    sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1472)
    sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:213)
    sun.security.ssl.Handshaker.processLoop(Handshaker.java:913)
    sun.security.ssl.Handshaker.process_record(Handshaker.java:849)
    sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1035)
    sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1344)
    sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1371)
    sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1355)
    sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:559)
    sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
    sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:153)
    uk.co.harcourtprogramming.docitten.LinkResolver.run(LinkResolver.java:150)
CertificateException
: No subject alternative DNS name matching www found.
    sun.security.util.HostnameChecker.matchDNS(HostnameChecker.java:204)
    sun.security.util.HostnameChecker.match(HostnameChecker.java:95)
    sun.security.ssl.X509TrustManagerImpl.checkIdentity(X509TrustManagerImpl.java:347)
    sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:203)
    sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:126)
    sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1454)
    sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:213)
    sun.security.ssl.Handshaker.processLoop(Handshaker.java:913)
    sun.security.ssl.Handshaker.process_record(Handshaker.java:849)
    sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1035)
    sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1344)
    sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1371)
    sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1355)
    sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:559)
    sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
    sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:153)
    uk.co.harcourtprogramming.docitten.LinkResolver.run(LinkResolver.java:150)
[05/03/16 17:36 DoCitten.LinkServier SEVERE] Uncaught exception in 'LinkResolver [https://www.openssl.org/news/secadv/20160503.txt]' uk.co.harcourtprogramming.docitten.LinkResolver::run <LinkResolver [https://www.openssl.org/news/secadv/20160503.txt]:LinkResolvers>
RuntimeException
: javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake
    uk.co.harcourtprogramming.docitten.LinkResolver.run(LinkResolver.java:160)
SSLHandshakeException
: Remote host closed connection during handshake
    sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:965)
    sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1344)
    sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1371)
    sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1355)
    sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:559)
    sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
    sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:153)
    uk.co.harcourtprogramming.docitten.LinkResolver.run(LinkResolver.java:150)
EOFException
: SSL peer shut down incorrectly
    sun.security.ssl.InputRecord.read(InputRecord.java:482)
    sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:946)
    sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1344)
    sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1371)
    sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1355)
    sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:559)
    sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
    sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:153)
    uk.co.harcourtprogramming.docitten.LinkResolver.run(LinkResolver.java:150)

And similar connection/ssl errors.

javajawa added a commit that referenced this issue May 7, 2016
As a partial change addressing #24, two subclasses of SSLHandshakeException
are logged at a fine level, rather than thrown as a RuntimeException.

java.security.cert.CertificateException -- Invalid/Missing certificate
java.io.EOFException -- Remote handshake or later remote hang-up
@javajawa
Copy link
Owner

javajawa commented May 7, 2016

I'm somewhat undecided on what exceptions should result in what actions.

I'm thinking that the following should be true? (Not suer how to make guaranteed tests for all of them).

Fine Log

  • Connection Refused
  • Connection Timed out
  • Unable to negotiate SSL protocol/cipher
  • Protocol excpetion (via EOF)

Report to User

  • Invalid/Expired Certificate (reply with "[domain.tld] [Invalid SSL Certificate]")

Runtime Exception

  • Everything else

@IgnoredAmbience
Copy link
Contributor Author

Lgtm
On 7 May 2016 20:08, "Benedict Harcourt" notifications@github.com wrote:

I'm somewhat undecided on what exceptions should result in what actions.

I'm thinking that the following should be true? (Not suer how to make
guaranteed tests for all of them).

Fine Log

  • Connection Refused
  • Connection Timed out
  • Unable to negotiate SSL protocol/cipher
  • Protocol excpetion (via EOF)

Report to User

  • Invalid/Expired Certificate (reply with "[domain.tld] [Invalid SSL
    Certificate]")

Runtime Exception

  • Everything else


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#24 (comment)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants