summaryrefslogtreecommitdiff
path: root/src/lib/libssl/d1_srvr.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libssl/d1_srvr.c')
-rw-r--r--src/lib/libssl/d1_srvr.c29
1 files changed, 9 insertions, 20 deletions
diff --git a/src/lib/libssl/d1_srvr.c b/src/lib/libssl/d1_srvr.c
index 9975e20873..29421da9aa 100644
--- a/src/lib/libssl/d1_srvr.c
+++ b/src/lib/libssl/d1_srvr.c
@@ -276,11 +276,10 @@ int dtls1_accept(SSL *s)
276 case SSL3_ST_SW_HELLO_REQ_B: 276 case SSL3_ST_SW_HELLO_REQ_B:
277 277
278 s->shutdown=0; 278 s->shutdown=0;
279 dtls1_clear_record_buffer(s);
280 dtls1_start_timer(s); 279 dtls1_start_timer(s);
281 ret=dtls1_send_hello_request(s); 280 ret=dtls1_send_hello_request(s);
282 if (ret <= 0) goto end; 281 if (ret <= 0) goto end;
283 s->s3->tmp.next_state=SSL3_ST_SR_CLNT_HELLO_A; 282 s->s3->tmp.next_state=SSL3_ST_SW_HELLO_REQ_C;
284 s->state=SSL3_ST_SW_FLUSH; 283 s->state=SSL3_ST_SW_FLUSH;
285 s->init_num=0; 284 s->init_num=0;
286 285
@@ -722,13 +721,10 @@ int dtls1_accept(SSL *s)
722 if (ret <= 0) goto end; 721 if (ret <= 0) goto end;
723 722
724#ifndef OPENSSL_NO_SCTP 723#ifndef OPENSSL_NO_SCTP
725 if (!s->hit) 724 /* Change to new shared key of SCTP-Auth,
726 { 725 * will be ignored if no SCTP used.
727 /* Change to new shared key of SCTP-Auth, 726 */
728 * will be ignored if no SCTP used. 727 BIO_ctrl(SSL_get_wbio(s), BIO_CTRL_DGRAM_SCTP_NEXT_AUTH_KEY, 0, NULL);
729 */
730 BIO_ctrl(SSL_get_wbio(s), BIO_CTRL_DGRAM_SCTP_NEXT_AUTH_KEY, 0, NULL);
731 }
732#endif 728#endif
733 729
734 s->state=SSL3_ST_SW_FINISHED_A; 730 s->state=SSL3_ST_SW_FINISHED_A;
@@ -753,16 +749,7 @@ int dtls1_accept(SSL *s)
753 if (ret <= 0) goto end; 749 if (ret <= 0) goto end;
754 s->state=SSL3_ST_SW_FLUSH; 750 s->state=SSL3_ST_SW_FLUSH;
755 if (s->hit) 751 if (s->hit)
756 {
757 s->s3->tmp.next_state=SSL3_ST_SR_FINISHED_A; 752 s->s3->tmp.next_state=SSL3_ST_SR_FINISHED_A;
758
759#ifndef OPENSSL_NO_SCTP
760 /* Change to new shared key of SCTP-Auth,
761 * will be ignored if no SCTP used.
762 */
763 BIO_ctrl(SSL_get_wbio(s), BIO_CTRL_DGRAM_SCTP_NEXT_AUTH_KEY, 0, NULL);
764#endif
765 }
766 else 753 else
767 { 754 {
768 s->s3->tmp.next_state=SSL_ST_OK; 755 s->s3->tmp.next_state=SSL_ST_OK;
@@ -925,13 +912,15 @@ int dtls1_send_server_hello(SSL *s)
925 unsigned char *p,*d; 912 unsigned char *p,*d;
926 int i; 913 int i;
927 unsigned int sl; 914 unsigned int sl;
928 unsigned long l; 915 unsigned long l,Time;
929 916
930 if (s->state == SSL3_ST_SW_SRVR_HELLO_A) 917 if (s->state == SSL3_ST_SW_SRVR_HELLO_A)
931 { 918 {
932 buf=(unsigned char *)s->init_buf->data; 919 buf=(unsigned char *)s->init_buf->data;
933 p=s->s3->server_random; 920 p=s->s3->server_random;
934 ssl_fill_hello_random(s, 1, p, SSL3_RANDOM_SIZE); 921 Time=(unsigned long)time(NULL); /* Time */
922 l2n(Time,p);
923 RAND_pseudo_bytes(p,SSL3_RANDOM_SIZE-4);
935 /* Do the message type and length last */ 924 /* Do the message type and length last */
936 d=p= &(buf[DTLS1_HM_HEADER_LENGTH]); 925 d=p= &(buf[DTLS1_HM_HEADER_LENGTH]);
937 926