diff options
author | Andreas Schultz <[email protected]> | 2013-06-12 16:26:24 +0200 |
---|---|---|
committer | Ingela Anderton Andin <[email protected]> | 2013-09-10 09:37:29 +0200 |
commit | fb6ac178ac437fcc04f1675df75b0583c1d24ad7 (patch) | |
tree | bcd8072e85b2eeb43566f36fb7545ab3bd40ddd9 /lib/ssl/src/ssl_record.hrl | |
parent | f3be514fd1e015f78a227d25c3471dbe2cfb3d51 (diff) | |
download | otp-fb6ac178ac437fcc04f1675df75b0583c1d24ad7.tar.gz otp-fb6ac178ac437fcc04f1675df75b0583c1d24ad7.tar.bz2 otp-fb6ac178ac437fcc04f1675df75b0583c1d24ad7.zip |
ssl: Add DTLS record primitives
This code is to 99 % written by Andreas Schultz only some small changes
to start integrating with OTPs DTLS solution.
Diffstat (limited to 'lib/ssl/src/ssl_record.hrl')
-rw-r--r-- | lib/ssl/src/ssl_record.hrl | 29 |
1 files changed, 11 insertions, 18 deletions
diff --git a/lib/ssl/src/ssl_record.hrl b/lib/ssl/src/ssl_record.hrl index 2fd17f9c35..8a6a211553 100644 --- a/lib/ssl/src/ssl_record.hrl +++ b/lib/ssl/src/ssl_record.hrl @@ -29,12 +29,17 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% Connection states - RFC 4346 section 6.1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - --record(connection_states, { - current_read, - pending_read, - current_write, - pending_write +-record(connection_state, { + security_parameters, + compression_state, + cipher_state, + mac_secret, + epoch, %% Only used by DTLS + sequence_number, + %% RFC 5746 + secure_renegotiation, + client_verify_data, + server_verify_data }). -record(security_parameters, { @@ -56,18 +61,6 @@ exportable % boolean }). --record(connection_state, { - security_parameters, - compression_state, - cipher_state, - mac_secret, - sequence_number, - %% RFC 5746 - secure_renegotiation, - client_verify_data, - server_verify_data - }). - -define(MAX_SEQENCE_NUMBER, 18446744073709552000). %% math:pow(2, 64) - 1 = 1.8446744073709552e19 %% Sequence numbers can not wrap so when max is about to be reached we should renegotiate. %% We will renegotiate a little before so that there will be sequence numbers left |