Description
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
-
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. -
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.