diff options
author | jkim <jkim@FreeBSD.org> | 2014-01-22 19:57:11 +0000 |
---|---|---|
committer | jkim <jkim@FreeBSD.org> | 2014-01-22 19:57:11 +0000 |
commit | a8c44ea5cfb6806cb801d126e1ff9c11bdc9a006 (patch) | |
tree | 4c8798ce163b45133d4f5fb5c859c7235ff5efea /crypto/openssl/ssl/s3_pkt.c | |
parent | cc5aa413b410def9b593403149c8a185bc8008b1 (diff) | |
download | FreeBSD-src-a8c44ea5cfb6806cb801d126e1ff9c11bdc9a006.zip FreeBSD-src-a8c44ea5cfb6806cb801d126e1ff9c11bdc9a006.tar.gz |
Merge OpenSSL 1.0.1f.
Approved by: so (delphij), benl (silence)
Diffstat (limited to 'crypto/openssl/ssl/s3_pkt.c')
-rw-r--r-- | crypto/openssl/ssl/s3_pkt.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/crypto/openssl/ssl/s3_pkt.c b/crypto/openssl/ssl/s3_pkt.c index 804291e..96ba632 100644 --- a/crypto/openssl/ssl/s3_pkt.c +++ b/crypto/openssl/ssl/s3_pkt.c @@ -335,7 +335,7 @@ fprintf(stderr, "Record type=%d, Length=%d\n", rr->type, rr->length); if (version != s->version) { SSLerr(SSL_F_SSL3_GET_RECORD,SSL_R_WRONG_VERSION_NUMBER); - if ((s->version & 0xFF00) == (version & 0xFF00)) + if ((s->version & 0xFF00) == (version & 0xFF00) && !s->enc_write_ctx && !s->write_hash) /* Send back error using their minor version number :-) */ s->version = (unsigned short)version; al=SSL_AD_PROTOCOL_VERSION; @@ -1459,8 +1459,14 @@ int ssl3_do_change_cipher_spec(SSL *s) slen=s->method->ssl3_enc->client_finished_label_len; } - s->s3->tmp.peer_finish_md_len = s->method->ssl3_enc->final_finish_mac(s, + i = s->method->ssl3_enc->final_finish_mac(s, sender,slen,s->s3->tmp.peer_finish_md); + if (i == 0) + { + SSLerr(SSL_F_SSL3_DO_CHANGE_CIPHER_SPEC, ERR_R_INTERNAL_ERROR); + return 0; + } + s->s3->tmp.peer_finish_md_len = i; return(1); } |