Skip to content

Commit 226d727

Browse files
committed
Remove incorrect certificate warning
javax.net.ssl.SSLHandshakeException can be thrown for a variety of reasons that are not related to the certificate being invalid, most notably socket errors while trying to negotate the TLS session. This can result in spurious warnings about the remote host serving an invalid certificate when a connection is closed, and can easily be triggered by a network change.
1 parent 475b361 commit 226d727

1 file changed

Lines changed: 0 additions & 3 deletions

File tree

android/src/main/java/com/mattermost/networkclient/NetworkClient.kt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -245,9 +245,6 @@ internal class NetworkClient(private val context: Context, private val baseUrl:
245245
rejectInvalidCertificate(promise, request.url.host)
246246
return
247247
}
248-
} else if (e is javax.net.ssl.SSLHandshakeException) {
249-
rejectInvalidCertificate(promise, request.url.host)
250-
return
251248
}
252249
promise.reject(e)
253250
}

0 commit comments

Comments
 (0)