diff options
author | Ingela Anderton Andin <[email protected]> | 2010-03-25 08:24:48 +0000 |
---|---|---|
committer | Erlang/OTP <[email protected]> | 2010-03-25 08:24:48 +0000 |
commit | 6ec62f7ca98bcc674b806b39d73ded6f0b9a772d (patch) | |
tree | ea7a23ca2646172d1c0961cb577a11fab11051c3 /lib/ssl/src/ssl_record.hrl | |
parent | 985d201454d0cb43d5ed3230d6afeaeea0a1fe2c (diff) | |
download | otp-6ec62f7ca98bcc674b806b39d73ded6f0b9a772d.tar.gz otp-6ec62f7ca98bcc674b806b39d73ded6f0b9a772d.tar.bz2 otp-6ec62f7ca98bcc674b806b39d73ded6f0b9a772d.zip |
OTP-8517 Renegotiation
New ssl now properly handles ssl renegotiation, and initiates a
renegotiation if ssl/ltls-sequence numbers comes close to the max value.
Diffstat (limited to 'lib/ssl/src/ssl_record.hrl')
-rw-r--r-- | lib/ssl/src/ssl_record.hrl | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/lib/ssl/src/ssl_record.hrl b/lib/ssl/src/ssl_record.hrl index 7370e0f0b3..362b7039d4 100644 --- a/lib/ssl/src/ssl_record.hrl +++ b/lib/ssl/src/ssl_record.hrl @@ -1,19 +1,19 @@ %% %% %CopyrightBegin% -%% -%% Copyright Ericsson AB 2007-2009. All Rights Reserved. -%% +%% +%% Copyright Ericsson AB 2007-2010. All Rights Reserved. +%% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in %% compliance with the License. You should have received a copy of the %% Erlang Public License along with this software. If not, it can be %% retrieved online at http://www.erlang.org/. -%% +%% %% Software distributed under the License is distributed on an "AS IS" %% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See %% the License for the specific language governing rights and limitations %% under the License. -%% +%% %% %CopyrightEnd% %% @@ -63,6 +63,13 @@ sequence_number }). +-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 +%% for the rehandshake and a little data. +-define(MARGIN, 100). +-define(DEFAULT_RENEGOTIATE_AT, ?MAX_SEQENCE_NUMBER - ?MARGIN). + %% ConnectionEnd -define(SERVER, 0). -define(CLIENT, 1). |