Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Verify that certificate is valid for server hostname #107

Merged
merged 1 commit into from
Apr 23, 2017

Commits on Apr 22, 2017

  1. Verify that certificate is valid for server hostname

    Without this change, the WebSocket library will accept
    a trusted certificate issued for domain A when connecting
    to domain B. This could be exploited for Man-in-the-middle
    attacks.
    
    The underlying issue is that Java considers hostname
    verification to be a part of HTTPS and as such, will
    not perform it by default.
    
    This change adds the default HostnameVerifier used
    by Android, which in recent versions is derived from
    OkHttp. Minor changes were made to make it build for
    Java 1.6.
    
    Tested with and without a proxy configured.
    blunden committed Apr 22, 2017
    Configuration menu
    Copy the full SHA
    feb9c83 View commit details
    Browse the repository at this point in the history