Submitted by: Robin Seggelmann <seggelmann@fh-muenster.de>

Make session tickets work with DTLS.
This commit is contained in:
Dr. Stephen Henson
2010-02-01 16:49:42 +00:00
parent 4e5fdd11ea
commit 868f5e44ca
3 changed files with 6 additions and 5 deletions

View File

@@ -1525,9 +1525,10 @@ int dtls1_send_newsession_ticket(SSL *s)
p += hlen;
/* Now write out lengths: p points to end of data written */
/* Total length */
len = p - (unsigned char *)&(s->init_buf->data[DTLS1_HM_HEADER_LENGTH]);
len = p - (unsigned char *)(s->init_buf->data);
/* Ticket length */
p=(unsigned char *)&(s->init_buf->data[DTLS1_HM_HEADER_LENGTH]) + 4;
s2n(len - 18, p); /* Ticket length */
s2n(len - DTLS1_HM_HEADER_LENGTH - 6, p);
/* number of bytes to write */
s->init_num= len;