diff options
Diffstat (limited to 'src/lib/libssl/d1_pkt.c')
-rw-r--r-- | src/lib/libssl/d1_pkt.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/lib/libssl/d1_pkt.c b/src/lib/libssl/d1_pkt.c index cfe4524553..8186462d4a 100644 --- a/src/lib/libssl/d1_pkt.c +++ b/src/lib/libssl/d1_pkt.c | |||
@@ -455,7 +455,7 @@ printf("\n"); | |||
455 | orig_len < mac_size+1)) | 455 | orig_len < mac_size+1)) |
456 | { | 456 | { |
457 | al=SSL_AD_DECODE_ERROR; | 457 | al=SSL_AD_DECODE_ERROR; |
458 | SSLerr(SSL_F_SSL3_GET_RECORD,SSL_R_LENGTH_TOO_SHORT); | 458 | SSLerr(SSL_F_DTLS1_PROCESS_RECORD,SSL_R_LENGTH_TOO_SHORT); |
459 | goto f_err; | 459 | goto f_err; |
460 | } | 460 | } |
461 | 461 | ||
@@ -480,7 +480,7 @@ printf("\n"); | |||
480 | } | 480 | } |
481 | 481 | ||
482 | i=s->method->ssl3_enc->mac(s,md,0 /* not send */); | 482 | i=s->method->ssl3_enc->mac(s,md,0 /* not send */); |
483 | if (i < 0 || mac == NULL || timingsafe_bcmp(md, mac, (size_t)mac_size) != 0) | 483 | if (i < 0 || mac == NULL || CRYPTO_memcmp(md, mac, (size_t)mac_size) != 0) |
484 | enc_err = -1; | 484 | enc_err = -1; |
485 | if (rr->length > SSL3_RT_MAX_COMPRESSED_LENGTH+mac_size) | 485 | if (rr->length > SSL3_RT_MAX_COMPRESSED_LENGTH+mac_size) |
486 | enc_err = -1; | 486 | enc_err = -1; |
@@ -847,6 +847,12 @@ start: | |||
847 | } | 847 | } |
848 | } | 848 | } |
849 | 849 | ||
850 | if (s->d1->listen && rr->type != SSL3_RT_HANDSHAKE) | ||
851 | { | ||
852 | rr->length = 0; | ||
853 | goto start; | ||
854 | } | ||
855 | |||
850 | /* we now have a packet which can be read and processed */ | 856 | /* we now have a packet which can be read and processed */ |
851 | 857 | ||
852 | if (s->s3->change_cipher_spec /* set when we receive ChangeCipherSpec, | 858 | if (s->s3->change_cipher_spec /* set when we receive ChangeCipherSpec, |
@@ -1051,6 +1057,7 @@ start: | |||
1051 | !(s->s3->flags & SSL3_FLAGS_NO_RENEGOTIATE_CIPHERS) && | 1057 | !(s->s3->flags & SSL3_FLAGS_NO_RENEGOTIATE_CIPHERS) && |
1052 | !s->s3->renegotiate) | 1058 | !s->s3->renegotiate) |
1053 | { | 1059 | { |
1060 | s->d1->handshake_read_seq++; | ||
1054 | s->new_session = 1; | 1061 | s->new_session = 1; |
1055 | ssl3_renegotiate(s); | 1062 | ssl3_renegotiate(s); |
1056 | if (ssl3_renegotiate_check(s)) | 1063 | if (ssl3_renegotiate_check(s)) |