Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/boringssl.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Benjamin <davidben@chromium.org>2014-11-07 10:49:34 +0300
committerAdam Langley <agl@google.com>2014-11-11 01:44:56 +0300
commitd8138e91d0613ebb373fe4c2beb39e53df43f59d (patch)
treea03ff8644748f35d64e82b61fa58611dc635e00b /ssl/d1_pkt.c
parent60e799276419e843b6af13de69f26582a97ed67e (diff)
Keep retransmit window size architecture-independent.
Parameters like these should not change between 32-bit and 64-bit. 64 is also the value recommended in RFC 6347, section 4.1.2.6. Document those fields while I'm here. Change-Id: I8481ee0765ff3d261a96a2e1a53b6ad6695b2d42 Reviewed-on: https://boringssl-review.googlesource.com/2222 Reviewed-by: Adam Langley <agl@google.com>
Diffstat (limited to 'ssl/d1_pkt.c')
-rw-r--r--ssl/d1_pkt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ssl/d1_pkt.c b/ssl/d1_pkt.c
index a5a27f19..2022ece9 100644
--- a/ssl/d1_pkt.c
+++ b/ssl/d1_pkt.c
@@ -1452,7 +1452,7 @@ static int dtls1_record_replay_check(SSL *s, DTLS1_BITMAP *bitmap)
shift = -cmp;
if (shift >= sizeof(bitmap->map)*8)
return 0; /* stale, outside the window */
- else if (bitmap->map & (1UL<<shift))
+ else if (bitmap->map & (((uint64_t) 1) << shift))
return 0; /* record previously received */
memcpy (s->s3->rrec.seq_num,seq,8);
@@ -1479,7 +1479,7 @@ static void dtls1_record_bitmap_update(SSL *s, DTLS1_BITMAP *bitmap)
else {
shift = -cmp;
if (shift < sizeof(bitmap->map)*8)
- bitmap->map |= 1UL<<shift;
+ bitmap->map |= ((uint64_t) 1) << shift;
}
}