Skip to content
Snippets Groups Projects
Commit 61b63eb2 authored by Janne Mareike Koschinski's avatar Janne Mareike Koschinski
Browse files

Fixing SSL handshake bug

parent d68514f7
No related branches found
No related tags found
No related merge requests found
Pipeline #
......@@ -11,7 +11,6 @@ class QuasselHostnameManager(
fun isValid(address: SocketAddress, chain: Array<out X509Certificate>): Boolean {
val leafCertificate = chain.firstOrNull() ?: return false
val whitelistEntry = hostnameWhitelist.find(leafCertificate.fingerprint, address.host)
val all = hostnameWhitelist.all()
return whitelistEntry != null
}
}
......@@ -202,15 +202,23 @@ class CoreConnection(
}
}
channel?.close()
} catch (e: QuasselSecurityException) {
close()
securityExceptionCallback(e)
} catch (e: Throwable) {
var cause: Throwable? = e
var exception: QuasselSecurityException?
do {
exception = cause as? QuasselSecurityException
cause = cause?.cause
} while (cause != null && exception == null)
if (exception != null) {
close()
securityExceptionCallback(exception)
} else {
log(WARN, TAG, "Error encountered in connection", e)
log(WARN, TAG, "Last sent message: ${MessageRunnable.lastSent.get()}")
close()
}
}
}
private fun processSigProxy(dataBuffer: ByteBuffer) = handlerService.deserialize {
try {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment