aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssl
diff options
context:
space:
mode:
authorIngela Anderton Andin <[email protected]>2018-09-06 10:09:52 +0200
committerIngela Anderton Andin <[email protected]>2018-09-06 11:26:37 +0200
commit5960e81bc4e19d54a3b082840301665ad0e1cd09 (patch)
treef71efdf1434efaf229bd3ea718150d431fa74dc7 /lib/ssl
parent7d72ac7d68f3f031c02b17db1c2ae790d4b35f1e (diff)
downloadotp-5960e81bc4e19d54a3b082840301665ad0e1cd09.tar.gz
otp-5960e81bc4e19d54a3b082840301665ad0e1cd09.tar.bz2
otp-5960e81bc4e19d54a3b082840301665ad0e1cd09.zip
ssl: Correct compression decoding
Property testing revealed an decoding error of "compression_methods" in the client hello. As we do not implement any compression methods this has no practical impact.
Diffstat (limited to 'lib/ssl')
-rw-r--r--lib/ssl/src/ssl_record.erl5
-rw-r--r--lib/ssl/src/tls_handshake.erl2
2 files changed, 3 insertions, 4 deletions
diff --git a/lib/ssl/src/ssl_record.erl b/lib/ssl/src/ssl_record.erl
index 659e1485ac..446bb6c56a 100644
--- a/lib/ssl/src/ssl_record.erl
+++ b/lib/ssl/src/ssl_record.erl
@@ -278,13 +278,12 @@ compress(?NULL, Data, CS) ->
{Data, CS}.
%%--------------------------------------------------------------------
--spec compressions() -> [binary()].
+-spec compressions() -> [integer()].
%%
%% Description: return a list of compressions supported (currently none)
%%--------------------------------------------------------------------
compressions() ->
- [?byte(?NULL)].
-
+ [?NULL].
%%====================================================================
%% Payload encryption/decryption
diff --git a/lib/ssl/src/tls_handshake.erl b/lib/ssl/src/tls_handshake.erl
index 1fccc216cb..82ed2e8d14 100644
--- a/lib/ssl/src/tls_handshake.erl
+++ b/lib/ssl/src/tls_handshake.erl
@@ -419,7 +419,7 @@ decode_handshake(_Version, ?CLIENT_HELLO,
random = Random,
session_id = Session_ID,
cipher_suites = ssl_handshake:decode_suites('2_bytes', CipherSuites),
- compression_methods = Comp_methods,
+ compression_methods = erlang:binary_to_list(Comp_methods),
extensions = DecodedExtensions
};
decode_handshake({3, 4}, Tag, Msg) ->