diff options
author | Andy Polyakov <appro@openssl.org> | 2014-02-14 17:43:31 +0100 |
---|---|---|
committer | Andy Polyakov <appro@openssl.org> | 2014-02-14 17:43:31 +0100 |
commit | 701134320a94908d8c0ac513741cab41e215a7b5 (patch) | |
tree | 187afcf673f292ac0258b1d881030b93b304a576 /ssl/s3_pkt.c | |
parent | f4d456408d9d7bca31f34765d1a05fbd9fa55826 (diff) | |
download | openssl-701134320a94908d8c0ac513741cab41e215a7b5.tar.gz |
ssl/s3_pkt.c: detect RAND_bytes error in multi-block.
Diffstat (limited to 'ssl/s3_pkt.c')
-rw-r--r-- | ssl/s3_pkt.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/ssl/s3_pkt.c b/ssl/s3_pkt.c index 93778d15a3..b9e45c74bc 100644 --- a/ssl/s3_pkt.c +++ b/ssl/s3_pkt.c @@ -764,9 +764,10 @@ int ssl3_write_bytes(SSL *s, int type, const void *buf_, int len) mb_param.inp = &buf[tot]; mb_param.len = nw; - EVP_CIPHER_CTX_ctrl(s->enc_write_ctx, - EVP_CTRL_TLS1_1_MULTIBLOCK_ENCRYPT, - sizeof(mb_param),&mb_param); + if (EVP_CIPHER_CTX_ctrl(s->enc_write_ctx, + EVP_CTRL_TLS1_1_MULTIBLOCK_ENCRYPT, + sizeof(mb_param),&mb_param)<=0) + return -1; s->s3->write_sequence[7] += mb_param.interleave; if (s->s3->write_sequence[7] < mb_param.interleave) |