projects
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
PR: 2457
[openssl.git]
/
ssl
/
d1_srvr.c
diff --git
a/ssl/d1_srvr.c
b/ssl/d1_srvr.c
index eead971d257eaa35be6dc896d7762caeb8bcff17..ac4fbda3a60b1bf3eb95d04e447a1d30c4f1cbfe 100644
(file)
--- a/
ssl/d1_srvr.c
+++ b/
ssl/d1_srvr.c
@@
-177,7
+177,7
@@
int dtls1_accept(SSL *s)
switch (s->state)
{
case SSL_ST_RENEGOTIATE:
switch (s->state)
{
case SSL_ST_RENEGOTIATE:
- s->
new_session
=1;
+ s->
renegotiate
=1;
/* s->state=SSL_ST_ACCEPT; */
case SSL_ST_BEFORE:
/* s->state=SSL_ST_ACCEPT; */
case SSL_ST_BEFORE:
@@
-299,7
+299,7
@@
int dtls1_accept(SSL *s)
case SSL3_ST_SW_SRVR_HELLO_A:
case SSL3_ST_SW_SRVR_HELLO_B:
case SSL3_ST_SW_SRVR_HELLO_A:
case SSL3_ST_SW_SRVR_HELLO_B:
- s->
new_session
= 2;
+ s->
renegotiate
= 2;
dtls1_start_timer(s);
ret=dtls1_send_server_hello(s);
if (ret <= 0) goto end;
dtls1_start_timer(s);
ret=dtls1_send_server_hello(s);
if (ret <= 0) goto end;
@@
-452,7
+452,7
@@
int dtls1_accept(SSL *s)
s->init_num=0;
break;
s->init_num=0;
break;
- case SSL3_ST_
C
W_FLUSH:
+ case SSL3_ST_
S
W_FLUSH:
s->rwstate=SSL_WRITING;
if (BIO_flush(s->wbio) <= 0)
{
s->rwstate=SSL_WRITING;
if (BIO_flush(s->wbio) <= 0)
{
@@
-620,11
+620,12
@@
int dtls1_accept(SSL *s)
s->init_num=0;
s->init_num=0;
- if (s->
new_session
== 2) /* skipped if we just sent a HelloRequest */
+ if (s->
renegotiate
== 2) /* skipped if we just sent a HelloRequest */
{
/* actually not necessarily a 'new' session unless
* SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION is set */
{
/* actually not necessarily a 'new' session unless
* SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION is set */
+ s->renegotiate=0;
s->new_session=0;
ssl_update_cache(s,SSL_SESS_CACHE_SERVER);
s->new_session=0;
ssl_update_cache(s,SSL_SESS_CACHE_SERVER);
@@
-1525,9
+1526,10
@@
int dtls1_send_newsession_ticket(SSL *s)
p += hlen;
/* Now write out lengths: p points to end of data written */
/* Total length */
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;
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;
/* number of bytes to write */
s->init_num= len;