summaryrefslogtreecommitdiffstats
path: root/ssl/d1_lib.c
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2005-05-30 22:34:37 +0000
committerRichard Levitte <levitte@openssl.org>2005-05-30 22:34:37 +0000
commit188b05792fafa43904fb2c471a734dbfabc98f98 (patch)
tree18fae6379f8794a8c1551d5b473720cf012948a4 /ssl/d1_lib.c
parent575901e537cf5b74b9d3ddc37628a4151997e561 (diff)
pqueue and dtls uses 64-bit values. Unfortunately, OpenSSL doesn't
have a uniform representation for those over all architectures, so a little bit of hackery is needed. Contributed by nagendra modadugu <nagendra@cs.stanford.edu>
Diffstat (limited to 'ssl/d1_lib.c')
-rw-r--r--ssl/d1_lib.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/ssl/d1_lib.c b/ssl/d1_lib.c
index d774521aaf..458ce544d1 100644
--- a/ssl/d1_lib.c
+++ b/ssl/d1_lib.c
@@ -132,10 +132,20 @@ int dtls1_new(SSL *s)
memset(d1,0, sizeof *d1);
/* d1->handshake_epoch=0; */
+#if defined(OPENSSL_SYS_VMS) || defined(VMS_TEST)
+ d1->bitmap.length=64;
+#else
d1->bitmap.length=sizeof(d1->bitmap.map) * 8;
+#endif
+ pq_64bit_init(&(d1->bitmap.map));
+ pq_64bit_init(&(d1->bitmap.max_seq_num));
+
+ pq_64bit_init(&(d1->next_bitmap.map));
+ pq_64bit_init(&(d1->next_bitmap.max_seq_num));
+
d1->unprocessed_rcds.q=pqueue_new();
- d1->processed_rcds.q=pqueue_new();
- d1->buffered_messages = pqueue_new();
+ d1->processed_rcds.q=pqueue_new();
+ d1->buffered_messages = pqueue_new();
d1->sent_messages=pqueue_new();
if ( s->server)
@@ -198,6 +208,12 @@ void dtls1_free(SSL *s)
}
pqueue_free(s->d1->sent_messages);
+ pq_64bit_free(&(s->d1->bitmap.map));
+ pq_64bit_free(&(s->d1->bitmap.max_seq_num));
+
+ pq_64bit_free(&(s->d1->next_bitmap.map));
+ pq_64bit_free(&(s->d1->next_bitmap.max_seq_num));
+
OPENSSL_free(s->d1);
}