aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssl/src/ssl_record.erl
diff options
context:
space:
mode:
authorIngela Anderton Andin <[email protected]>2017-11-16 11:04:09 +0100
committerIngela Anderton Andin <[email protected]>2017-11-16 11:38:16 +0100
commitf1bee5747a39adde2e8bab666d19c99a0069f5a9 (patch)
tree4ef61b1d8f7247cea47344ee7ea17b26a7989608 /lib/ssl/src/ssl_record.erl
parentd332dcea887f9f13726bb31c1b70ae7c4c98cade (diff)
parent70defe957f68f5ad4a4957af29c8713556074995 (diff)
downloadotp-f1bee5747a39adde2e8bab666d19c99a0069f5a9.tar.gz
otp-f1bee5747a39adde2e8bab666d19c99a0069f5a9.tar.bz2
otp-f1bee5747a39adde2e8bab666d19c99a0069f5a9.zip
Merge branch 'maint'
Conflicts: lib/ssl/src/dtls_connection.erl lib/ssl/src/ssl_connection.erl lib/ssl/src/ssl_handshake.erl lib/ssl/src/tls_connection.erl
Diffstat (limited to 'lib/ssl/src/ssl_record.erl')
-rw-r--r--lib/ssl/src/ssl_record.erl12
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/ssl/src/ssl_record.erl b/lib/ssl/src/ssl_record.erl
index 003ad4994b..dd6a3e8521 100644
--- a/lib/ssl/src/ssl_record.erl
+++ b/lib/ssl/src/ssl_record.erl
@@ -53,11 +53,11 @@
-type ssl_atom_version() :: tls_record:tls_atom_version().
-type connection_states() :: term(). %% Map
-type connection_state() :: term(). %% Map
+
%%====================================================================
-%% Internal application API
+%% Connection state handling
%%====================================================================
-
%%--------------------------------------------------------------------
-spec current_connection_state(connection_states(), read | write) ->
connection_state().
@@ -267,6 +267,9 @@ set_pending_cipher_state(#{pending_read := Read,
pending_read => Read#{cipher_state => ServerState},
pending_write => Write#{cipher_state => ClientState}}.
+%%====================================================================
+%% Compression
+%%====================================================================
uncompress(?NULL, Data, CS) ->
{Data, CS}.
@@ -282,6 +285,11 @@ compress(?NULL, Data, CS) ->
compressions() ->
[?byte(?NULL)].
+
+%%====================================================================
+%% Payload encryption/decryption
+%%====================================================================
+
%%--------------------------------------------------------------------
-spec cipher(ssl_version(), iodata(), connection_state(), MacHash::binary()) ->
{CipherFragment::binary(), connection_state()}.