aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssl/src/ssl_cipher.erl
diff options
context:
space:
mode:
authorIngela Anderton Andin <[email protected]>2018-12-14 11:03:45 +0100
committerIngela Anderton Andin <[email protected]>2018-12-14 11:05:17 +0100
commit96db55840b25fa8bde5bbbf93c9bd92782e3147c (patch)
tree794e612875eac6b4fc76647352a873a1f453ff31 /lib/ssl/src/ssl_cipher.erl
parentd2602d435638a4db13d8cd6f454995c23ceaad65 (diff)
parenta2cdf319505b102c0b8bb192d36a08448d304559 (diff)
downloadotp-96db55840b25fa8bde5bbbf93c9bd92782e3147c.tar.gz
otp-96db55840b25fa8bde5bbbf93c9bd92782e3147c.tar.bz2
otp-96db55840b25fa8bde5bbbf93c9bd92782e3147c.zip
Merge branch 'maint'
Conflicts: lib/ssl/src/dtls_connection.erl lib/ssl/src/ssl_connection.erl lib/ssl/src/ssl_connection.hrl lib/ssl/src/tls_connection.erl lib/ssl/src/tls_record.erl
Diffstat (limited to 'lib/ssl/src/ssl_cipher.erl')
-rw-r--r--lib/ssl/src/ssl_cipher.erl4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/ssl/src/ssl_cipher.erl b/lib/ssl/src/ssl_cipher.erl
index c4b8e2172a..1b6072dbcc 100644
--- a/lib/ssl/src/ssl_cipher.erl
+++ b/lib/ssl/src/ssl_cipher.erl
@@ -972,7 +972,7 @@ is_correct_padding(GenBlockCipher, {3, 1}, false) ->
is_correct_padding(#generic_block_cipher{padding_length = Len,
padding = Padding}, _, _) ->
Len == byte_size(Padding) andalso
- list_to_binary(lists:duplicate(Len, Len)) == Padding.
+ binary:copy(?byte(Len), Len) == Padding.
get_padding(Length, BlockSize) ->
get_padding_aux(BlockSize, Length rem BlockSize).
@@ -981,7 +981,7 @@ get_padding_aux(_, 0) ->
{0, <<>>};
get_padding_aux(BlockSize, PadLength) ->
N = BlockSize - PadLength,
- {N, list_to_binary(lists:duplicate(N, N))}.
+ {N, binary:copy(?byte(N), N)}.
random_iv(IV) ->
IVSz = byte_size(IV),