diff options
author | Raimo Niskanen <[email protected]> | 2019-02-14 14:38:43 +0100 |
---|---|---|
committer | Raimo Niskanen <[email protected]> | 2019-02-14 14:49:35 +0100 |
commit | de990f6afaa85a43c01d72b65a5a9de6940317a7 (patch) | |
tree | 36ea630eee54db20e90b3d0f0d1ad739babbf232 /lib/ssl/src/tls_record.erl | |
parent | fd9c6755071eb3a2932f94c1fd0ac962920f124d (diff) | |
download | otp-de990f6afaa85a43c01d72b65a5a9de6940317a7.tar.gz otp-de990f6afaa85a43c01d72b65a5a9de6940317a7.tar.bz2 otp-de990f6afaa85a43c01d72b65a5a9de6940317a7.zip |
Clean up module boundaries
Improve the abstraction between the ssl_connection module
and dtls_connection, tls_connection and tls_sender, as well
as towards the lower level tls_record and ssl_record modules.
Remove some dead code.
Diffstat (limited to 'lib/ssl/src/tls_record.erl')
-rw-r--r-- | lib/ssl/src/tls_record.erl | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/ssl/src/tls_record.erl b/lib/ssl/src/tls_record.erl index cd3c3b7829..5cf238a685 100644 --- a/lib/ssl/src/tls_record.erl +++ b/lib/ssl/src/tls_record.erl @@ -75,7 +75,12 @@ init_connection_states(Role, BeastMitigation) -> pending_write => Pending}. %%-------------------------------------------------------------------- --spec get_tls_records(binary(), [tls_version()] | tls_version(), binary()) -> {[binary()], binary()} | #alert{}. +-spec get_tls_records( + binary(), [tls_version()] | tls_version(), + Buffer0 :: binary() | {'undefined' | #ssl_tls{}, {[binary()],non_neg_integer(),[binary()]}}) -> + {Records :: [#ssl_tls{}], + Buffer :: {'undefined' | #ssl_tls{}, {[binary()],non_neg_integer(),[binary()]}}} | + #alert{}. %% %% and returns it as a list of tls_compressed binaries also returns leftover %% Description: Given old buffer and new data from TCP, packs up a records @@ -132,8 +137,8 @@ encode_change_cipher_spec(Version, ConnectionStates) -> encode_plain_text(?CHANGE_CIPHER_SPEC, Version, ?byte(?CHANGE_CIPHER_SPEC_PROTO), ConnectionStates). %%-------------------------------------------------------------------- --spec encode_data(binary(), tls_version(), ssl_record:connection_states()) -> - {iolist(), ssl_record:connection_states()}. +-spec encode_data([binary()], tls_version(), ssl_record:connection_states()) -> + {[[binary()]], ssl_record:connection_states()}. %% %% Description: Encodes data to send on the ssl-socket. %%-------------------------------------------------------------------- |