Does iOS support TLS compression?

I need to compress data sent over a secure channel in my iOS application, and I was wondering if I can use TLS compression for this. I can’t understand if Apple TLS, Secure Transport, does the same.

Does anyone else know if TLS compression is supported in iOS or not?

+5
source share
1 answer

I tried to determine if Apple's SSL / TLS implementation supports compression, but I have to say that I am afraid that it does not.

At first I was hoping that with an error code there errSSLPeerDecompressFailshould be a way to enable compression. But I could not find him.

, Apple , - , (6.1), . Hello Hello : null.

libsecurity_ssl, Apple. Mac OS X 10.7.5, - , iOS , , , , , Mac OS X.

sslHandshakeHello.c, 186-187 (SSLProcessServerHello):

if (*p++ != 0)      /* Compression */
    return unimpErr;

, " , null (0), , ".

, , 325 (SSLEncodeClientHello):

*p++ = 0; /* null compression */

(DEFLATE - 1, RFC 3749).

469, 476 482-483 (SSLProcessClientHello):

compressionCount = *(charPtr++);
...
/* Ignore list; we're doing null */
...
/* skip compression list */
charPtr += compressionCount;

, , null: , Client Hello, , Server Hello, , Hello (null ).

, . .

+2

All Articles