Skip to content

Not possible to use WebSocketTransport exclusively on TLS 1.3 #3497

Open
@fortesdev

Description

@fortesdev

Summary

The following problem was probably always in the iOS Apollo library, and continues in the latest version (1.15.3):

It is not possible to use WebSocketTransport on TLS 1.3 (cipher TLS_AES_256_GCM_SHA384). Our implementation works just fine on endpoints that support TLS 1.2 and other ciphers.

Version

1.15.3 and older

Steps to reproduce the behavior

  1. Target an endpoint that enforces as minimum TLS version 1.3 (cipher suite TLS_AES_256_GCM_SHA384), and try a GraphQL subscription on it.
    Result: TLSv1.3 SSLHandshake failed (-9836) on real device. OSS error -9836 is errSSLPeerProtocolVersion.

  2. In the web socket client, add enabledSSLCipherSuites = [TLS_AES_256_GCM_SHA384].
    Result: FoundationStream's connect method ends with SSLSetEnabledCiphers returning -50. SSLSetEnabledCiphers is deprecated, by the way.

Some notes:

  • Exact same implementation/subscription on similar endpoint that allows TLS 1.2 (with more ciphers) do work on iOS.
  • Our Android and Web implementation with Apollo do work on that endpoint TLS 1.3.
  • Nothing helped to make it work on iOS (disableSSLCertValidation, NSAppTransportSecurity changes, etc.)

Logs

No response

Anything else?

Not sure if the certificate strength can be a factor - The new Digicert G5 root certificate is a 4096 bit one.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions