aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIngela Anderton Andin <[email protected]>2010-07-16 12:02:31 +0200
committerIngela Anderton Andin <[email protected]>2010-08-18 11:23:26 +0200
commitb688f48b13f94b15665e951ee08be5d7f4d07ca7 (patch)
treeda7f3a7009100be954f4d25e3db3826112106dec
parent871fdb232d7facc58c202ef81634a12fbdcfefb4 (diff)
downloadotp-b688f48b13f94b15665e951ee08be5d7f4d07ca7.tar.gz
otp-b688f48b13f94b15665e951ee08be5d7f4d07ca7.tar.bz2
otp-b688f48b13f94b15665e951ee08be5d7f4d07ca7.zip
Do not check the padding for TLS 1.0
For interoperability reasons we do not check the padding in TLS 1.0 as it is not strictly required and breaks interopability with for instance Google.
-rw-r--r--lib/ssl/src/ssl_cipher.erl6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/ssl/src/ssl_cipher.erl b/lib/ssl/src/ssl_cipher.erl
index a6e80047c2..073c937087 100644
--- a/lib/ssl/src/ssl_cipher.erl
+++ b/lib/ssl/src/ssl_cipher.erl
@@ -506,6 +506,12 @@ generic_stream_cipher_from_bin(T, HashSz) ->
is_correct_padding(_, {3, 0}) ->
true;
+%% For interoperability reasons we do not check the padding in TLS 1.0 as it
+%% is not strictly required and breaks interopability with for instance
+%% Google.
+is_correct_padding(_, {3, 1}) ->
+ true;
+%% Padding must be check in TLS 1.1 and after
is_correct_padding(#generic_block_cipher{padding_length = Len, padding = Padding}, _) ->
list_to_binary(lists:duplicate(Len, Len)) == Padding.