javajawa / DoCitten

DoCitten: The Cutest IRC bot ever [citation needed]
2 stars 3 forks source link

Unhandled RuntimeException in LinkResolver #24

Open IgnoredAmbience opened 8 years ago

IgnoredAmbience commented 8 years ago
[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 commented 8 years ago

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

Report to User

Runtime Exception

IgnoredAmbience commented 8 years ago

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 https://github.com/javajawa/DoCitten/issues/24#issuecomment-217662327